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

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

Issue 1843533003: [turbofan] Introduce NumberFloor simplified operator. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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 | src/compiler/opcodes.h » ('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 6b8c25d72665bb0c3a6cd97d3dcb8e1e6533622e..4a284cc8dbeba8faf5472fed54c25a98097e21ea 100644
--- a/src/compiler/js-builtin-reducer.cc
+++ b/src/compiler/js-builtin-reducer.cc
@@ -132,11 +132,9 @@ Reduction JSBuiltinReducer::ReduceMathImul(Node* node) {
// ES6 draft 08-24-14, section 20.2.2.16.
Reduction JSBuiltinReducer::ReduceMathFloor(Node* node) {
JSCallReduction r(node);
- if (r.InputsMatchOne(Type::Number()) &&
- machine()->Float64RoundDown().IsSupported()) {
- // Math.floor(a:number) -> Float64RoundDown(a)
- Node* value =
- graph()->NewNode(machine()->Float64RoundDown().op(), r.left());
+ if (r.InputsMatchOne(Type::Number())) {
+ // Math.floor(a:number) -> NumberFloor(a)
+ Node* value = graph()->NewNode(simplified()->NumberFloor(), r.left());
return Replace(value);
}
return NoChange();
« no previous file with comments | « no previous file | src/compiler/opcodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698