Skip to content

Commit a36a401

Browse files
[InstCombine] Remove unnecessary casts (NFC) (#156394)
These variables are already non const.
1 parent 6f35a6a commit a36a401

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

llvm/lib/Transforms/InstCombine/InstructionCombining.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2027,9 +2027,7 @@ Instruction *InstCombinerImpl::foldOpIntoPhi(Instruction &I, PHINode *PN,
20272027
}
20282028

20292029
if (OneUse) {
2030-
replaceAllDbgUsesWith(const_cast<PHINode &>(*PN),
2031-
const_cast<PHINode &>(*NewPN),
2032-
const_cast<PHINode &>(*PN), DT);
2030+
replaceAllDbgUsesWith(*PN, *NewPN, *PN, DT);
20332031
}
20342032
return replaceInstUsesWith(I, NewPN);
20352033
}

0 commit comments

Comments
 (0)