[llvm] a36a401 - [InstCombine] Remove unnecessary casts (NFC) (#156394)
via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 1 23:12:11 PDT 2025
Author: Kazu Hirata
Date: 2025-09-01T23:12:07-07:00
New Revision: a36a4019d371c00237c92e6d53f38b897b0fe66c
URL: https://github.com/llvm/llvm-project/commit/a36a4019d371c00237c92e6d53f38b897b0fe66c
DIFF: https://github.com/llvm/llvm-project/commit/a36a4019d371c00237c92e6d53f38b897b0fe66c.diff
LOG: [InstCombine] Remove unnecessary casts (NFC) (#156394)
These variables are already non const.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 5ed091a631896..1a9b54bc009bc 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -2027,9 +2027,7 @@ Instruction *InstCombinerImpl::foldOpIntoPhi(Instruction &I, PHINode *PN,
}
if (OneUse) {
- replaceAllDbgUsesWith(const_cast<PHINode &>(*PN),
- const_cast<PHINode &>(*NewPN),
- const_cast<PHINode &>(*PN), DT);
+ replaceAllDbgUsesWith(*PN, *NewPN, *PN, DT);
}
return replaceInstUsesWith(I, NewPN);
}
More information about the llvm-commits
mailing list