Skip to content

Commit 7f511dc

Browse files
committed
[AArch64][SVE] Allow factors other than 2/4 for load+deinterleave3+store
patterns for codegen Resolves #159801 and #162068
1 parent 0e3fdc2 commit 7f511dc

File tree

2 files changed

+234
-4
lines changed

2 files changed

+234
-4
lines changed

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18144,8 +18144,8 @@ bool AArch64TargetLowering::lowerInterleavedStore(Instruction *Store,
1814418144
bool AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(
1814518145
Instruction *Load, Value *Mask, IntrinsicInst *DI) const {
1814618146
const unsigned Factor = getDeinterleaveIntrinsicFactor(DI->getIntrinsicID());
18147-
if (Factor != 2 && Factor != 4) {
18148-
LLVM_DEBUG(dbgs() << "Matching ld2 and ld4 patterns failed\n");
18147+
if (Factor != 2 && Factor != 3 && Factor != 4) {
18148+
LLVM_DEBUG(dbgs() << "Matching ld2, ld3 and ld4 patterns failed\n");
1814918149
return false;
1815018150
}
1815118151
auto *LI = dyn_cast<LoadInst>(Load);
@@ -18223,8 +18223,8 @@ bool AArch64TargetLowering::lowerInterleaveIntrinsicToStore(
1822318223
Instruction *Store, Value *Mask,
1822418224
ArrayRef<Value *> InterleavedValues) const {
1822518225
unsigned Factor = InterleavedValues.size();
18226-
if (Factor != 2 && Factor != 4) {
18227-
LLVM_DEBUG(dbgs() << "Matching st2 and st4 patterns failed\n");
18226+
if (Factor != 2 && Factor != 3 && Factor != 4) {
18227+
LLVM_DEBUG(dbgs() << "Matching st2, st3 and st4 patterns failed\n");
1822818228
return false;
1822918229
}
1823018230
StoreInst *SI = dyn_cast<StoreInst>(Store);

0 commit comments

Comments
 (0)