Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions scripts/fuzz_opt.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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])
Expand Down
3 changes: 2 additions & 1 deletion src/ir/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
Loading