Skip to content

Commit 92e8ad6

Browse files
committed
fixup! Address review comments
1 parent 6c03ffa commit 92e8ad6

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

llvm/lib/CodeGen/InterleavedAccessPass.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ bool InterleavedAccessImpl::lowerInterleavedLoad(
270270
} else if (auto *VPLoad = dyn_cast<VPIntrinsic>(Load)) {
271271
assert(VPLoad->getIntrinsicID() == Intrinsic::vp_load);
272272
// Require a constant mask.
273-
if (!isa<ConstantVector>(VPLoad->getArgOperand(1)))
273+
if (!isa<ConstantVector>(VPLoad->getMaskParam()))
274274
return false;
275275
} else {
276276
llvm_unreachable("unsupported load operation");
@@ -364,8 +364,8 @@ bool InterleavedAccessImpl::lowerInterleavedLoad(
364364
replaceBinOpShuffles(BinOpShuffles.getArrayRef(), Shuffles, Load);
365365

366366
if (auto *VPLoad = dyn_cast<VPIntrinsic>(Load)) {
367-
Value *LaneMask = getMask(VPLoad->getArgOperand(1), Factor,
368-
cast<VectorType>(Shuffles[0]->getType()));
367+
Value *LaneMask =
368+
getMask(VPLoad->getMaskParam(), Factor, cast<VectorType>(VecTy));
369369
if (!LaneMask)
370370
return false;
371371

@@ -505,7 +505,7 @@ bool InterleavedAccessImpl::lowerInterleavedStore(
505505
} else if (auto *VPStore = dyn_cast<VPIntrinsic>(Store)) {
506506
assert(VPStore->getIntrinsicID() == Intrinsic::vp_store);
507507
// Require a constant mask.
508-
if (!isa<ConstantVector>(VPStore->getArgOperand(2)))
508+
if (!isa<ConstantVector>(VPStore->getMaskParam()))
509509
return false;
510510
StoredValue = VPStore->getArgOperand(0);
511511
} else {
@@ -527,7 +527,7 @@ bool InterleavedAccessImpl::lowerInterleavedStore(
527527

528528
if (auto *VPStore = dyn_cast<VPIntrinsic>(Store)) {
529529
unsigned LaneMaskLen = NumStoredElements / Factor;
530-
Value *LaneMask = getMask(VPStore->getArgOperand(2), Factor,
530+
Value *LaneMask = getMask(VPStore->getMaskParam(), Factor,
531531
ElementCount::getFixed(LaneMaskLen));
532532
if (!LaneMask)
533533
return false;

llvm/lib/Target/RISCV/RISCVISelLowering.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24022,7 +24022,7 @@ bool RISCVTargetLowering::lowerInterleavedVPLoad(
2402224022

2402324023
IRBuilder<> Builder(Load);
2402424024

24025-
Value *WideEVL = Load->getArgOperand(2);
24025+
Value *WideEVL = Load->getVectorLengthParam();
2402624026
// Conservatively check if EVL is a multiple of factor, otherwise some
2402724027
// (trailing) elements might be lost after the transformation.
2402824028
if (!isMultipleOfN(WideEVL, Load->getDataLayout(), Factor))

0 commit comments

Comments
 (0)