[llvm] [AMDGPU] prevent shrinking udiv/urem if operands exceed smax_bitwidth (PR #116733)

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 19 01:49:05 PST 2024


https://github.com/jayfoad commented:

I think it would make more sense for this function to have separate paths for signed (based on computeNumSignBits) and unsigned (based on leading zeros, from computeKnownBits). The way it is written now, the unsigned case will potentially call _both_ computeKnownBits and computeNumSignBits on both arguments, which seems like overkill.

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


More information about the llvm-commits mailing list