diff options
author | Eric Christopher <echristo@apple.com> | 2011-01-11 09:02:09 +0000 |
---|---|---|
committer | Eric Christopher <echristo@apple.com> | 2011-01-11 09:02:09 +0000 |
commit | 23bf3bafb71107523987b59ef1b206987401a8d1 (patch) | |
tree | dcbf927ff04dd1d8fba9c9e703c6336c68ddc57d /llvm/lib/Analysis/ScalarEvolution.cpp | |
parent | 193ce7c4d16d5b79cb00936ec4aef10675b07976 (diff) | |
download | bcm5719-llvm-23bf3bafb71107523987b59ef1b206987401a8d1.tar.gz bcm5719-llvm-23bf3bafb71107523987b59ef1b206987401a8d1.zip |
Temporarily revert 123133, it's causing some regressions and I'm trying
to get a testcase.
llvm-svn: 123225
Diffstat (limited to 'llvm/lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | llvm/lib/Analysis/ScalarEvolution.cpp | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp index 8deade345fe..ead43721c36 100644 --- a/llvm/lib/Analysis/ScalarEvolution.cpp +++ b/llvm/lib/Analysis/ScalarEvolution.cpp @@ -1560,14 +1560,10 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops, AddRecOps[0] = getAddExpr(LIOps); // Build the new addrec. Propagate the NUW and NSW flags if both the - // outer add and the inner addrec are guaranteed to have no overflow or if - // there is no outer part. - if (Ops.size() != 1) { - HasNUW &= AddRec->hasNoUnsignedWrap(); - HasNSW &= AddRec->hasNoSignedWrap(); - } - - const SCEV *NewRec = getAddRecExpr(AddRecOps, AddRecLoop, HasNUW, HasNSW); + // outer add and the inner addrec are guaranteed to have no overflow. + const SCEV *NewRec = getAddRecExpr(AddRecOps, AddRecLoop, + HasNUW && AddRec->hasNoUnsignedWrap(), + HasNSW && AddRec->hasNoSignedWrap()); // If all of the other operands were loop invariant, we are done. if (Ops.size() == 1) return NewRec; |