diff --git a/test/correctness/simd_op_check.h b/test/correctness/simd_op_check.h index 16bd60d836a8..5a61df34252e 100644 --- a/test/correctness/simd_op_check.h +++ b/test/correctness/simd_op_check.h @@ -350,22 +350,22 @@ class SimdOpCheckTest { .vectorize(xi); } - // We'll check over H rows, but we won't let the pipeline know H - // statically, as that can trigger some simplifications that change - // instruction selection. - Param rows; - rows.set(H); - arg_types.push_back(rows); - - // The output to the pipeline is the maximum absolute difference as a double. - RDom r_check(0, W, 0, rows); - Halide::Func error("error_" + name); - error() = Halide::cast(maximum(absd(f(r_check.x, r_check.y), f_scalar(r_check.x, r_check.y)))); - - compile_and_check(error, op, name, vector_width, arg_types, error_msg); + compile_and_check(f, op, name, vector_width, arg_types, error_msg); bool can_run_the_code = can_run_code(); if (can_run_the_code) { + // We'll check over H rows, but we won't let the pipeline know H + // statically, as that can trigger some simplifications that change + // instruction selection. + Param rows; + rows.set(H); + arg_types.push_back(rows); + + // The output to the pipeline is the maximum absolute difference as a double. + RDom r_check(0, W, 0, rows); + Halide::Func error("error_" + name); + error() = Halide::cast(maximum(absd(f(r_check.x, r_check.y), f_scalar(r_check.x, r_check.y)))); + Target run_target = get_run_target(); // Make some unallocated input buffers diff --git a/test/correctness/simd_op_check_x86.cpp b/test/correctness/simd_op_check_x86.cpp index 0850d8f02bbc..91f8b664b6f4 100644 --- a/test/correctness/simd_op_check_x86.cpp +++ b/test/correctness/simd_op_check_x86.cpp @@ -414,8 +414,8 @@ class SimdOpCheckX86 : public SimdOpCheckTest { // Some llvm's don't use kandw, but instead predicate the computation of bool_2 // using the result of bool_1 // check(use_avx512 ? "kandw" : "vandps", 8, bool_1 & bool_2); - check(use_avx512 ? "korw" : "vorps", 8, bool_1 | bool_2); - check(use_avx512 ? "kxorw" : "vxorps", 8, bool_1 ^ bool_2); + check(use_avx512 ? "korb" : "vorps", 8, bool_1 | bool_2); + check(use_avx512 ? "kxorb" : "vxorps", 8, bool_1 ^ bool_2); check("vaddps*ymm", 8, f32_1 + f32_2); check("vaddpd*ymm", 4, f64_1 + f64_2);