Revert this use of NSW; this one isn't actually safe. NSW addition
authorDan Gohman <gohman@apple.com>
Fri, 18 Dec 2009 03:57:04 +0000 (03:57 +0000)
committerDan Gohman <gohman@apple.com>
Fri, 18 Dec 2009 03:57:04 +0000 (03:57 +0000)
is not reassociative.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91667 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index 75572a7ba20f1d3d2e29efe6c40dd3b3b1854d45..3c937e05cc52a6e49b49295c6300ce604872a29a 100644 (file)
@@ -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;