Skip to content

Commit 7bf439d

Browse files
committed
[IA] Partially revert interface change from 4a66ba
As noted in post commit review, the API change here was not required. I'd apparently confused myself when teasing apart patches from my development branch.
1 parent 420e2f5 commit 7bf439d

File tree

6 files changed

+17
-20
lines changed

6 files changed

+17
-20
lines changed

llvm/include/llvm/CodeGen/TargetLowering.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3230,8 +3230,7 @@ class LLVM_ABI TargetLoweringBase {
32303230
/// \p Mask is a mask value
32313231
/// \p DeinterleaveRes is a list of deinterleaved results.
32323232
virtual bool lowerInterleavedVPLoad(VPIntrinsic *Load, Value *Mask,
3233-
ArrayRef<Value *> DeinterleaveRes,
3234-
unsigned Factor) const {
3233+
ArrayRef<Value *> DeinterleaveRes) const {
32353234
return false;
32363235
}
32373236

@@ -3254,8 +3253,7 @@ class LLVM_ABI TargetLoweringBase {
32543253
/// \p DeinterleaveValues contains the deinterleaved values.
32553254
virtual bool
32563255
lowerDeinterleaveIntrinsicToLoad(LoadInst *LI,
3257-
ArrayRef<Value *> DeinterleaveValues,
3258-
unsigned Factor) const {
3256+
ArrayRef<Value *> DeinterleaveValues) const {
32593257
return false;
32603258
}
32613259

llvm/lib/CodeGen/InterleavedAccessPass.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ bool InterleavedAccessImpl::lowerInterleavedLoad(
380380
SmallVector<Value *, 4> ShuffleValues(Factor, nullptr);
381381
for (auto [Idx, ShuffleMaskIdx] : enumerate(Indices))
382382
ShuffleValues[ShuffleMaskIdx] = Shuffles[Idx];
383-
if (!TLI->lowerInterleavedVPLoad(VPLoad, LaneMask, ShuffleValues, Factor))
383+
if (!TLI->lowerInterleavedVPLoad(VPLoad, LaneMask, ShuffleValues))
384384
// If Extracts is not empty, tryReplaceExtracts made changes earlier.
385385
return !Extracts.empty() || BinOpShuffleChanged;
386386
} else {
@@ -704,7 +704,7 @@ bool InterleavedAccessImpl::lowerDeinterleaveIntrinsic(
704704

705705
// Since lowerInterleaveLoad expects Shuffles and LoadInst, use special
706706
// TLI function to emit target-specific interleaved instruction.
707-
if (!TLI->lowerInterleavedVPLoad(VPLoad, Mask, DeinterleaveValues, Factor))
707+
if (!TLI->lowerInterleavedVPLoad(VPLoad, Mask, DeinterleaveValues))
708708
return false;
709709

710710
} else {
@@ -716,7 +716,7 @@ bool InterleavedAccessImpl::lowerDeinterleaveIntrinsic(
716716
<< " and factor = " << Factor << "\n");
717717

718718
// Try and match this with target specific intrinsics.
719-
if (!TLI->lowerDeinterleaveIntrinsicToLoad(LI, DeinterleaveValues, Factor))
719+
if (!TLI->lowerDeinterleaveIntrinsicToLoad(LI, DeinterleaveValues))
720720
return false;
721721
}
722722

llvm/lib/Target/AArch64/AArch64ISelLowering.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17456,8 +17456,8 @@ bool AArch64TargetLowering::lowerInterleavedStore(StoreInst *SI,
1745617456
}
1745717457

1745817458
bool AArch64TargetLowering::lowerDeinterleaveIntrinsicToLoad(
17459-
LoadInst *LI, ArrayRef<Value *> DeinterleavedValues,
17460-
unsigned Factor) const {
17459+
LoadInst *LI, ArrayRef<Value *> DeinterleavedValues) const {
17460+
unsigned Factor = DeinterleavedValues.size();
1746117461
if (Factor != 2 && Factor != 4) {
1746217462
LLVM_DEBUG(dbgs() << "Matching ld2 and ld4 patterns failed\n");
1746317463
return false;

llvm/lib/Target/AArch64/AArch64ISelLowering.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,8 @@ class AArch64TargetLowering : public TargetLowering {
218218
bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI,
219219
unsigned Factor) const override;
220220

221-
bool lowerDeinterleaveIntrinsicToLoad(LoadInst *LI,
222-
ArrayRef<Value *> DeinterleaveValues,
223-
unsigned Factor) const override;
221+
bool lowerDeinterleaveIntrinsicToLoad(
222+
LoadInst *LI, ArrayRef<Value *> DeinterleaveValues) const override;
224223

225224
bool lowerInterleaveIntrinsicToStore(
226225
StoreInst *SI, ArrayRef<Value *> InterleaveValues) const override;

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24302,7 +24302,8 @@ bool RISCVTargetLowering::lowerInterleavedStore(StoreInst *SI,
2430224302
}
2430324303

2430424304
bool RISCVTargetLowering::lowerDeinterleaveIntrinsicToLoad(
24305-
LoadInst *LI, ArrayRef<Value *> DeinterleaveValues, unsigned Factor) const {
24305+
LoadInst *LI, ArrayRef<Value *> DeinterleaveValues) const {
24306+
const unsigned Factor = DeinterleaveValues.size();
2430624307
if (Factor > 8)
2430724308
return false;
2430824309

@@ -24487,8 +24488,9 @@ static bool isMultipleOfN(const Value *V, const DataLayout &DL, unsigned N) {
2448724488
/// dealing with factor of 2 (extractvalue is still required for most of other
2448824489
/// factors though).
2448924490
bool RISCVTargetLowering::lowerInterleavedVPLoad(
24490-
VPIntrinsic *Load, Value *Mask, ArrayRef<Value *> DeinterleaveResults,
24491-
unsigned Factor) const {
24491+
VPIntrinsic *Load, Value *Mask,
24492+
ArrayRef<Value *> DeinterleaveResults) const {
24493+
const unsigned Factor = DeinterleaveResults.size();
2449224494
assert(Mask && "Expect a valid mask");
2449324495
assert(Load->getIntrinsicID() == Intrinsic::vp_load &&
2449424496
"Unexpected intrinsic");

llvm/lib/Target/RISCV/RISCVISelLowering.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -437,16 +437,14 @@ class RISCVTargetLowering : public TargetLowering {
437437
bool lowerInterleavedStore(StoreInst *SI, ShuffleVectorInst *SVI,
438438
unsigned Factor) const override;
439439

440-
bool lowerDeinterleaveIntrinsicToLoad(LoadInst *LI,
441-
ArrayRef<Value *> DeinterleaveValues,
442-
unsigned Factor) const override;
440+
bool lowerDeinterleaveIntrinsicToLoad(
441+
LoadInst *LI, ArrayRef<Value *> DeinterleaveValues) const override;
443442

444443
bool lowerInterleaveIntrinsicToStore(
445444
StoreInst *SI, ArrayRef<Value *> InterleaveValues) const override;
446445

447446
bool lowerInterleavedVPLoad(VPIntrinsic *Load, Value *Mask,
448-
ArrayRef<Value *> DeinterleaveRes,
449-
unsigned Factor) const override;
447+
ArrayRef<Value *> DeinterleaveRes) const override;
450448

451449
bool lowerInterleavedVPStore(VPIntrinsic *Store, Value *Mask,
452450
ArrayRef<Value *> InterleaveOps) const override;

0 commit comments

Comments
 (0)