[llvm] [BasicAA] Add Vscale GEP decomposition on variable index (PR #69152)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 07:27:44 PST 2024
================
@@ -1180,10 +1259,17 @@ AliasResult BasicAAResult::aliasGEP(
else
GCD = APIntOps::GreatestCommonDivisor(GCD, ScaleForGCD.abs());
- ConstantRange CR = computeConstantRange(Index.Val.V, /* ForSigned */ false,
- true, &AC, Index.CxtI);
- KnownBits Known =
- computeKnownBits(Index.Val.V, DL, 0, &AC, Index.CxtI, DT);
+ // FIXME: This could be expanded to use a more precise range for vscale.
+ ConstantRange CR =
+ Index.IsVScale
+ ? ConstantRange::getNonEmpty(
+ APInt(OffsetRange.getBitWidth(), 1),
+ APInt::getMaxValue(OffsetRange.getBitWidth()))
----------------
nikic wrote:
You can use getVScaleRange() here.
https://github.com/llvm/llvm-project/pull/69152
More information about the llvm-commits
mailing list