👋 Hey,
In RISC-V almost all floating point instructions return a canonical NaN when its result would be a NaN. In cranelift we have a separate pass that includes some NaN normalization code when the enable_nan_canonicalization flag is enabled. RISC-V's canonical NaN pattern is also defined to be the same as WASM's canonical NaN.
This isn't really required for RISC-V and just causes additional overhead, so it would be nice if we could disable it. This thought occurred to me while reading #7321 which might make that easier by querying each backend and applying those legalization rules conditionally.
👋 Hey,
In RISC-V almost all floating point instructions return a canonical NaN when its result would be a NaN. In cranelift we have a separate pass that includes some NaN normalization code when the
enable_nan_canonicalizationflag is enabled. RISC-V's canonical NaN pattern is also defined to be the same as WASM's canonical NaN.This isn't really required for RISC-V and just causes additional overhead, so it would be nice if we could disable it. This thought occurred to me while reading #7321 which might make that easier by querying each backend and applying those legalization rules conditionally.