[llvm] [AMDGPU] Fix isCanonicalized to require canonical input for NaN-propa… (PR #208733)

Wooseok Lee via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 23 11:54:21 PDT 2026


wooseoklee wrote:

> I think these cases from need experimental verification and a test on real hardware (preferably committed to the test suite). I don't know how this post concluded that these operations don't canonicalize.
> 
> This part is also wrong:
> 
> ```
> v_rcp_f32(sNaN), v_rsq_f32(sNaN), v_sqrt_f32(sNaN), v_exp_f32(sNaN), v_log_f32(sNaN) similarly propagate the NaN payload (HW quiet bit may be added but the payload sign and bits beyond the leading mantissa bit are preserved -- not the canonical qNaN pattern).
> ```
> 
> This reads like it's expecting the payload bits must be dropped; but llvm.canonicalize mandates payload bits are preserved

Thanks for pointing this out. I will review them, validate on real hardware, and update the code. 

https://github.com/llvm/llvm-project/pull/208733


More information about the llvm-commits mailing list