Skip to content

Commit 88e9c56

Browse files
committed
[LV] Don't adjust name of recurrence phi in scalar loop (NFC).
Adjusting the name of the recurrence phi in the scalar loop is a bit inconsistent, as we do not adjust any other names in the scalar loops (including other phis). Remove this adjustment in preparation for llvm#94760 and as discussed there.
1 parent 0df7143 commit 88e9c56

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3390,7 +3390,6 @@ void InnerLoopVectorizer::fixFixedOrderRecurrence(VPLiveOut *LO,
33903390
}
33913391
ScalarHeaderPhi->setIncomingValueForBlock(LoopScalarPreHeader,
33923392
ScalarPreheaderPhi);
3393-
ScalarHeaderPhi->setName("scalar.recur");
33943393
}
33953394

33963395
void InnerLoopVectorizer::sinkScalarOperands(Instruction *PredInst) {

llvm/test/Transforms/LoopVectorize/pr36983.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
; There could be more than one LCSSA PHIs in loop exit block.
44

55
; CHECK-LABEL: bb1.bb3_crit_edge:
6-
; CHECK: %_tmp133.lcssa1 = phi i16 [ %scalar.recur, %bb2 ], [ %vector.recur.extract.for.phi, %middle.block ]
7-
; CHECK: %_tmp133.lcssa = phi i16 [ %scalar.recur, %bb2 ], [ %vector.recur.extract.for.phi, %middle.block ]
6+
; CHECK: %_tmp133.lcssa1 = phi i16 [ %_tmp133, %bb2 ], [ %vector.recur.extract.for.phi, %middle.block ]
7+
; CHECK: %_tmp133.lcssa = phi i16 [ %_tmp133, %bb2 ], [ %vector.recur.extract.for.phi, %middle.block ]
88

99
define void @f1() {
1010
bb2.lr.ph:

0 commit comments

Comments
 (0)