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

Unified Diff: test/mjsunit/compiler/regress-3812.js

Issue 850013003: [turbofan] Fix truncation/representation sloppiness wrt. bool/bit. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fixes/Cleanups Created 5 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/mjsunit/compiler/regress-3812.js
diff --git a/test/mjsunit/compiler/regress-bit-number-constant.js b/test/mjsunit/compiler/regress-3812.js
similarity index 80%
copy from test/mjsunit/compiler/regress-bit-number-constant.js
copy to test/mjsunit/compiler/regress-3812.js
index ca4cf116d95d65d9935046bcfb871362fda918d6..cfc8febc9a0c832582c2e8f47d3e38db05354808 100644
--- a/test/mjsunit/compiler/regress-bit-number-constant.js
+++ b/test/mjsunit/compiler/regress-3812.js
@@ -9,10 +9,11 @@ var foreign = {}
var foo = (function Module(stdlib, foreign, heap) {
"use asm";
function foo(i) {
- return !(i ? 1 : false);
+ var x = i ? (i&1) : true;
+ if (x) return x;
+ return false;
}
return {foo:foo};
})(stdlib, foreign, buffer).foo;
-assertFalse(foo(1));
-assertTrue(foo(0));
+assertEquals(1, foo(1));
« no previous file with comments | « test/cctest/compiler/test-simplified-lowering.cc ('k') | test/mjsunit/compiler/regress-bit-number-constant.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698