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

Unified Diff: src/compiler/js-builtin-reducer.cc

Issue 1027753002: [turbofan] Fix lowering of Math.max for integral inputs. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | test/mjsunit/compiler/regress-468162.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-builtin-reducer.cc
diff --git a/src/compiler/js-builtin-reducer.cc b/src/compiler/js-builtin-reducer.cc
index 2a032dbfb2dc1d1df44abb07552ae372081aa09e..12b0e2f6cc97d38eb8986ec3f8a19b923ba008a3 100644
--- a/src/compiler/js-builtin-reducer.cc
+++ b/src/compiler/js-builtin-reducer.cc
@@ -118,8 +118,8 @@ Reduction JSBuiltinReducer::ReduceMathMax(Node* node) {
Node* const input = r.GetJSCallInput(i);
value = graph()->NewNode(
common()->Select(kMachNone),
- graph()->NewNode(simplified()->NumberLessThan(), input, value), input,
- value);
+ graph()->NewNode(simplified()->NumberLessThan(), input, value), value,
+ input);
}
return Replace(value);
}
« no previous file with comments | « no previous file | test/mjsunit/compiler/regress-468162.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698