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

Unified Diff: src/compiler/wasm-compiler.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 | « src/compiler/machine-operator.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index 5b1ff409ad20e0bd9542d6b31ab355226d7bdded..73a140a9ced509fe0c22811a2e0644bd58dc8d16 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -834,6 +834,16 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input) {
// kExprI64Clz:
// kExprI64Ctz:
// kExprI64Popcnt:
+ case wasm::kExprI64Popcnt: {
+ if (m->Word64Popcnt().IsSupported()) {
+ op = m->Word64Popcnt().op();
+ } else if (m->Is32() && m->Word32Popcnt().IsSupported()) {
+ op = m->Word64PopcntPlaceholder();
+ } else {
+ return BuildI64Popcnt(input);
+ }
+ break;
+ }
// kExprF32SConvertI64:
case wasm::kExprI64Eqz:
op = m->Word64Equal();
@@ -905,14 +915,6 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input) {
return BuildI64Ctz(input);
}
}
- case wasm::kExprI64Popcnt: {
- if (m->Word64Popcnt().IsSupported()) {
- op = m->Word64Popcnt().op();
- break;
- } else {
- return BuildI64Popcnt(input);
- }
- }
#endif
default:
op = UnsupportedOpcode(opcode);
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | test/cctest/wasm/test-run-wasm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698