[llvm] [BasicAA] Add Vscale GEP decomposition on variable index (PR #69152)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 14 14:16:20 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()))
----------------
davemgreen wrote:
We were trying to keep the first version simpler, getting the basics working without vscale range before adding it in the future.
https://github.com/llvm/llvm-project/pull/69152
More information about the llvm-commits
mailing list