summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorAndrew Trick <atrick@apple.com>2013-10-24 00:43:38 +0000
committerAndrew Trick <atrick@apple.com>2013-10-24 00:43:38 +0000
commitada2356ac95fefeed7b6f932e079e7f7415ebaf7 (patch)
treed601c99010ee86fb5c6cdd9b5d87af8555e29490 /llvm/lib/Transforms
parentc89fc826b2686f4805f689026ecaec8790e8a12f (diff)
downloadbcm5719-llvm-ada2356ac95fefeed7b6f932e079e7f7415ebaf7.tar.gz
bcm5719-llvm-ada2356ac95fefeed7b6f932e079e7f7415ebaf7.zip
Clarify comments in genLoopLimit.
llvm-svn: 193292
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/IndVarSimplify.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
index 9c092e6077e..7785855d0e1 100644
--- a/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
@@ -1506,9 +1506,10 @@ static Value *genLoopLimit(PHINode *IndVar, const SCEV *IVCount, Loop *L,
// 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.
OpenPOWER on IntegriCloud