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

Unified Diff: src/compiler/int64-lowering.cc

Issue 1803453003: [wasm] Int64Lowering of Word64Popcnt. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@arm-shr
Patch Set: Rebase. 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/machine-operator.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/int64-lowering.cc
diff --git a/src/compiler/int64-lowering.cc b/src/compiler/int64-lowering.cc
index 1ef2e2140581afce1c2a9bb02b76d01fd368fffc..a6f355d4f5e90aadab205ed4af07623f3f7d5da2 100644
--- a/src/compiler/int64-lowering.cc
+++ b/src/compiler/int64-lowering.cc
@@ -447,6 +447,21 @@ void Int64Lowering::LowerNode(Node* node) {
// kExprI64Clz:
// kExprI64Ctz:
+ case IrOpcode::kWord64Popcnt: {
+ DCHECK(node->InputCount() == 1);
+ Node* input = node->InputAt(0);
+ // We assume that a Word64Popcnt node only has been created if
+ // Word32Popcnt is actually supported.
+ DCHECK(machine()->Word32Popcnt().IsSupported());
+ ReplaceNode(node, graph()->NewNode(
+ machine()->Int32Add(),
+ graph()->NewNode(machine()->Word32Popcnt().op(),
+ GetReplacementLow(input)),
+ graph()->NewNode(machine()->Word32Popcnt().op(),
+ GetReplacementHigh(input))),
+ graph()->NewNode(common()->Int32Constant(0)));
+ break;
+ }
// kExprI64Popcnt:
default: { DefaultLowering(node); }
« no previous file with comments | « no previous file | src/compiler/machine-operator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698