afonso360 requested elliottt for a review on PR #8360.
afonso360 requested wasmtime-compiler-reviewers for a review on PR #8360.
afonso360 opened PR #8360 from afonso360:fuzzgen-use-correct-target-isa
to bytecodealliance:main
:
:wave: Hey,
cranelift-fuzzgen unconditionally runs the NaN Canonicalization pass on all functions that it generates. This is so that we can ensure that when running in the interpreter vs natively we get the same bitpattern for all NaN's.
Until now we just picked a random ISA (the host ISA), disabled the verifier and ran the pass with that. This was because the ISA didn't really matter for the passes that we wanted to run.
In #8313 the ISA now drives some codegen decisions for the NaN Canonicalization pass. Namely, if the ISA supports Vectors, it tries to use that.
In #8359 a fuzz bug was reported where fuzzgen generated vector code for RISC-V without the
has_v
flag, something that should never happen, because we simply cannot compile that code.It turns out that fuzzgen did not generate vector code itself. But since we were passing the host ISA to the NaN canonicalization pass, it assumed that it could use vectors and did so. But the actual target ISA did not support vectors.
To fix this, we now correctly pass the target ISA that we are building a function for.
Fixes #8359
elliottt submitted PR review:
Looks good to me!
alexcrichton merged PR #8360.
Last updated: Dec 23 2024 at 12:05 UTC