Skip to content

Commit e96323f

Browse files
committed
!fixup adjust comments, pass IV phi filter.
1 parent 61e6d95 commit e96323f

File tree

10 files changed

+35
-32
lines changed

10 files changed

+35
-32
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 25 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -588,9 +588,13 @@ class InnerLoopVectorizer {
588588
/// in the scalar epilogue, from where the vectorized loop left off.
589589
/// In cases where the loop skeleton is more complicated (i.e. epilogue
590590
/// vectorization), \p MainVectorTripCount provides the trip count of the main
591-
/// loop, used to compute these resume values.
592-
void createInductionResumeVPValues(const SCEV2ValueTy &ExpandedSCEVs,
593-
Value *MainVectorTripCount = nullptr);
591+
/// loop, used to compute these resume values. If \p IVSubset is provided, it
592+
/// contains the phi nodes for which resume values are needed, because they
593+
/// will generate wide induction phis in the epilogue loop.
594+
void
595+
createInductionResumeVPValues(const SCEV2ValueTy &ExpandedSCEVs,
596+
Value *MainVectorTripCount = nullptr,
597+
SmallPtrSetImpl<PHINode *> *IVSubset = nullptr);
594598

595599
/// Allow subclasses to override and print debug traces before/after vplan
596600
/// execution, when trace information is requested.
@@ -2679,7 +2683,8 @@ static Value *getExpandedStep(const InductionDescriptor &ID,
26792683
}
26802684

26812685
void InnerLoopVectorizer::createInductionResumeVPValues(
2682-
const SCEV2ValueTy &ExpandedSCEVs, Value *MainVectorTripCount) {
2686+
const SCEV2ValueTy &ExpandedSCEVs, Value *MainVectorTripCount,
2687+
SmallPtrSetImpl<PHINode *> *IVSubset) {
26832688
// We are going to resume the execution of the scalar loop.
26842689
// Go over all of the induction variable PHIs of the scalar loop header and
26852690
// fix their starting values, which depend on the counter of the last
@@ -2693,7 +2698,8 @@ void InnerLoopVectorizer::createInductionResumeVPValues(
26932698
auto *Phi = dyn_cast<PHINode>(&PhiR->getInstruction());
26942699
if (!Phi)
26952700
break;
2696-
if (!Legal->getInductionVars().contains(Phi))
2701+
if (!Legal->getInductionVars().contains(Phi) ||
2702+
(IVSubset && !IVSubset->contains(Phi)))
26972703
continue;
26982704
const InductionDescriptor &II = Legal->getInductionVars().find(Phi)->second;
26992705
createInductionResumeVPValue(PhiR, II, getExpandedStep(II, ExpandedSCEVs),
@@ -7847,15 +7853,20 @@ EpilogueVectorizerMainLoop::createEpilogueVectorizedLoopSkeleton(
78477853
// Generate the induction variable.
78487854
EPI.VectorTripCount = getOrCreateVectorTripCount(LoopVectorPreHeader);
78497855

7850-
// Generate VPValues and ResumePhi recipes for inductions in the epilogue loop
7851-
// to resume from the main loop or bypass it, if there are any wide
7852-
// inductions. Otherwise it is we only need a resume value for the canonical
7856+
// Generate VPValues and ResumePhi recipes for wide inductions in the epilogue
7857+
// plan only. Other inductions only need a resume value for the canonical
78537858
// induction, which will get created during epilogue skeleton construction.
7854-
if (any_of(
7855-
EPI.EpiloguePlan.getVectorLoopRegion()->getEntryBasicBlock()->phis(),
7856-
IsaPred<VPWidenIntOrFpInductionRecipe,
7857-
VPWidenPointerInductionRecipe>))
7858-
createInductionResumeVPValues(ExpandedSCEVs);
7859+
SmallPtrSet<PHINode *, 4> WideIVs;
7860+
for (VPRecipeBase &H :
7861+
EPI.EpiloguePlan.getVectorLoopRegion()->getEntryBasicBlock()->phis()) {
7862+
if (!isa<VPWidenIntOrFpInductionRecipe, VPWidenPointerInductionRecipe>(&H))
7863+
continue;
7864+
if (auto *WideIV = dyn_cast<VPWidenIntOrFpInductionRecipe>(&H))
7865+
WideIVs.insert(WideIV->getPHINode());
7866+
else
7867+
WideIVs.insert(cast<PHINode>(H.getVPSingleValue()->getUnderlyingValue()));
7868+
}
7869+
createInductionResumeVPValues(ExpandedSCEVs, nullptr, &WideIVs);
78597870

78607871
return {LoopVectorPreHeader, nullptr};
78617872
}
@@ -8023,7 +8034,7 @@ EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton(
80238034

80248035
// Generate a resume phi for the canonical induction of the vector epilogue
80258036
// and put it in the vector epilogue preheader, unless such a phi already
8026-
// exists there - and can be reused
8037+
// exists there - and can be reused.
80278038
PHINode *EPResumeVal = nullptr;
80288039
Type *IdxTy = Legal->getWidestInductionType();
80298040
Value *TC = EPI.VectorTripCount;

llvm/test/Transforms/LoopVectorize/AArch64/epilog-vectorization-widen-inductions.ll

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,9 @@ define void @test_widen_induction_step_2(ptr %A, i64 %N, i32 %step) {
322322
; CHECK-NEXT: br i1 [[MIN_EPILOG_ITERS_CHECK]], label [[VEC_EPILOG_SCALAR_PH]], label [[VEC_EPILOG_PH]]
323323
; CHECK: vec.epilog.ph:
324324
; CHECK-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[IND_END4]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
325-
; CHECK-NEXT: [[BC_RESUME_VAL2:%.*]] = phi i64 [ [[IND_END4]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
326325
; CHECK-NEXT: [[N_MOD_VF2:%.*]] = urem i64 [[N]], 2
327326
; CHECK-NEXT: [[IND_END:%.*]] = sub i64 [[N]], [[N_MOD_VF2]]
328-
; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[BC_RESUME_VAL2]], i64 0
327+
; CHECK-NEXT: [[DOTSPLATINSERT:%.*]] = insertelement <2 x i64> poison, i64 [[VEC_EPILOG_RESUME_VAL]], i64 0
329328
; CHECK-NEXT: [[DOTSPLAT:%.*]] = shufflevector <2 x i64> [[DOTSPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer
330329
; CHECK-NEXT: [[INDUCTION:%.*]] = add <2 x i64> [[DOTSPLAT]], <i64 0, i64 1>
331330
; CHECK-NEXT: br label [[VEC_EPILOG_VECTOR_BODY:%.*]]

llvm/test/Transforms/LoopVectorize/PowerPC/exit-branch-cost.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,6 @@ define i1 @select_exit_cond(ptr %start, ptr %end, i64 %N) {
2323
; CHECK: [[VECTOR_PH]]:
2424
; CHECK-NEXT: [[N_MOD_VF:%.*]] = urem i64 [[TMP2]], 16
2525
; CHECK-NEXT: [[N_VEC:%.*]] = sub i64 [[TMP2]], [[N_MOD_VF]]
26-
; CHECK-NEXT: [[IND_END1:%.*]] = getelementptr i8, ptr [[START]], i64 [[N_VEC]]
2726
; CHECK-NEXT: br label %[[VECTOR_BODY:.*]]
2827
; CHECK: [[VECTOR_BODY]]:
2928
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, %[[VECTOR_PH]] ], [ [[INDEX_NEXT:%.*]], %[[VECTOR_BODY]] ]
@@ -115,7 +114,6 @@ define i1 @select_exit_cond(ptr %start, ptr %end, i64 %N) {
115114
; CHECK-NEXT: br i1 [[MIN_EPILOG_ITERS_CHECK]], label %[[VEC_EPILOG_SCALAR_PH]], label %[[VEC_EPILOG_PH]]
116115
; CHECK: [[VEC_EPILOG_PH]]:
117116
; CHECK-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], %[[VEC_EPILOG_ITER_CHECK]] ], [ 0, %[[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
118-
; CHECK-NEXT: [[BC_RESUME_VAL24:%.*]] = phi ptr [ [[IND_END1]], %[[VEC_EPILOG_ITER_CHECK]] ], [ [[START]], %[[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
119117
; CHECK-NEXT: [[BC_MERGE_RDX:%.*]] = phi i64 [ [[TMP52]], %[[VEC_EPILOG_ITER_CHECK]] ], [ 0, %[[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
120118
; CHECK-NEXT: [[N_MOD_VF24:%.*]] = urem i64 [[TMP2]], 2
121119
; CHECK-NEXT: [[N_VEC25:%.*]] = sub i64 [[TMP2]], [[N_MOD_VF24]]

llvm/test/Transforms/LoopVectorize/X86/epilog-vectorization-inductions.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,8 @@ define void @test_induction_step_needs_expansion(ptr noalias %j, ptr %k, i64 %l,
191191
; CHECK-NEXT: [[MIN_EPILOG_ITERS_CHECK:%.*]] = icmp ult i64 [[N_VEC_REMAINING]], 8
192192
; CHECK-NEXT: br i1 [[MIN_EPILOG_ITERS_CHECK]], label [[VEC_EPILOG_SCALAR_PH]], label [[VEC_EPILOG_PH]]
193193
; CHECK: vec.epilog.ph:
194-
; CHECK-NEXT: [[BC_RESUME_VAL1:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
195194
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i16 [ [[IND_END]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
195+
; CHECK-NEXT: [[BC_RESUME_VAL1:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
196196
; CHECK-NEXT: [[N_MOD_VF4:%.*]] = urem i64 [[L]], 8
197197
; CHECK-NEXT: [[N_VEC5:%.*]] = sub i64 [[L]], [[N_MOD_VF4]]
198198
; CHECK-NEXT: [[DOTCAST7:%.*]] = trunc i64 [[N_VEC5]] to i16

llvm/test/Transforms/LoopVectorize/X86/float-induction-x86.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ define void @fp_iv_loop1(ptr noalias nocapture %A, i32 %N) #0 {
6161
; AUTO_VEC-NEXT: [[MIN_EPILOG_ITERS_CHECK:%.*]] = icmp eq i64 [[N_VEC_REMAINING]], 0
6262
; AUTO_VEC-NEXT: br i1 [[MIN_EPILOG_ITERS_CHECK]], label [[FOR_BODY]], label [[VEC_EPILOG_PH]]
6363
; AUTO_VEC: vec.epilog.ph:
64-
; AUTO_VEC-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
6564
; AUTO_VEC-NEXT: [[BC_RESUME_VAL:%.*]] = phi float [ [[IND_END]], [[VEC_EPILOG_ITER_CHECK]] ], [ 1.000000e+00, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
65+
; AUTO_VEC-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
6666
; AUTO_VEC-NEXT: [[N_VEC3:%.*]] = and i64 [[ZEXT]], 2147483644
6767
; AUTO_VEC-NEXT: [[DOTCAST5:%.*]] = uitofp nneg i64 [[N_VEC3]] to float
6868
; AUTO_VEC-NEXT: [[TMP7:%.*]] = fmul fast float [[DOTCAST5]], 5.000000e-01
@@ -441,8 +441,8 @@ define void @fadd_reassoc_FMF(ptr nocapture %p, i32 %N) {
441441
; AUTO_VEC-NEXT: [[MIN_EPILOG_ITERS_CHECK:%.*]] = icmp eq i64 [[N_VEC_REMAINING]], 0
442442
; AUTO_VEC-NEXT: br i1 [[MIN_EPILOG_ITERS_CHECK]], label [[FOR_BODY]], label [[VEC_EPILOG_PH]]
443443
; AUTO_VEC: vec.epilog.ph:
444-
; AUTO_VEC-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
445444
; AUTO_VEC-NEXT: [[BC_RESUME_VAL:%.*]] = phi float [ [[IND_END]], [[VEC_EPILOG_ITER_CHECK]] ], [ 1.000000e+00, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
445+
; AUTO_VEC-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
446446
; AUTO_VEC-NEXT: [[N_VEC6:%.*]] = and i64 [[TMP0]], 4294967292
447447
; AUTO_VEC-NEXT: [[DOTCAST8:%.*]] = uitofp nneg i64 [[N_VEC6]] to float
448448
; AUTO_VEC-NEXT: [[TMP12:%.*]] = fmul reassoc float [[DOTCAST8]], 4.200000e+01

llvm/test/Transforms/LoopVectorize/X86/gather_scatter.ll

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -639,8 +639,6 @@ define void @test_gather_not_profitable_pr48429(i32 %d, ptr readonly noalias %pt
639639
; AVX512: vector.ph:
640640
; AVX512-NEXT: [[N_MOD_VF:%.*]] = urem i64 [[TMP3]], 16
641641
; AVX512-NEXT: [[N_VEC:%.*]] = sub i64 [[TMP3]], [[N_MOD_VF]]
642-
; AVX512-NEXT: [[TMP36:%.*]] = mul i64 [[N_VEC]], 4
643-
; AVX512-NEXT: [[IND_END1:%.*]] = getelementptr i8, ptr [[PTR]], i64 [[TMP36]]
644642
; AVX512-NEXT: [[TMP13:%.*]] = mul i64 [[N_VEC]], 64
645643
; AVX512-NEXT: [[IND_END:%.*]] = getelementptr i8, ptr [[DEST]], i64 [[TMP13]]
646644
; AVX512-NEXT: br label [[VECTOR_BODY:%.*]]
@@ -675,7 +673,6 @@ define void @test_gather_not_profitable_pr48429(i32 %d, ptr readonly noalias %pt
675673
; AVX512-NEXT: [[MIN_EPILOG_ITERS_CHECK:%.*]] = icmp ult i64 [[N_VEC_REMAINING]], 8
676674
; AVX512-NEXT: br i1 [[MIN_EPILOG_ITERS_CHECK]], label [[VEC_EPILOG_SCALAR_PH]], label [[VEC_EPILOG_PH]]
677675
; AVX512: vec.epilog.ph:
678-
; AVX512-NEXT: [[BC_RESUME_VAL1:%.*]] = phi ptr [ [[IND_END1]], [[VEC_EPILOG_ITER_CHECK]] ], [ [[PTR]], [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
679676
; AVX512-NEXT: [[BC_RESUME_VAL:%.*]] = phi ptr [ [[IND_END]], [[VEC_EPILOG_ITER_CHECK]] ], [ [[DEST]], [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
680677
; AVX512-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
681678
; AVX512-NEXT: [[N_MOD_VF9:%.*]] = urem i64 [[TMP3]], 8

llvm/test/Transforms/LoopVectorize/X86/pr55096-scalarize-add.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ define void @test_pr55096(i64 %c, ptr %p) {
99
; CHECK-NEXT: [[BROADCAST_SPLAT:%.*]] = shufflevector <2 x i64> [[BROADCAST_SPLATINSERT]], <2 x i64> poison, <2 x i32> zeroinitializer
1010
; CHECK-NEXT: br label [[VECTOR_BODY:%.*]]
1111
; CHECK: vector.body:
12-
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH:%.*]] ], [ [[INDEX_NEXT:%.*]], [[PRED_STORE_CONTINUE3:%.*]] ]
13-
; CHECK-NEXT: [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 122, i64 123>, [[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], [[PRED_STORE_CONTINUE3]] ]
12+
; CHECK-NEXT: [[INDEX:%.*]] = phi i64 [ 0, [[VECTOR_PH:%.*]] ], [ [[INDEX_NEXT:%.*]], [[PRED_STORE_CONTINUE2:%.*]] ]
13+
; CHECK-NEXT: [[VEC_IND:%.*]] = phi <2 x i64> [ <i64 122, i64 123>, [[VECTOR_PH]] ], [ [[VEC_IND_NEXT:%.*]], [[PRED_STORE_CONTINUE2]] ]
1414
; CHECK-NEXT: [[DOTCAST:%.*]] = trunc i64 [[INDEX]] to i16
1515
; CHECK-NEXT: [[TMP0:%.*]] = mul i16 [[DOTCAST]], 2008
1616
; CHECK-NEXT: [[OFFSET_IDX:%.*]] = add i16 6229, [[TMP0]]
@@ -27,14 +27,14 @@ define void @test_pr55096(i64 %c, ptr %p) {
2727
; CHECK-NEXT: br label [[PRED_STORE_CONTINUE]]
2828
; CHECK: pred.store.continue:
2929
; CHECK-NEXT: [[TMP9:%.*]] = extractelement <2 x i1> [[TMP2]], i32 1
30-
; CHECK-NEXT: br i1 [[TMP9]], label [[PRED_STORE_IF2:%.*]], label [[PRED_STORE_CONTINUE3]]
30+
; CHECK-NEXT: br i1 [[TMP9]], label [[PRED_STORE_IF1:%.*]], label [[PRED_STORE_CONTINUE2]]
3131
; CHECK: pred.store.if1:
3232
; CHECK-NEXT: [[TMP10:%.*]] = add i16 [[OFFSET_IDX]], 2008
3333
; CHECK-NEXT: [[TMP11:%.*]] = add i16 [[TMP10]], 2008
3434
; CHECK-NEXT: [[TMP12:%.*]] = udiv i16 4943, [[TMP11]]
3535
; CHECK-NEXT: [[TMP13:%.*]] = getelementptr inbounds i16, ptr [[P]], i16 [[TMP12]]
3636
; CHECK-NEXT: store i16 0, ptr [[TMP13]], align 2
37-
; CHECK-NEXT: br label [[PRED_STORE_CONTINUE3]]
37+
; CHECK-NEXT: br label [[PRED_STORE_CONTINUE2]]
3838
; CHECK: pred.store.continue2:
3939
; CHECK-NEXT: [[INDEX_NEXT]] = add nuw i64 [[INDEX]], 2
4040
; CHECK-NEXT: [[VEC_IND_NEXT]] = add <2 x i64> [[VEC_IND]], splat (i64 2)

llvm/test/Transforms/LoopVectorize/branch-weights.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
; CHECK: br i1 {{.+}}, label %vec.epilog.middle.block, label %vec.epilog.vector.body, !prof [[PROF_F0_VEC_EPILOG_VECTOR_BODY:![0-9]+]]
3434
;
3535
; CHECK: vec.epilog.middle.block:
36-
; CHECK: br i1 %cmp.n11, label %exit.loopexit, label %vec.epilog.scalar.ph, !prof [[PROF_F0_MIDDLE_BLOCKS:![0-9]+]]
36+
; CHECK: br i1 %cmp.n9, label %exit.loopexit, label %vec.epilog.scalar.ph, !prof [[PROF_F0_MIDDLE_BLOCKS:![0-9]+]]
3737
;
3838
; CHECK: vec.epilog.scalar.ph:
3939
; CHECK: br label %loop

llvm/test/Transforms/LoopVectorize/epilog-vectorization-any-of-reductions.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,9 +241,9 @@ define i1 @any_of_reduction_i1_epilog(i64 %N, i32 %a) {
241241
; CHECK-NEXT: [[MIN_EPILOG_ITERS_CHECK:%.*]] = icmp ult i64 [[N_VEC_REMAINING]], 4
242242
; CHECK-NEXT: br i1 [[MIN_EPILOG_ITERS_CHECK]], label [[VEC_EPILOG_SCALAR_PH]], label [[VEC_EPILOG_PH]]
243243
; CHECK: vec.epilog.ph:
244-
; CHECK-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
245244
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i32 [ [[IND_END]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
246245
; CHECK-NEXT: [[BC_MERGE_RDX:%.*]] = phi i1 [ [[RDX_SELECT]], [[VEC_EPILOG_ITER_CHECK]] ], [ false, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
246+
; CHECK-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ [[N_VEC]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
247247
; CHECK-NEXT: [[TMP7:%.*]] = icmp ne i1 [[BC_MERGE_RDX]], false
248248
; CHECK-NEXT: [[N_MOD_VF2:%.*]] = urem i64 [[TMP0]], 4
249249
; CHECK-NEXT: [[N_VEC3:%.*]] = sub i64 [[TMP0]], [[N_MOD_VF2]]

llvm/test/Transforms/LoopVectorize/optimal-epilog-vectorization.ll

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -500,7 +500,6 @@ define void @induction_resume_value_requires_non_trivial_scev_expansion(ptr %dst
500500
; CHECK-NEXT: [[IND_END5:%.*]] = mul i8 84, [[INDUCTION_IV]]
501501
; CHECK-NEXT: br i1 true, label [[VEC_EPILOG_SCALAR_PH]], label [[VEC_EPILOG_PH]]
502502
; CHECK: vec.epilog.ph:
503-
; CHECK-NEXT: [[BC_RESUME_VAL1:%.*]] = phi i64 [ 85, [[VEC_EPILOG_ITER_CHECK]] ], [ 1, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
504503
; CHECK-NEXT: [[BC_RESUME_VAL:%.*]] = phi i8 [ [[IND_END]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
505504
; CHECK-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ 84, [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
506505
; CHECK-NEXT: [[IND_END4:%.*]] = mul i8 84, [[INDUCTION_IV]]
@@ -591,7 +590,6 @@ define void @induction_resume_value_requires_non_trivial_scev_expansion(ptr %dst
591590
; CHECK-PROFITABLE-BY-DEFAULT-NEXT: [[IND_END5:%.*]] = mul i8 84, [[INDUCTION_IV]]
592591
; CHECK-PROFITABLE-BY-DEFAULT-NEXT: br i1 true, label [[VEC_EPILOG_SCALAR_PH]], label [[VEC_EPILOG_PH]]
593592
; CHECK-PROFITABLE-BY-DEFAULT: vec.epilog.ph:
594-
; CHECK-PROFITABLE-BY-DEFAULT-NEXT: [[BC_RESUME_VAL1:%.*]] = phi i64 [ 85, [[VEC_EPILOG_ITER_CHECK]] ], [ 1, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
595593
; CHECK-PROFITABLE-BY-DEFAULT-NEXT: [[BC_RESUME_VAL:%.*]] = phi i8 [ [[IND_END]], [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
596594
; CHECK-PROFITABLE-BY-DEFAULT-NEXT: [[VEC_EPILOG_RESUME_VAL:%.*]] = phi i64 [ 84, [[VEC_EPILOG_ITER_CHECK]] ], [ 0, [[VECTOR_MAIN_LOOP_ITER_CHECK]] ]
597595
; CHECK-PROFITABLE-BY-DEFAULT-NEXT: [[IND_END4:%.*]] = mul i8 84, [[INDUCTION_IV]]

0 commit comments

Comments
 (0)