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

Unified Diff: test/mjsunit/compiler/turbo-number-feedback.js

Issue 2150553002: [turbofan] Introduces the SpeculativeNumberShiftLeft opcode. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Update. Created 4 years, 5 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
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/turbo-number-feedback.js
diff --git a/test/mjsunit/compiler/turbo-number-feedback.js b/test/mjsunit/compiler/turbo-number-feedback.js
index 059a0ca03151e158e76b155261a8bc1ced354ac4..896d1542424bf9cb727306070fc2fffd3a08983a 100644
--- a/test/mjsunit/compiler/turbo-number-feedback.js
+++ b/test/mjsunit/compiler/turbo-number-feedback.js
@@ -56,3 +56,14 @@
assertEquals(1, f3(0, 1));
assertEquals(1.5, f3(1, 1));
})();
+
+(function ShiftLeftSmis() {
+ function f4(a, b) {
+ return a << b;
+ }
+
+ assertEquals(24, f4(3, 3));
+ assertEquals(40, f4(5, 3));
+ %OptimizeFunctionOnNextCall(f4);
+ assertEquals(64, f4(4, 4));
+})();
« no previous file with comments | « src/compiler/verifier.cc ('k') | test/unittests/compiler/js-typed-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698