[llvm-commits] [llvm] r165238 - /llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp

Jakub Staszak kubastaszak at gmail.com
Thu Oct 4 12:08:30 PDT 2012


Author: kuba
Date: Thu Oct  4 14:08:30 2012
New Revision: 165238

URL: http://llvm.org/viewvc/llvm-project?rev=165238&view=rev
Log:
Add a comment to the commit r165187.

Modified:
    llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp

Modified: llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp?rev=165238&r1=165237&r2=165238&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Thu Oct  4 14:08:30 2012
@@ -1261,10 +1261,12 @@
   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);
 }





More information about the llvm-commits mailing list