Commit 33e6ac5d authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd][scalar-lowering] Lower simd before int64

SIMD lowering can result in int64 nodes (from i64x2), and int64 nodes
won't create SIMD nodes. So run SIMD lowering first, then int64
lowering.

Bug: v8:10507
Change-Id: Id720d98eda0bcd9ab441df687f974fd84bf9118c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2393497Reviewed-by: 's avatarBill Budge <bbudge@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#69756}
parent ff9cc7e0
......@@ -7420,8 +7420,8 @@ bool BuildGraphForWasmFunction(AccountingAllocator* allocator,
return false;
}
builder.LowerInt64(WasmWrapperGraphBuilder::kCalledFromWasm);
// Lower SIMD first, i64x2 nodes will be lowered to int64 nodes, then int64
// lowering will take care of them.
if (builder.has_simd() &&
(!CpuFeatures::SupportsWasmSimd128() || env->lower_simd)) {
SimdScalarLowering(
......@@ -7430,6 +7430,8 @@ bool BuildGraphForWasmFunction(AccountingAllocator* allocator,
.LowerGraph();
}
builder.LowerInt64(WasmWrapperGraphBuilder::kCalledFromWasm);
if (func_index >= FLAG_trace_wasm_ast_start &&
func_index < FLAG_trace_wasm_ast_end) {
PrintRawWasmCode(allocator, func_body, env->module, wasm::kPrintLocals);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment