Skip to content

Commit 9f69e11

Browse files
committed
[VPlan] Use VPTransformState::UF in vectorizeInterleaveGroup (NFCI).
Bring implementations of vectorizeInterleaveGroup in line with other recipes' execute by using VPTransformState::UF.
1 parent 570f362 commit 9f69e11

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2474,7 +2474,7 @@ void InnerLoopVectorizer::vectorizeInterleaveGroup(
24742474
} else
24752475
Idx = Builder.getInt32(-Index);
24762476

2477-
for (unsigned Part = 0; Part < UF; Part++) {
2477+
for (unsigned Part = 0; Part < State.UF; Part++) {
24782478
Value *AddrPart = State.get(Addr, VPIteration(Part, 0));
24792479
if (auto *I = dyn_cast<Instruction>(AddrPart))
24802480
State.setDebugLocFrom(I->getDebugLoc());
@@ -2539,7 +2539,7 @@ void InnerLoopVectorizer::vectorizeInterleaveGroup(
25392539

25402540
// For each unroll part, create a wide load for the group.
25412541
SmallVector<Value *, 2> NewLoads;
2542-
for (unsigned Part = 0; Part < UF; Part++) {
2542+
for (unsigned Part = 0; Part < State.UF; Part++) {
25432543
Instruction *NewLoad;
25442544
if (BlockInMask || MaskForGaps) {
25452545
assert(useMaskedInterleavedAccesses(*TTI) &&
@@ -2560,7 +2560,7 @@ void InnerLoopVectorizer::vectorizeInterleaveGroup(
25602560
assert(InterleaveFactor == 2 &&
25612561
"Unsupported deinterleave factor for scalable vectors");
25622562

2563-
for (unsigned Part = 0; Part < UF; ++Part) {
2563+
for (unsigned Part = 0; Part < State.UF; ++Part) {
25642564
// Scalable vectors cannot use arbitrary shufflevectors (only splats),
25652565
// so must use intrinsics to deinterleave.
25662566
Value *DI = Builder.CreateIntrinsic(
@@ -2603,7 +2603,7 @@ void InnerLoopVectorizer::vectorizeInterleaveGroup(
26032603

26042604
auto StrideMask =
26052605
createStrideMask(I, InterleaveFactor, VF.getKnownMinValue());
2606-
for (unsigned Part = 0; Part < UF; Part++) {
2606+
for (unsigned Part = 0; Part < State.UF; Part++) {
26072607
Value *StridedVec = Builder.CreateShuffleVector(
26082608
NewLoads[Part], StrideMask, "strided.vec");
26092609

@@ -2634,7 +2634,7 @@ void InnerLoopVectorizer::vectorizeInterleaveGroup(
26342634
"masked interleaved groups are not allowed.");
26352635
assert((!MaskForGaps || !VF.isScalable()) &&
26362636
"masking gaps for scalable vectors is not yet supported.");
2637-
for (unsigned Part = 0; Part < UF; Part++) {
2637+
for (unsigned Part = 0; Part < State.UF; Part++) {
26382638
// Collect the stored vector from each member.
26392639
SmallVector<Value *, 4> StoredVecs;
26402640
unsigned StoredIdx = 0;

0 commit comments

Comments
 (0)