diff --git a/scripts/fuzz_opt.py b/scripts/fuzz_opt.py index a36282c17fc..7261691761d 100755 --- a/scripts/fuzz_opt.py +++ b/scripts/fuzz_opt.py @@ -864,9 +864,11 @@ def can_run(self, wasm): @override def can_compare_to_self(self): - # With nans, VM differences can confuse us, so only very simple VMs - # can compare to themselves after opts in that case. - return not NANS + # With nans or relaxed SIMD, VM differences can confuse us, including + # differences between binaryen and V8 (binaryen's behavior can get + # "baked" into the wasm when it precomputes code, so we cannot compare + # V8's output before binaryen opts and after binaryen opts). + return not NANS and all_disallowed(['relaxed-simd']) @override def can_compare_to_other(self, other): @@ -2048,10 +2050,11 @@ def handle(self, wasm): compare(output, optimized_output, 'Two-Opt') # If we can, also test in V8. We also cannot compare if there are NaNs - # (as optimizations can lead to different outputs), and we must - # disallow some features. + # or relaxed SIMD (as binaryen optimizations can lead to different + # outputs from V8), and we must disallow features that don't even work + # in V8. # TODO: relax some of these - if NANS or not all_disallowed(DISALLOWED_FEATURES_IN_V8): + if NANS or not all_disallowed(['relaxed-simd']) or not all_disallowed(DISALLOWED_FEATURES_IN_V8): return output = run_d8_wasm(wasm, args=[second_wasm]) diff --git a/src/ir/features.h b/src/ir/features.h index 315e275d65a..42e4c9ee8ed 100644 --- a/src/ir/features.h +++ b/src/ir/features.h @@ -173,7 +173,8 @@ inline FeatureSet get(BinaryOp op) { case RelaxedMinVecF64x2: case RelaxedMaxVecF64x2: case RelaxedSwizzleVecI8x16: - case RelaxedQ15MulrSVecI16x8: { + case RelaxedQ15MulrSVecI16x8: + case RelaxedDotI8x16I7x16SToVecI16x8: { ret.setSIMD(); ret.setRelaxedSIMD(); break;