Skip to content

Commit c538c57

Browse files
committed
[InstCombine] Use replaceOperand() in descaling
To make sure the old operand gets DCEd. NFC apart from worklist order.
1 parent 19df7fa commit c538c57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1481,7 +1481,7 @@ Value *InstCombiner::Descale(Value *Val, APInt Scale, bool &NoSignedWrap) {
14811481
assert(Parent.first->hasOneUse() && "Drilled down when more than one use!");
14821482
assert(Op != Parent.first->getOperand(Parent.second) &&
14831483
"Descaling was a no-op?");
1484-
Parent.first->setOperand(Parent.second, Op);
1484+
replaceOperand(*Parent.first, Parent.second, Op);
14851485
Worklist.push(Parent.first);
14861486

14871487
// Now work back up the expression correcting nsw flags. The logic is based

0 commit comments

Comments
 (0)