[PATCH] D79700: [SVE] Ignore scalable vectors in InterleavedLoadCombinePass
David Sherwood via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue May 12 06:24:56 PDT 2020
david-arm updated this revision to Diff 263413.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D79700/new/
https://reviews.llvm.org/D79700
Files:
llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
Index: llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
===================================================================
--- llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
+++ llvm/lib/CodeGen/InterleavedLoadCombinePass.cpp
@@ -673,9 +673,9 @@
ElementInfo *EI;
/// Vector Type
- VectorType *const VTy;
+ FixedVectorType *const VTy;
- VectorInfo(VectorType *VTy)
+ VectorInfo(FixedVectorType *VTy)
: BB(nullptr), PV(nullptr), LIs(), Is(), SVI(nullptr), VTy(VTy) {
EI = new ElementInfo[VTy->getNumElements()];
}
@@ -735,7 +735,7 @@
if (!Op)
return false;
- VectorType *VTy = dyn_cast<VectorType>(Op->getType());
+ FixedVectorType *VTy = dyn_cast<FixedVectorType>(Op->getType());
if (!VTy)
return false;
@@ -785,8 +785,8 @@
/// \returns false if no sensible information can be gathered.
static bool computeFromSVI(ShuffleVectorInst *SVI, VectorInfo &Result,
const DataLayout &DL) {
- VectorType *ArgTy = dyn_cast<VectorType>(SVI->getOperand(0)->getType());
- assert(ArgTy && "ShuffleVector Operand is not a VectorType");
+ FixedVectorType *ArgTy =
+ cast<FixedVectorType>(SVI->getOperand(0)->getType());
// Compute the left hand vector information.
VectorInfo LHS(ArgTy);
@@ -1201,7 +1201,7 @@
Type *ETy = InterleavedLoad.front().SVI->getType()->getElementType();
unsigned ElementsPerSVI =
InterleavedLoad.front().SVI->getType()->getNumElements();
- VectorType *ILTy = VectorType::get(ETy, Factor * ElementsPerSVI);
+ FixedVectorType *ILTy = FixedVectorType::get(ETy, Factor * ElementsPerSVI);
SmallVector<unsigned, 4> Indices;
for (unsigned i = 0; i < Factor; i++)
@@ -1265,8 +1265,11 @@
for (BasicBlock &BB : F) {
for (Instruction &I : BB) {
if (auto SVI = dyn_cast<ShuffleVectorInst>(&I)) {
+ // We don't support scalable vectors in this pass.
+ if (isa<ScalableVectorType>(SVI->getType()))
+ continue;
- Candidates.emplace_back(SVI->getType());
+ Candidates.emplace_back(cast<FixedVectorType>(SVI->getType()));
if (!VectorInfo::computeFromSVI(SVI, Candidates.back(), DL)) {
Candidates.pop_back();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79700.263413.patch
Type: text/x-patch
Size: 2247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200512/b3f311ed/attachment.bin>
More information about the llvm-commits
mailing list