[llvm] 2a3ac7f - [NFC][IndVars] Add LLVM_DEBUG printout to replaceExitCond
Max Kazantsev via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 21 04:33:33 PST 2022
Author: Max Kazantsev
Date: 2022-11-21T19:33:26+07:00
New Revision: 2a3ac7fd0c9e25ecad272243dabc155e348f2910
URL: https://github.com/llvm/llvm-project/commit/2a3ac7fd0c9e25ecad272243dabc155e348f2910
DIFF: https://github.com/llvm/llvm-project/commit/2a3ac7fd0c9e25ecad272243dabc155e348f2910.diff
LOG: [NFC][IndVars] Add LLVM_DEBUG printout to replaceExitCond
Added:
Modified:
llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index fdc1232ad4fa..d9172b28ff7d 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -1292,6 +1292,8 @@ bool IndVarSimplify::sinkUnusedInvariants(Loop *L) {
static void replaceExitCond(BranchInst *BI, Value *NewCond,
SmallVectorImpl<WeakTrackingVH> &DeadInsts) {
auto *OldCond = BI->getCondition();
+ LLVM_DEBUG(dbgs() << "Replacing condition of loop-exiting branch " << *BI
+ << " with " << *NewCond << "\n");
BI->setCondition(NewCond);
if (OldCond->use_empty())
DeadInsts.emplace_back(OldCond);
More information about the llvm-commits
mailing list