Commit cca27377 authored by Ng Zhi An's avatar Ng Zhi An Committed by Commit Bot

[wasm-simd] Improve f64x2.convert_low_i32x4 tests

Zero top lanes to ensure that we convert the low lanes of i32x4.

Bug: v8:11265
Change-Id: Id53b65bada406c967c692b584210d4168e2c9183
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2776511Reviewed-by: 's avatarDeepti Gandluri <gdeepti@chromium.org>
Commit-Queue: Zhi An Ng <zhin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#73587}
parent 7b4bae3a
......@@ -908,12 +908,15 @@ void RunF64x2ConvertLowI32x4Test(TestExecutionTier execution_tier,
LowerSimd lower_simd, WasmOpcode opcode) {
WasmRunner<int32_t, SrcType> r(execution_tier, lower_simd);
double* g = r.builder().template AddGlobal<double>(kWasmS128);
// TODO(zhin): set top lanes to 0 to assert conversion happens on low lanes.
BUILD(
r,
WASM_GLOBAL_SET(
0, WASM_SIMD_UNOP(opcode, WASM_SIMD_I32x4_SPLAT(WASM_LOCAL_GET(0)))),
WASM_ONE);
BUILD(r,
WASM_GLOBAL_SET(
0,
WASM_SIMD_UNOP(
opcode,
// Set top lane of i64x2 == set top 2 lanes of i32x4.
WASM_SIMD_I64x2_REPLACE_LANE(
1, WASM_SIMD_I32x4_SPLAT(WASM_LOCAL_GET(0)), WASM_ZERO64))),
WASM_ONE);
for (SrcType x : compiler::ValueHelper::GetVector<SrcType>()) {
r.Call(x);
......
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