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

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

Issue 2385393002: [wasm] Implement I32x4ReplaceLane, I32x4Add, I32x4Sub. (Closed)
Patch Set: Bill's review Created 4 years, 2 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 dac9eec7a75a9ee22c49e7ee7ec114822a7f86ef..7877814450f7dca43e08ad7d4044e378b6e4ebcd 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -3019,17 +3019,18 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
case wasm::kExprI32x4Splat:
return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0],
inputs[0], inputs[0], inputs[0]);
- default:
- return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
- }
-}
-
-Node* WasmGraphBuilder::SimdExtractLane(wasm::WasmOpcode opcode, uint8_t lane,
- Node* input) {
- switch (opcode) {
case wasm::kExprI32x4ExtractLane:
- return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(), input,
- Int32Constant(lane));
+ return graph()->NewNode(jsgraph()->machine()->Int32x4ExtractLane(),
+ inputs[0], inputs[1]);
+ case wasm::kExprI32x4ReplaceLane:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4ReplaceLane(),
+ inputs[0], inputs[1], inputs[2]);
+ case wasm::kExprI32x4Add:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4Add(), inputs[0],
+ inputs[1]);
+ case wasm::kExprI32x4Sub:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4Sub(), inputs[0],
+ inputs[1]);
default:
return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
}

Powered by Google App Engine
This is Rietveld 408576698