summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
diff options
context:
space:
mode:
authorPhilip Reames <listmail@philipreames.com>2019-06-25 20:14:08 +0000
committerPhilip Reames <listmail@philipreames.com>2019-06-25 20:14:08 +0000
commitc42a3571786993141800fbaa290e5325815571c6 (patch)
tree3b7ec447efded455f9384fb09399f14684ad2906 /llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
parent3ad32a037efc5e141be1a9234859b649c7484886 (diff)
downloadbcm5719-llvm-c42a3571786993141800fbaa290e5325815571c6.tar.gz
bcm5719-llvm-c42a3571786993141800fbaa290e5325815571c6.zip
[LFTR] Adjust debug output to include extensions (if any)
llvm-svn: 364346
Diffstat (limited to 'llvm/lib/Transforms/Scalar/IndVarSimplify.cpp')
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 74b70278e3f..5c4b8f734a9 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -2463,13 +2463,6 @@ linearFunctionTestReplace(Loop *L, BasicBlock *ExitingBB,
else
P = ICmpInst::ICMP_EQ;
- LLVM_DEBUG(dbgs() << "INDVARS: Rewriting loop exit condition to:\n"
- << " LHS:" << *CmpIndVar << '\n'
- << " op:\t" << (P == ICmpInst::ICMP_NE ? "!=" : "==")
- << "\n"
- << " RHS:\t" << *ExitCnt << "\n"
- << " IVCount:\t" << *IVCount << "\n");
-
IRBuilder<> Builder(BI);
// The new loop exit condition should reuse the debug location of the
@@ -2538,6 +2531,14 @@ linearFunctionTestReplace(Loop *L, BasicBlock *ExitingBB,
"lftr.wideiv");
}
}
+ LLVM_DEBUG(dbgs() << "INDVARS: Rewriting loop exit condition to:\n"
+ << " LHS:" << *CmpIndVar << '\n'
+ << " op:\t" << (P == ICmpInst::ICMP_NE ? "!=" : "==")
+ << "\n"
+ << " RHS:\t" << *ExitCnt << "\n"
+ << " IVCount:\t" << *IVCount << "\n"
+ << " was: " << *BI->getCondition() << "\n");
+
Value *Cond = Builder.CreateICmp(P, CmpIndVar, ExitCnt, "exitcond");
Value *OrigCond = BI->getCondition();
// It's tempting to use replaceAllUsesWith here to fully replace the old
OpenPOWER on IntegriCloud