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

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

Issue 2669203005: [arm64][turbofan] Fix add+shr for big shift values. (Closed)
Patch Set: Created 3 years, 11 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 195f0a91dcb440c794bf8d7f2d96a3776d17f266..89764dbe78aca9c4668a3cb101ba7c90d839fbbf 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -6709,6 +6709,27 @@ TEST(ParentFramePointer) {
CHECK_EQ(1, r.Call(1));
}
+#if V8_TARGET_ARCH_64_BIT
+
+TEST(Regression5923) {
+ {
+ BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64());
+ m.Return(m.Int64Add(
+ m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888)),
+ m.Parameter(0)));
+ m.Call(16l);
+ }
+ {
+ BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64());
+ m.Return(m.Int64Add(
+ m.Parameter(0),
+ m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888))));
+ m.Call(16l);
+ }
+}
+
+#endif // V8_TARGET_ARCH_64_BIT
+
} // namespace compiler
} // namespace internal
} // namespace v8

Powered by Google App Engine
This is Rietveld 408576698