From 2a3ac7fd0c9e25ecad272243dabc155e348f2910 Mon Sep 17 00:00:00 2001 From: Max Kazantsev Date: Mon, 21 Nov 2022 19:18:53 +0700 Subject: [PATCH] [NFC][IndVars] Add LLVM_DEBUG printout to replaceExitCond --- llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index fdc1232..d9172b2 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 &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); -- 2.7.4