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

Unified Diff: test/mjsunit/compiler/division-by-constant.js

Issue 704713003: [turbofan] Optimize add operations to use 'leal' instruction on x64 (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Final version Created 6 years, 1 month 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/x64/instruction-selector-x64.cc ('k') | test/unittests/compiler/node-matchers-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/division-by-constant.js
diff --git a/test/mjsunit/compiler/division-by-constant.js b/test/mjsunit/compiler/division-by-constant.js
index 0778e95b817c805dbd41c53f5b6918f7f5503e63..d3f3ac37f4462b1fa860cb1194283bd2a8508136 100644
--- a/test/mjsunit/compiler/division-by-constant.js
+++ b/test/mjsunit/compiler/division-by-constant.js
@@ -101,6 +101,7 @@ function CreateTestValues() {
// -----------------------------------------------------------------------------
+
function TestDivisionLike(ref, construct, values, divisor) {
// Define the function to test.
var OptFun = new Function("dividend", construct(divisor));
@@ -111,12 +112,14 @@ function TestDivisionLike(ref, construct, values, divisor) {
%OptimizeFunctionOnNextCall(OptFun);
OptFun(13);
- // Check results.
- values.forEach(function(dividend) {
+function dude(dividend) {
// Avoid deopt caused by overflow, we do not want to test this here.
if (dividend === -2147483648 && divisor === -1) return;
assertEquals(ref(dividend, divisor), OptFun(dividend));
- });
+ }
+
+ // Check results.
+ values.forEach(dude);
}
function Test(ref, construct) {
« no previous file with comments | « src/compiler/x64/instruction-selector-x64.cc ('k') | test/unittests/compiler/node-matchers-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698