diff options
author | Dan Gohman <gohman@apple.com> | 2009-12-18 03:57:04 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-12-18 03:57:04 +0000 |
commit | 3a5d409f3c2eccf1d1f0a4616023760829a4db67 (patch) | |
tree | d5f00b176ede53c7f23c1b43c26160933dee4a7f /lib/Analysis/ScalarEvolution.cpp | |
parent | ad12b2698baaa0b4168a933e9c9a2756e208521a (diff) | |
download | llvm-3a5d409f3c2eccf1d1f0a4616023760829a4db67.tar.gz llvm-3a5d409f3c2eccf1d1f0a4616023760829a4db67.tar.bz2 llvm-3a5d409f3c2eccf1d1f0a4616023760829a4db67.tar.xz |
Revert this use of NSW; this one isn't actually safe. NSW addition
is not reassociative.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91667 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Analysis/ScalarEvolution.cpp')
-rw-r--r-- | lib/Analysis/ScalarEvolution.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp index 75572a7ba2..3c937e05cc 100644 --- a/lib/Analysis/ScalarEvolution.cpp +++ b/lib/Analysis/ScalarEvolution.cpp @@ -1457,12 +1457,10 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops, LIOps.push_back(AddRec->getStart()); SmallVector<const SCEV *, 4> AddRecOps(AddRec->op_begin(), - AddRec->op_end()); + AddRec->op_end()); AddRecOps[0] = getAddExpr(LIOps); - const SCEV *NewRec = getAddRecExpr(AddRecOps, AddRec->getLoop(), - AddRec->hasNoUnsignedWrap() && HasNUW, - AddRec->hasNoSignedWrap() && HasNSW); + const SCEV *NewRec = getAddRecExpr(AddRecOps, AddRec->getLoop()); // If all of the other operands were loop invariant, we are done. if (Ops.size() == 1) return NewRec; |