[llvm] [LoopAccessAnalysis] Fix type mismatch (PR #183116)
Kshitij Paranjape via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 3 01:28:26 PST 2026
================
@@ -250,8 +250,13 @@ static bool evaluatePtrAddRecAtMaxBTCWillNotWrap(
return true;
});
if (DerefRK) {
- DerefBytesSCEV =
- SE.getUMaxExpr(DerefBytesSCEV, SE.getSCEV(DerefRK.IRArgValue));
+ const SCEV *DerefRKSCEV = SE.getSCEV(DerefRK.IRArgValue);
+ // Ensure both operands have the same type
+ Type *CommonTy =
+ SE.getWiderType(DerefBytesSCEV->getType(), DerefRKSCEV->getType());
+ DerefBytesSCEV = SE.getNoopOrAnyExtend(DerefBytesSCEV, CommonTy);
+ DerefRKSCEV = SE.getNoopOrAnyExtend(DerefRKSCEV, CommonTy);
----------------
kshitijvp wrote:
done
https://github.com/llvm/llvm-project/pull/183116
More information about the llvm-commits
mailing list