diff options
author | Christopher Tetreault <ctetreau@quicinc.com> | 2020-06-08 10:12:08 -0700 |
---|---|---|
committer | Christopher Tetreault <ctetreau@quicinc.com> | 2020-06-08 10:26:10 -0700 |
commit | caa2fddce72f2e8ca3d6346cc2c8fe85252b91d8 (patch) | |
tree | 629cb95fc588b365d745e3ddaba878a61bba7fb6 /llvm/lib/CodeGen/CodeGenPrepare.cpp | |
parent | b5632f4083329ce32e1316d7b4af1416b3adc9dd (diff) | |
download | llvm-caa2fddce72f2e8ca3d6346cc2c8fe85252b91d8.zip llvm-caa2fddce72f2e8ca3d6346cc2c8fe85252b91d8.tar.gz llvm-caa2fddce72f2e8ca3d6346cc2c8fe85252b91d8.tar.bz2 |
[SVE] Eliminate calls to default-false VectorType::get() from CodeGen
Reviewers: efriedma, c-rhodes, david-arm, spatel, craig.topper, aqjune, paquette, arsenm, gchatelet
Reviewed By: spatel, gchatelet
Subscribers: wdng, tschuett, hiraditya, rkruppe, psnobl, llvm-commits
Tags: #llvm
Differential Revision: https://reviews.llvm.org/D80313
Diffstat (limited to 'llvm/lib/CodeGen/CodeGenPrepare.cpp')
-rw-r--r-- | llvm/lib/CodeGen/CodeGenPrepare.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/CodeGenPrepare.cpp b/llvm/lib/CodeGen/CodeGenPrepare.cpp index 4ed4975..d238804 100644 --- a/llvm/lib/CodeGen/CodeGenPrepare.cpp +++ b/llvm/lib/CodeGen/CodeGenPrepare.cpp @@ -5321,7 +5321,7 @@ bool CodeGenPrepare::optimizeGatherScatterInst(Instruction *MemoryInst, // and a vector GEP with all zeroes final index. if (!Ops[FinalIndex]->getType()->isVectorTy()) { NewAddr = Builder.CreateGEP(Ops[0], makeArrayRef(Ops).drop_front()); - Type *IndexTy = VectorType::get(ScalarIndexTy, NumElts); + auto *IndexTy = FixedVectorType::get(ScalarIndexTy, NumElts); NewAddr = Builder.CreateGEP(NewAddr, Constant::getNullValue(IndexTy)); } else { Value *Base = Ops[0]; @@ -6471,7 +6471,8 @@ bool CodeGenPrepare::optimizeShuffleVectorInst(ShuffleVectorInst *SVI) { assert(!NewType->isVectorTy() && "Expected a scalar type!"); assert(NewType->getScalarSizeInBits() == SVIVecType->getScalarSizeInBits() && "Expected a type of the same size!"); - Type *NewVecType = VectorType::get(NewType, SVIVecType->getNumElements()); + auto *NewVecType = + FixedVectorType::get(NewType, SVIVecType->getNumElements()); // Create a bitcast (shuffle (insert (bitcast(..)))) IRBuilder<> Builder(SVI->getContext()); |