7494f71c70
The mid-tier register allocator did not handle block merges correctly where a SIMD register was partially overlapping with a non-SIMD register. This CL fixes that, and reorders the code to allow for early exits. R=mslekova@chromium.org Bug: chromium:1282224, v8:12330 Change-Id: I2e9275d5c1aaa764ecb63fbf8fa197b68d6b6c3c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3358294 Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Clemens Backes <clemensb@chromium.org> Cr-Commit-Position: refs/heads/main@{#78482}
32 lines
1.4 KiB
JavaScript
32 lines
1.4 KiB
JavaScript
// Copyright 2022 the V8 project authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style license that can be
|
|
// found in the LICENSE file.
|
|
|
|
// Flags: --no-liftoff --turbo-force-mid-tier-regalloc
|
|
|
|
d8.file.execute('test/mjsunit/wasm/wasm-module-builder.js');
|
|
|
|
const builder = new WasmModuleBuilder();
|
|
builder.addType(makeSig([kWasmI32, kWasmI32, kWasmI32], [kWasmI32]));
|
|
builder.addFunction(undefined, 0 /* sig */)
|
|
.addLocals(kWasmS128, 2)
|
|
.addBody([
|
|
...wasmF32Const(0), // f32.const
|
|
...wasmI32Const(0), // f32.const
|
|
kExprF32SConvertI32, // f32.convert_i32_s
|
|
kExprLocalGet, 3, // local.get
|
|
kSimdPrefix, kExprI64x2AllTrue, 0x01, // i64x2.all_true
|
|
kExprSelect, // select
|
|
kExprLocalGet, 4, // local.get
|
|
...wasmS128Const(new Array(16).fill(0)), // s128.const
|
|
kSimdPrefix, kExprI8x16Eq, // i8x16.eq
|
|
kSimdPrefix, kExprI64x2AllTrue, 0x01, // i64x2.all_true
|
|
kExprF32SConvertI32, // f32.convert_i32_s
|
|
...wasmS128Const(new Array(16).fill(0)), // s128.const
|
|
kSimdPrefix, kExprI64x2AllTrue, 0x01, // i64x2.all_true
|
|
kExprSelect, // select
|
|
kExprF32Const, 0x00, 0x00, 0x80, 0x3f, // f32.const
|
|
kExprF32Ge, // f32.ge
|
|
]);
|
|
builder.toModule();
|