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

Unified Diff: src/compiler/js-intrinsic-lowering.cc

Issue 990963003: [turbofan] Unify Math.floor / Math.ceil optimization. (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 | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-intrinsic-lowering.cc
diff --git a/src/compiler/js-intrinsic-lowering.cc b/src/compiler/js-intrinsic-lowering.cc
index 171b36e8d2300cac891fddaa7bbedf8b88cc62bf..317421f4ee2c0a93ffe48be7c0b34b6802e224c4 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -40,6 +40,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceInlineDoubleHi(node);
case Runtime::kInlineIsRegExp:
return ReduceInlineIsInstanceType(node, JS_REGEXP_TYPE);
+ case Runtime::kInlineMathFloor:
+ return ReduceInlineMathFloor(node);
case Runtime::kInlineValueOf:
return ReduceInlineValueOf(node);
default:
@@ -162,6 +164,12 @@ Reduction JSIntrinsicLowering::ReduceInlineIsInstanceType(
}
+Reduction JSIntrinsicLowering::ReduceInlineMathFloor(Node* node) {
+ if (!machine()->HasFloat64RoundDown()) return NoChange();
+ return Change(node, machine()->Float64RoundDown());
+}
+
+
Reduction JSIntrinsicLowering::ReduceInlineValueOf(Node* node) {
// if (%_IsSmi(value)) {
// return value;
« no previous file with comments | « src/compiler/js-intrinsic-lowering.h ('k') | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698