[llvm] [BasicAA] Account for wrapping when using abs(Scale*V0 + (-Scale)*V1) >= abs(Scale) (PR #137755)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 29 00:32:07 PDT 2025
================
@@ -1345,7 +1346,8 @@ AliasResult BasicAAResult::aliasGEP(
SimplifyQuery(DL, DT, &AC, /*CxtI=*/Var0.CxtI
? Var0.CxtI
: Var1.CxtI)))
- MinAbsVarIndex = Var0.Scale.abs();
+ if (MultiplyByScaleNoWrap(Var0) && MultiplyByScaleNoWrap(Var1))
----------------
nikic wrote:
Move this check before the isKnownNonEqual() call, as it's cheaper?
https://github.com/llvm/llvm-project/pull/137755
More information about the llvm-commits
mailing list