diff --git a/test/correctness/simd_op_check.h b/test/correctness/simd_op_check.h index bb48ce12ce5f..53af05c5795f 100644 --- a/test/correctness/simd_op_check.h +++ b/test/correctness/simd_op_check.h @@ -327,6 +327,9 @@ class SimdOpCheckTest { // Include a scalar version Halide::Func f_scalar("scalar_" + name); f_scalar(x, y) = e; + // Make sure scalar result is computed independently to prevent it + // from being fused into error() by optimization which complicates floating point errors. + f_scalar.compute_root(); if (has_inline_reduction.result) { // If there's an inline reduction, we want to vectorize it diff --git a/test/correctness/simd_op_check_wasm.cpp b/test/correctness/simd_op_check_wasm.cpp index 36434a8e8a8a..0fa8dd7c7ac5 100644 --- a/test/correctness/simd_op_check_wasm.cpp +++ b/test/correctness/simd_op_check_wasm.cpp @@ -385,11 +385,11 @@ class SimdOpCheckWASM : public SimdOpCheckTest { // check("v128.load32_zero", 2 * w, in_u32(0)); // check("v128.load64_zero", 2 * w, in_u64(0)); - // Load vector with identical lanes generates *.splat. - check("i8x16.splat", 16 * w, in_u8(0)); - check("i16x8.splat", 8 * w, in_u16(0)); - check("i32x4.splat", 4 * w, in_u32(0)); - check("i64x2.splat", 2 * w, in_u64(0)); + // Load vector with identical lanes generates load*_splat. + check("v128.load8_splat", 16 * w, in_u8(0)); + check("v128.load16_splat", 8 * w, in_u16(0)); + check("v128.load32_splat", 4 * w, in_u32(0)); + check("v128.load64_splat", 2 * w, in_u64(0)); // Load Lane // TODO: does Halide have any idiom that obviously generates these?