From 78582735b62768556edf60416fde763fa4e9cf07 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Mon, 1 Sep 2025 00:07:10 -0700 Subject: [PATCH] [InstCombine] Remove unnecessary casts (NFC) These variables are already non const. --- llvm/lib/Transforms/InstCombine/InstructionCombining.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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(*PN), - const_cast(*NewPN), - const_cast(*PN), DT); + replaceAllDbgUsesWith(*PN, *NewPN, *PN, DT); } return replaceInstUsesWith(I, NewPN); }