[llvm] [AMDGPU] Implement int div/rem by fp recip more efficiently (PR #204950)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 24 06:35:31 PDT 2026
LU-JOHN wrote:
> > Incrementing `fa` by 1 ulp was exhaustively tested for all dividend and divisor combinations with values between [0x200000,0x1FFFFF] with no errors.
>
> And are there cases where it fails if you test the next larger range -0x400000 to 0x3FFFFF ?
I hit a failure in the next larger range [-0x400000, 0x3FFFFF] in an earlier implementation where recip(fb) was incremented. I'm retesting the larger range with the current implementation (i.e. where fa is increased by 1ulp). I chose to increment fa rather than recip(fb) because the justification is clearer.
https://github.com/llvm/llvm-project/pull/204950
More information about the llvm-commits
mailing list