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

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

Issue 1021183002: [turbofan] Turn Math.clz32 into an inlinable builtin. (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 a3d27ee1a5b98a5e7e9d61c47b8a39682ad1be74..8879ebc8d92ff2a646da5550ee53af8988f61baf 100644
--- a/src/compiler/js-intrinsic-lowering.cc
+++ b/src/compiler/js-intrinsic-lowering.cc
@@ -42,6 +42,8 @@ Reduction JSIntrinsicLowering::Reduce(Node* node) {
return ReduceInlineDoubleHi(node);
case Runtime::kInlineIsRegExp:
return ReduceInlineIsInstanceType(node, JS_REGEXP_TYPE);
+ case Runtime::kInlineMathClz32:
+ return ReduceInlineMathClz32(node);
case Runtime::kInlineMathFloor:
return ReduceInlineMathFloor(node);
case Runtime::kInlineMathSqrt:
@@ -179,6 +181,11 @@ Reduction JSIntrinsicLowering::ReduceInlineIsInstanceType(
}
+Reduction JSIntrinsicLowering::ReduceInlineMathClz32(Node* node) {
+ return Change(node, machine()->Word32Clz());
+}
+
+
Reduction JSIntrinsicLowering::ReduceInlineMathFloor(Node* node) {
if (!machine()->HasFloat64RoundDown()) return NoChange();
return Change(node, machine()->Float64RoundDown());
« 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