diff options
author | Christopher Tetreault <ctetreau@quicinc.com> | 2020-07-09 11:51:03 -0700 |
---|---|---|
committer | Christopher Tetreault <ctetreau@quicinc.com> | 2020-07-09 12:43:36 -0700 |
commit | ff5b9a7b3b2736db02c6550bb4eae84ae65e294c (patch) | |
tree | 7bf1c83e8b1586e58f21776394c0dd8ac85c0a06 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | 469da663f2df150629786df3f82c217062924f5e (diff) | |
download | llvm-ff5b9a7b3b2736db02c6550bb4eae84ae65e294c.zip llvm-ff5b9a7b3b2736db02c6550bb4eae84ae65e294c.tar.gz llvm-ff5b9a7b3b2736db02c6550bb4eae84ae65e294c.tar.bz2 |
[SVE] Remove calls to VectorType::getNumElements from CodeGen
Reviewers: efriedma, fpetrogalli, sdesmalen, RKSimon, arsenm
Reviewed By: RKSimon
Subscribers: wdng, tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D82210
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 5fe8a09..e8b8e6c 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -5329,7 +5329,7 @@ bool CodeGenPrepare::optimizeGatherScatterInst(Instruction *MemoryInst, if (!RewriteGEP && Ops.size() == 2) return false; - unsigned NumElts = cast<VectorType>(Ptr->getType())->getNumElements(); + unsigned NumElts = cast<FixedVectorType>(Ptr->getType())->getNumElements(); IRBuilder<> Builder(MemoryInst); @@ -6628,7 +6628,7 @@ bool CodeGenPrepare::optimizeShuffleVectorInst(ShuffleVectorInst *SVI) { if (!NewType) return false; - VectorType *SVIVecType = cast<VectorType>(SVI->getType()); + auto *SVIVecType = cast<FixedVectorType>(SVI->getType()); assert(!NewType->isVectorTy() && "Expected a scalar type!"); assert(NewType->getScalarSizeInBits() == SVIVecType->getScalarSizeInBits() && "Expected a type of the same size!"); |