pervognsen, (edited ) I was glancing over Cranelift's NaN canonicalization pass: https://github.com/bytecodealliance/wasmtime/blob/main/cranelift/codegen/src/nan_canonicalization.rs
I'd love to get someone's opinion on this but I believe a lot of these instructions don't need to be canonicalized. Differences between NaNs don't seem to be internally observable in the Wasm model of floats until a float is stored back to memory or bitcast to an integer at which point the particular IEEE-754 bit pattern becomes observable. E.g. sNANs are non-trapping and there's no fetestexcept() equivalent.