mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
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
This commit is contained in:
parent
ad12b2698b
commit
3a5d409f3c
@ -1457,12 +1457,10 @@ const SCEV *ScalarEvolution::getAddExpr(SmallVectorImpl<const SCEV *> &Ops,
|
|||||||
LIOps.push_back(AddRec->getStart());
|
LIOps.push_back(AddRec->getStart());
|
||||||
|
|
||||||
SmallVector<const SCEV *, 4> AddRecOps(AddRec->op_begin(),
|
SmallVector<const SCEV *, 4> AddRecOps(AddRec->op_begin(),
|
||||||
AddRec->op_end());
|
AddRec->op_end());
|
||||||
AddRecOps[0] = getAddExpr(LIOps);
|
AddRecOps[0] = getAddExpr(LIOps);
|
||||||
|
|
||||||
const SCEV *NewRec = getAddRecExpr(AddRecOps, AddRec->getLoop(),
|
const SCEV *NewRec = getAddRecExpr(AddRecOps, AddRec->getLoop());
|
||||||
AddRec->hasNoUnsignedWrap() && HasNUW,
|
|
||||||
AddRec->hasNoSignedWrap() && HasNSW);
|
|
||||||
// If all of the other operands were loop invariant, we are done.
|
// If all of the other operands were loop invariant, we are done.
|
||||||
if (Ops.size() == 1) return NewRec;
|
if (Ops.size() == 1) return NewRec;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user