diff options
author | Chris Lattner <sabre@nondot.org> | 2011-01-11 17:11:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-01-11 17:11:59 +0000 |
commit | d30de95520dbefc1f7612b5c728dc90a3e791eb4 (patch) | |
tree | 8a143e3f3d2a4e79ab591e53eaa85e3762be78cc /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | abd2dfd3dc8577db8b3e3aa21d00fc16973db447 (diff) | |
download | bcm5719-llvm-d30de95520dbefc1f7612b5c728dc90a3e791eb4.tar.gz bcm5719-llvm-d30de95520dbefc1f7612b5c728dc90a3e791eb4.zip |
some comment improvements.
llvm-svn: 123243
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index ead43721c36..b3df9261195 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -2446,8 +2446,9 @@ const SCEV *ScalarEvolution::getNotSCEV(const SCEV *V) { return getMinusSCEV(AllOnes, V); } -/// getMinusSCEV - Return a SCEV corresponding to LHS - RHS. -/// +/// getMinusSCEV - Return LHS-RHS. Minus is represented in SCEV as A+B*-1, +/// and thus the HasNUW and HasNSW bits apply to the resultant add, not +/// whether the sub would have overflowed. const SCEV *ScalarEvolution::getMinusSCEV(const SCEV *LHS, const SCEV *RHS, bool HasNUW, bool HasNSW) { // Fast path: X - X --> 0. @@ -4021,7 +4022,7 @@ static const SCEV *getMinusSCEVForExitTest(const SCEV *LHS, const SCEV *RHS, cast<SCEVConstant>(RHSA->getOperand(1))->getValue(); // If the strides are equal, then this is just a (complex) loop invariant - // comparison of a/b. + // comparison of a and b. if (LHSStride == RHSStride) return SE.getMinusSCEV(LHSA->getStart(), RHSA->getStart()); |