1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 19:12:56 +02:00

Temporarily revert 123133, it's causing some regressions and I'm trying

to get a testcase.

llvm-svn: 123225
This commit is contained in:
Eric Christopher 2011-01-11 09:02:09 +00:00
parent e5688368c6
commit e86e1aecd8

View File

@ -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;