Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(720)

Unified Diff: test/cctest/compiler/test-run-machops.cc

Issue 960783002: [turbofan] Fix bogus covering of Word64Equal w/ zero. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: [arm64] Fix unittests. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/cctest/compiler/test-run-machops.cc
diff --git a/test/cctest/compiler/test-run-machops.cc b/test/cctest/compiler/test-run-machops.cc
index 5a55ce6e23b88f74144587fbdd921f1bef14a8f4..a7b1768d2a541ceac63234314dfee5b087cee5f6 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -4436,6 +4436,26 @@ TEST(RunInt32SubWithOverflowInBranchP) {
}
+TEST(RunWord64EqualInBranchP) {
+ int64_t input;
+ MLabel blocka, blockb;
+ RawMachineAssemblerTester<int64_t> m;
+ if (!m.machine()->Is64()) return;
+ Node* value = m.LoadFromPointer(&input, kMachInt64);
+ m.Branch(m.Word64Equal(value, m.Int64Constant(0)), &blocka, &blockb);
+ m.Bind(&blocka);
+ m.Return(m.Int32Constant(1));
+ m.Bind(&blockb);
+ m.Return(m.Int32Constant(2));
+ input = V8_INT64_C(0);
+ CHECK_EQ(1, m.Call());
+ input = V8_INT64_C(1);
+ CHECK_EQ(2, m.Call());
+ input = V8_INT64_C(0x100000000);
+ CHECK_EQ(2, m.Call());
+}
+
+
TEST(RunChangeInt32ToInt64P) {
if (kPointerSize < 8) return;
int64_t actual = -1;
@@ -4793,4 +4813,5 @@ TEST(RunFloat64RoundTiesAway) {
CHECK_EQ(expected, result);
}
}
+
#endif // V8_TURBOFAN_TARGET
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/unittests/compiler/arm64/instruction-selector-arm64-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698