diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2012-10-04 19:08:30 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2012-10-04 19:08:30 +0000 |
commit | e076cac097bf2ef86157dcda4282661a8900d382 (patch) | |
tree | 440e3c4ff5d13e7f7eacd4ee0d3228e62b392934 /llvm/lib | |
parent | 4a67f2e2a7f84f9535e32a42dcdd21cd0244b8d4 (diff) | |
download | bcm5719-llvm-e076cac097bf2ef86157dcda4282661a8900d382.tar.gz bcm5719-llvm-e076cac097bf2ef86157dcda4282661a8900d382.zip |
Add a comment to the commit r165187.
llvm-svn: 165238
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Scalar/IndVarSimplify.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp index 23d0bb51b3e..af0ee34d0d1 100644 --- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -1261,10 +1261,12 @@ static bool needsLFTR(Loop *L, DominatorTree *DT) { if (!Phi) return true; - // Do LFTR if the exit condition's IV is *not* a simple counter. + // Do LFTR if PHI node is defined in the loop, but is *not* a counter. int Idx = Phi->getBasicBlockIndex(L->getLoopLatch()); if (Idx < 0) return true; + + // Do LFTR if the exit condition's IV is *not* a simple counter. Value *IncV = Phi->getIncomingValue(Idx); return Phi != getLoopPhiForCounter(IncV, L, DT); } |