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

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

Issue 2683713003: [Turbofan] Add more non-arithmetic SIMD operations. (Closed)
Patch Set: Rebase. Created 3 years, 10 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/wasm-compiler.h ('k') | src/wasm/wasm-macro-gen.h » ('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 9754bd6805f716748a8a25dc7ae256aa6ff46990..b461e2fab7c90eca9823f5180241620a856b53fb 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -3443,9 +3443,6 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
return graph()->NewNode(
jsgraph()->machine()->Uint32x4GreaterThanOrEqual(), inputs[0],
inputs[1]);
- case wasm::kExprS32x4Select:
- return graph()->NewNode(jsgraph()->machine()->Simd32x4Select(), inputs[0],
- inputs[1], inputs[2]);
case wasm::kExprI16x8Splat:
return graph()->NewNode(jsgraph()->machine()->CreateInt16x8(), inputs[0],
inputs[0], inputs[0], inputs[0], inputs[0],
@@ -3590,6 +3587,26 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
return graph()->NewNode(
jsgraph()->machine()->Uint8x16GreaterThanOrEqual(), inputs[0],
inputs[1]);
+ case wasm::kExprS32x4Select:
+ return graph()->NewNode(jsgraph()->machine()->Simd32x4Select(), inputs[0],
+ inputs[1], inputs[2]);
+ case wasm::kExprS16x8Select:
+ return graph()->NewNode(jsgraph()->machine()->Simd16x8Select(), inputs[0],
+ inputs[1], inputs[2]);
+ case wasm::kExprS8x16Select:
+ return graph()->NewNode(jsgraph()->machine()->Simd8x16Select(), inputs[0],
+ inputs[1], inputs[2]);
+ case wasm::kExprS128And:
+ return graph()->NewNode(jsgraph()->machine()->Simd128And(), inputs[0],
+ inputs[1]);
+ case wasm::kExprS128Or:
+ return graph()->NewNode(jsgraph()->machine()->Simd128Or(), inputs[0],
+ inputs[1]);
+ case wasm::kExprS128Xor:
+ return graph()->NewNode(jsgraph()->machine()->Simd128Xor(), inputs[0],
+ inputs[1]);
+ case wasm::kExprS128Not:
+ return graph()->NewNode(jsgraph()->machine()->Simd128Not(), inputs[0]);
default:
return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
}
@@ -3664,6 +3681,24 @@ Node* WasmGraphBuilder::SimdShiftOp(wasm::WasmOpcode opcode, uint8_t shift,
}
}
+Node* WasmGraphBuilder::SimdSwizzleOp(wasm::WasmOpcode opcode, uint32_t swizzle,
+ const NodeVector& inputs) {
+ has_simd_ = true;
+ switch (opcode) {
+ case wasm::kExprS32x4Swizzle:
+ return graph()->NewNode(jsgraph()->machine()->Simd32x4Swizzle(swizzle),
+ inputs[0]);
+ case wasm::kExprS16x8Swizzle:
+ return graph()->NewNode(jsgraph()->machine()->Simd16x8Swizzle(swizzle),
+ inputs[0]);
+ case wasm::kExprS8x16Swizzle:
+ return graph()->NewNode(jsgraph()->machine()->Simd8x16Swizzle(swizzle),
+ inputs[0]);
+ default:
+ return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
+ }
+}
+
static void RecordFunctionCompilation(CodeEventListener::LogEventsAndTags tag,
Isolate* isolate, Handle<Code> code,
const char* message, uint32_t index,
« no previous file with comments | « src/compiler/wasm-compiler.h ('k') | src/wasm/wasm-macro-gen.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698