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

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

Issue 2294743003: [wasm] simd scalar lowering F32x4Add and I32x4Add (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 4 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 30c545ec515bb07c2459b52b11dc25d3e1fcedd9..4dd02a947da0e8769b2dc692f3bbe83c314770d3 100644
--- a/src/compiler/wasm-compiler.cc
+++ b/src/compiler/wasm-compiler.cc
@@ -24,6 +24,7 @@
#include "src/compiler/machine-operator.h"
#include "src/compiler/node-matchers.h"
#include "src/compiler/pipeline.h"
+#include "src/compiler/simd-scalar-lowering.h"
#include "src/compiler/source-position.h"
#include "src/compiler/zone-pool.h"
@@ -2883,6 +2884,18 @@ Node* WasmGraphBuilder::SimdOp(wasm::WasmOpcode opcode,
case wasm::kExprI32x4Splat:
return graph()->NewNode(jsgraph()->machine()->CreateInt32x4(), inputs[0],
inputs[0], inputs[0], inputs[0]);
+ case wasm::kExprI32x4Add:
+ return graph()->NewNode(jsgraph()->machine()->Int32x4Add(), inputs[0],
+ inputs[1]);
+ case wasm::kExprF32x4ExtractLane:
+ return graph()->NewNode(jsgraph()->machine()->Float32x4ExtractLane(),
+ inputs[0], inputs[1]);
+ case wasm::kExprF32x4Splat:
+ return graph()->NewNode(jsgraph()->machine()->CreateFloat32x4(),
+ inputs[0], inputs[0], inputs[0], inputs[0]);
+ case wasm::kExprF32x4Add:
+ return graph()->NewNode(jsgraph()->machine()->Float32x4Add(), inputs[0],
+ inputs[1]);
default:
return graph()->NewNode(UnsupportedOpcode(opcode), nullptr);
}
@@ -3098,6 +3111,10 @@ SourcePositionTable* WasmCompilationUnit::BuildGraphForWasmFunction(
r.LowerGraph();
}
+ SimdScalarLowering r(graph, machine, common, jsgraph_->zone(),
bradnelson 2016/08/31 22:42:08 -> SimdScalarLowering(graph, machine, common, jsgr
aseemgarg 2016/10/10 17:35:17 Done.
+ function_->sig);
+ r.LowerGraph();
+
int index = static_cast<int>(function_->func_index);
if (index >= FLAG_trace_wasm_ast_start && index < FLAG_trace_wasm_ast_end) {

Powered by Google App Engine
This is Rietveld 408576698