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

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

Issue 2923103003: [WASM] Simplify SIMD shuffle opcodes. (Closed)
Patch Set: De-comment-out irregular shuffle code. Created 3 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
Index: src/compiler/wasm-compiler.cc
diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc
index a5b1433fc3bbc2cab8de73f3f626db45c8a982d1..5d719596c9fc34d8651fcccd38c517f101d5ef1c 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -3573,22 +3573,11 @@ Node* WasmGraphBuilder::SimdShiftOp(wasm::WasmOpcode opcode, uint8_t shift,
}
}
-Node* WasmGraphBuilder::SimdShuffleOp(uint8_t shuffle[16], unsigned lanes,
- const NodeVector& inputs) {
+Node* WasmGraphBuilder::Simd8x16ShuffleOp(uint8_t shuffle[16],
+ const NodeVector& inputs) {
has_simd_ = true;
- switch (lanes) {
- case 4:
- return graph()->NewNode(jsgraph()->machine()->S32x4Shuffle(shuffle),
- inputs[0], inputs[1]);
- case 8:
- return graph()->NewNode(jsgraph()->machine()->S16x8Shuffle(shuffle),
- inputs[0], inputs[1]);
- case 16:
- return graph()->NewNode(jsgraph()->machine()->S8x16Shuffle(shuffle),
- inputs[0], inputs[1]);
- default:
- UNREACHABLE();
- }
+ return graph()->NewNode(jsgraph()->machine()->S8x16Shuffle(shuffle),
+ inputs[0], inputs[1]);
}
static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag,

Powered by Google App Engine
This is Rietveld 408576698