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

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

Issue 2800523002: [WASM SIMD] Implement packing and unpacking integer conversions. (Closed)
Patch Set: Fix stray edit, clean up some ordering of opcodes. Created 3 years, 8 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 8fd4e69a97984e194bd9dd7d5b06950bec141735..44c0f76d2bbe7ceb3dcb757f96c6ed20d71c6852 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -3244,6 +3244,12 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
case wasm::kExprI32x4UConvertF32x4:
return graph()->NewNode(jsgraph()->machine()->I32x4UConvertF32x4(),
inputs[0]);
+ case wasm::kExprI32x4SConvertI16x8Low:
+ return graph()->NewNode(jsgraph()->machine()->I32x4SConvertI16x8Low(),
+ inputs[0]);
+ case wasm::kExprI32x4SConvertI16x8High:
+ return graph()->NewNode(jsgraph()->machine()->I32x4SConvertI16x8High(),
+ inputs[0]);
case wasm::kExprI32x4Neg:
return graph()->NewNode(jsgraph()->machine()->I32x4Neg(), inputs[0]);
case wasm::kExprI32x4Add:
@@ -3279,6 +3285,12 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
case wasm::kExprI32x4GeS:
return graph()->NewNode(jsgraph()->machine()->I32x4LeS(), inputs[1],
inputs[0]);
+ case wasm::kExprI32x4UConvertI16x8Low:
+ return graph()->NewNode(jsgraph()->machine()->I32x4UConvertI16x8Low(),
+ inputs[0]);
+ case wasm::kExprI32x4UConvertI16x8High:
+ return graph()->NewNode(jsgraph()->machine()->I32x4UConvertI16x8High(),
+ inputs[0]);
case wasm::kExprI32x4MinU:
return graph()->NewNode(jsgraph()->machine()->I32x4MinU(), inputs[0],
inputs[1]);
@@ -3299,8 +3311,17 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
inputs[0]);
case wasm::kExprI16x8Splat:
return graph()->NewNode(jsgraph()->machine()->I16x8Splat(), inputs[0]);
+ case wasm::kExprI16x8SConvertI8x16Low:
+ return graph()->NewNode(jsgraph()->machine()->I16x8SConvertI8x16Low(),
+ inputs[0]);
+ case wasm::kExprI16x8SConvertI8x16High:
+ return graph()->NewNode(jsgraph()->machine()->I16x8SConvertI8x16High(),
+ inputs[0]);
case wasm::kExprI16x8Neg:
return graph()->NewNode(jsgraph()->machine()->I16x8Neg(), inputs[0]);
+ case wasm::kExprI16x8SConvertI32x4:
+ return graph()->NewNode(jsgraph()->machine()->I16x8SConvertI32x4(),
+ inputs[0], inputs[1]);
case wasm::kExprI16x8Add:
return graph()->NewNode(jsgraph()->machine()->I16x8Add(), inputs[0],
inputs[1]);
@@ -3340,6 +3361,15 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
case wasm::kExprI16x8GeS:
return graph()->NewNode(jsgraph()->machine()->I16x8LeS(), inputs[1],
inputs[0]);
+ case wasm::kExprI16x8UConvertI8x16Low:
+ return graph()->NewNode(jsgraph()->machine()->I16x8UConvertI8x16Low(),
+ inputs[0]);
+ case wasm::kExprI16x8UConvertI8x16High:
+ return graph()->NewNode(jsgraph()->machine()->I16x8UConvertI8x16High(),
+ inputs[0]);
+ case wasm::kExprI16x8UConvertI32x4:
+ return graph()->NewNode(jsgraph()->machine()->I16x8UConvertI32x4(),
+ inputs[0], inputs[1]);
case wasm::kExprI16x8AddSaturateU:
return graph()->NewNode(jsgraph()->machine()->I16x8AddSaturateU(),
inputs[0], inputs[1]);
@@ -3368,6 +3398,9 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
return graph()->NewNode(jsgraph()->machine()->I8x16Splat(), inputs[0]);
case wasm::kExprI8x16Neg:
return graph()->NewNode(jsgraph()->machine()->I8x16Neg(), inputs[0]);
+ case wasm::kExprI8x16SConvertI16x8:
+ return graph()->NewNode(jsgraph()->machine()->I8x16SConvertI16x8(),
+ inputs[0], inputs[1]);
case wasm::kExprI8x16Add:
return graph()->NewNode(jsgraph()->machine()->I8x16Add(), inputs[0],
inputs[1]);
@@ -3407,6 +3440,9 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
case wasm::kExprI8x16GeS:
return graph()->NewNode(jsgraph()->machine()->I8x16LeS(), inputs[1],
inputs[0]);
+ case wasm::kExprI8x16UConvertI16x8:
+ return graph()->NewNode(jsgraph()->machine()->I8x16UConvertI16x8(),
+ inputs[0], inputs[1]);
case wasm::kExprI8x16AddSaturateU:
return graph()->NewNode(jsgraph()->machine()->I8x16AddSaturateU(),
inputs[0], inputs[1]);

Powered by Google App Engine
This is Rietveld 408576698