[llvm] [AMDGPU] Fix performFMACombine FDOT2 fold ignoring denormal mode and signed zero (PR #205101)
Wooseok Lee via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 22 07:46:09 PDT 2026
wooseoklee wrote:
> > > It wouldn't surprise me if this instruction didn't read the denormal mode, but I would be more surprised it didn't respect signed zero
> >
> >
> > I will update the code such that it respects sign of zero.
>
> This was a question of hardware behavior, not the code. You should verify this on real hardware and not take the bug at face value
Thanks !! You are right. I added the nsz requirement based on the assumption that under PreserveSign mode, v_fma_mix_f32 flushes negative denormals to -0.0 while v_dot2c always flushes to +0.0. However, hardware testing on gfx90a showed that both v_fma_mix_f32 and v_dot2c produce +0.0 for a negative f32 denormal under PreserveSign mode. The sign difference we assumed doesn't exist in practice. I will remove the nsz requirement.
https://github.com/llvm/llvm-project/pull/205101
More information about the llvm-commits
mailing list