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

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

Issue 2669203005: [arm64][turbofan] Fix add+shr for big shift values. (Closed)
Patch Set: Only consider the last 6 bits of the shift immediate Created 3 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 195f0a91dcb440c794bf8d7f2d96a3776d17f266..c8261aea49ff38249d5634995bdd7a7d202bcb81 100644
--- a/test/cctest/compiler/test-run-machops.cc
+++ b/test/cctest/compiler/test-run-machops.cc
@@ -6709,6 +6709,29 @@ 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)));
+ int64_t input = 16;
+ m.Call(input);
+ }
+ {
+ BufferedRawMachineAssemblerTester<int64_t> m(MachineType::Int64());
+ m.Return(m.Int64Add(
+ m.Parameter(0),
+ m.Word64Shr(m.Parameter(0), m.Int64Constant(4611686018427387888))));
+ int64_t input = 16;
+ m.Call(input);
+ }
+}
+
+#endif // V8_TARGET_ARCH_64_BIT
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/arm64/instruction-selector-arm64.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