[llvm] r193292 - Clarify comments in genLoopLimit.

Andrew Trick atrick at apple.com
Wed Oct 23 17:43:38 PDT 2013


Author: atrick
Date: Wed Oct 23 19:43:38 2013
New Revision: 193292

URL: http://llvm.org/viewvc/llvm-project?rev=193292&view=rev
Log:
Clarify comments in genLoopLimit.

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=193292&r1=193291&r2=193292&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/IndVarSimplify.cpp Wed Oct 23 19:43:38 2013
@@ -1506,9 +1506,10 @@ static Value *genLoopLimit(PHINode *IndV
     // BECount = (IVEnd - IVInit - 1) => IVLimit = IVInit (postinc).
     //
     // Valid Cases: (1) both integers is most common; (2) both may be pointers
-    // for simple memset-style loops; (3) IVInit is an integer and IVCount is a
-    // pointer may occur when enable-iv-rewrite generates a canonical IV on top
-    // of case #2.
+    // for simple memset-style loops.
+    //
+    // IVInit integer and IVCount pointer would only occur if a canonical IV
+    // were generated on top of case #2, which is not expected.
 
     const SCEV *IVLimit = 0;
     // For unit stride, IVCount = Start + BECount with 2's complement overflow.





More information about the llvm-commits mailing list