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

Unified Diff: src/compiler/wasm-compiler.cc

Issue 2112733003: [turbofan] Allow OptionalOperator to return a placeholder. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 6 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/unittests/compiler/int64-lowering-unittest.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 dfd05d4c1cc8156c05a74476c6da68a9c307eee2..e7508c26ddffe32340289b2ed64342fb4d809590 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -823,11 +823,12 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input,
op = m->Word64Clz();
break;
case wasm::kExprI64Ctz: {
- if (m->Word64Ctz().IsSupported()) {
- op = m->Word64Ctz().op();
+ OptionalOperator ctz64 = m->Word64Ctz();
+ if (ctz64.IsSupported()) {
+ op = ctz64.op();
break;
} else if (m->Is32() && m->Word32Ctz().IsSupported()) {
- op = m->Word64CtzPlaceholder();
+ op = ctz64.placeholder();
break;
} else if (m->Word64ReverseBits().IsSupported()) {
Node* reversed = graph()->NewNode(m->Word64ReverseBits().op(), input);
@@ -838,10 +839,11 @@ Node* WasmGraphBuilder::Unop(wasm::WasmOpcode opcode, Node* input,
}
}
case wasm::kExprI64Popcnt: {
- if (m->Word64Popcnt().IsSupported()) {
- op = m->Word64Popcnt().op();
+ OptionalOperator popcnt64 = m->Word64Popcnt();
+ if (popcnt64.IsSupported()) {
+ op = popcnt64.op();
} else if (m->Is32() && m->Word32Popcnt().IsSupported()) {
- op = m->Word64PopcntPlaceholder();
+ op = popcnt64.placeholder();
} else {
return BuildI64Popcnt(input);
}
« no previous file with comments | « src/compiler/machine-operator.cc ('k') | test/unittests/compiler/int64-lowering-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698