diff options
author | Eli Friedman <efriedma@quicinc.com> | 2020-03-13 16:12:45 -0700 |
---|---|---|
committer | Eli Friedman <efriedma@quicinc.com> | 2020-03-13 16:12:45 -0700 |
commit | 65fc706ddfd758ebecc2f6c991eee3a6efde66a5 (patch) | |
tree | 64b3ecff7cfebd38cf6e80ec7bfeeb70c3300ef1 /llvm/lib/Analysis/ValueTracking.cpp | |
parent | ad7b930bd18a434cfc4114fdb4075652dd6b1660 (diff) | |
download | llvm-65fc706ddfd758ebecc2f6c991eee3a6efde66a5.zip llvm-65fc706ddfd758ebecc2f6c991eee3a6efde66a5.tar.gz llvm-65fc706ddfd758ebecc2f6c991eee3a6efde66a5.tar.bz2 |
[SCEV] Add support for GEPs over scalable vectors.
Because we have to use a ConstantExpr at some point, the canonical form
isn't set in stone, but this seems reasonable.
The pretty sizeof(<vscale x 4 x i32>) dumping is a relic of ancient
LLVM; I didn't have to touch that code. :)
Differential Revision: https://reviews.llvm.org/D75887
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
-rw-r--r-- | llvm/lib/Analysis/ValueTracking.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 81204fd..1a22530501 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -1447,7 +1447,7 @@ static void computeKnownBitsFromOperator(const Operator *I, break; } unsigned GEPOpiBits = Index->getType()->getScalarSizeInBits(); - uint64_t TypeSize = Q.DL.getTypeAllocSize(IndexedTy); + uint64_t TypeSize = Q.DL.getTypeAllocSize(IndexedTy).getKnownMinSize(); LocalKnown.Zero = LocalKnown.One = APInt(GEPOpiBits, 0); computeKnownBits(Index, LocalKnown, Depth + 1, Q); TrailZ = std::min(TrailZ, |