diff options
author | Joe Ellis <joe.ellis@arm.com> | 2020-10-26 17:40:31 +0000 |
---|---|---|
committer | Joe Ellis <joe.ellis@arm.com> | 2020-10-26 17:40:32 +0000 |
commit | bf60bb26ecbf4dace2a03886180be66b3ef5608a (patch) | |
tree | 834a6dd3ddf582e46fee5abce3795123065e970c /llvm/lib/Analysis/VectorUtils.cpp | |
parent | 0f8350559325db35e0ee3423db5d29113e4eec12 (diff) | |
download | llvm-bf60bb26ecbf4dace2a03886180be66b3ef5608a.zip llvm-bf60bb26ecbf4dace2a03886180be66b3ef5608a.tar.gz llvm-bf60bb26ecbf4dace2a03886180be66b3ef5608a.tar.bz2 |
[SVE] Fix TypeSize warning in llvm::getGEPInductionOperand
We do not need to use the implicit cast here. We can instead can rely on
a comparison between two TypeSize objects instead. This algorithm will
work fine with scalable vectors.
Reviewed By: DavidTruby
Differential Revision: https://reviews.llvm.org/D90146
Diffstat (limited to 'llvm/lib/Analysis/VectorUtils.cpp')
-rw-r--r-- | llvm/lib/Analysis/VectorUtils.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/Analysis/VectorUtils.cpp b/llvm/lib/Analysis/VectorUtils.cpp index 79be29c..e865087 100644 --- a/llvm/lib/Analysis/VectorUtils.cpp +++ b/llvm/lib/Analysis/VectorUtils.cpp @@ -136,7 +136,7 @@ Intrinsic::ID llvm::getVectorIntrinsicIDForCall(const CallInst *CI, unsigned llvm::getGEPInductionOperand(const GetElementPtrInst *Gep) { const DataLayout &DL = Gep->getModule()->getDataLayout(); unsigned LastOperand = Gep->getNumOperands() - 1; - unsigned GEPAllocSize = DL.getTypeAllocSize(Gep->getResultElementType()); + TypeSize GEPAllocSize = DL.getTypeAllocSize(Gep->getResultElementType()); // Walk backwards and try to peel off zeros. while (LastOperand > 1 && match(Gep->getOperand(LastOperand), m_Zero())) { |