aboutsummaryrefslogtreecommitdiffstats
path: root/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
commit577ac566c45670cd8ef03e202cb92258c643574d (patch)
tree0caba1482ae0c84a38ed5ab16d82ed8334a7aacb /lib/Transforms
parent2ad18efdc73bc2356aa7fbf811d5ecbbaac0f2c9 (diff)
downloadexternal_llvm-577ac566c45670cd8ef03e202cb92258c643574d.zip
external_llvm-577ac566c45670cd8ef03e202cb92258c643574d.tar.gz
external_llvm-577ac566c45670cd8ef03e202cb92258c643574d.tar.bz2
Clarify comments in genLoopLimit.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@193292 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/Scalar/IndVarSimplify.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp
index 9c092e6..7785855 100644
--- a/lib/Transforms/Scalar/IndVarSimplify.cpp
+++ b/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.