Skip to content

Commit 8735780

Browse files
committed
[InstCombine] Use replaceOperand() in non zero phi transform
To make sure the old operand gets DCEd. NFC apart from worklist order changes.
1 parent f3d4166 commit 8735780

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstCombinePHI.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1203,7 +1203,7 @@ Instruction *InstCombiner::visitPHINode(PHINode &PN) {
12031203
NonZeroConst = GetAnyNonZeroConstInt(PN);
12041204

12051205
if (NonZeroConst != VA) {
1206-
PN.setIncomingValue(i, NonZeroConst);
1206+
replaceOperand(PN, i, NonZeroConst);
12071207
MadeChange = true;
12081208
}
12091209
}

0 commit comments

Comments
 (0)