llvm.org GIT mirror llvm / bc02853
Add a comment. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96688 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 10 years ago
1 changed file(s) with 6 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
19721972 return getAddRecExpr(Operands, L, HasNUW, HasNSW); // {X,+,0} --> X
19731973 }
19741974
1975 // It's tempting to want to call getMaxBackedgeTakenCount count here and
1976 // use that information to infer NUW and NSW flags. However, computing a
1977 // BE count requires calling getAddRecExpr, so we may not yet have a
1978 // meaningful BE count at this point (and if we don't, we'd be stuck
1979 // with a SCEVCouldNotCompute as the cached BE count).
1980
19751981 // If HasNSW is true and all the operands are non-negative, infer HasNUW.
19761982 if (!HasNUW && HasNSW) {
19771983 bool All = true;