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

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

Issue 2191883002: [turbofan] Adds speculative opcodes for shift right. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Really fix the merge conflicts. 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 1462c385e8547a67c8c46fc9e64b2415cd1fc294..8dcc42c8a1b49af915bc9d2194fd17e8d43a1f05 100644
--- a/test/mjsunit/compiler/turbo-number-feedback.js
+++ b/test/mjsunit/compiler/turbo-number-feedback.js
@@ -78,3 +78,25 @@
%OptimizeFunctionOnNextCall(f5);
assertEquals(64, f5(4.9, 4.1));
})();
+
+(function ShiftRightNumbers() {
+ function f6(a, b) {
+ return a >> b;
+ }
+
+ assertEquals(1, f6(8.3, 3.4));
+ assertEquals(-2, f6(-16.1, 3.9));
+ %OptimizeFunctionOnNextCall(f6);
+ assertEquals(0, f6(16.2, 5.1));
+})();
+
+(function ShiftRightLogicalNumbers() {
+ function f7(a, b) {
+ return a >>> b;
+ }
+
+ assertEquals(1, f7(8.3, 3.4));
+ assertEquals(536870910, f7(-16.1, 3.9));
+ %OptimizeFunctionOnNextCall(f7);
+ assertEquals(0, f7(16.2, 5.1));
+})();
« 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