trunc_sat instructions must saturate on NaN and out-of-range inputs, but some current implementations appear to be plain trunc (e.g., I32TruncSatF64S uses build_float_to_signed_int without clamping). This can lead to undefined behavior for NaN/out-of-range values.
Affected area:
Expected behavior:
- NaN → 0
- Out-of-range → clamp to min/max
trunc_sat instructions must saturate on NaN and out-of-range inputs, but some current implementations appear to be plain trunc (e.g., I32TruncSatF64S uses build_float_to_signed_int without clamping). This can lead to undefined behavior for NaN/out-of-range values.
Affected area:
Expected behavior: