[llvm] "Reapply "[AMDGPU] prevent shrinking udiv/urem if either oper… (PR #119325)
via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 10 08:11:37 PST 2024
================
@@ -1220,7 +1236,7 @@ Value *AMDGPUCodeGenPrepareImpl::expandDivRem24(IRBuilder<> &Builder,
// If Num bits <= 24, assume 0 signbits.
unsigned AtLeast = (SSBits <= 24) ? 0 : (SSBits - 24 + IsSigned);
int DivBits = getDivNumBits(I, Num, Den, AtLeast, IsSigned);
- if (DivBits == -1)
+ if (DivBits == -1 || DivBits > 24)
----------------
choikwa wrote:
Took this advice and reworked the getDivNumBits as advised. Will submit shortly after verifying tests.
https://github.com/llvm/llvm-project/pull/119325
More information about the llvm-commits
mailing list