When computing a new ConservativeResult, intersect it with

the old one instead of replacing it, to be more precise.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@107256 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Dan Gohman 2010-06-30 06:58:35 +00:00
parent 49bda917db
commit 8a18d6b48f

View File

@ -2958,7 +2958,8 @@ ScalarEvolution::getUnsignedRange(const SCEV *S) {
if (const SCEVConstant *C = dyn_cast<SCEVConstant>(AddRec->getStart()))
if (!C->getValue()->isZero())
ConservativeResult =
ConstantRange(C->getValue()->getValue(), APInt(BitWidth, 0));
ConservativeResult.intersectWith(
ConstantRange(C->getValue()->getValue(), APInt(BitWidth, 0)));
// TODO: non-affine addrec
if (AddRec->isAffine()) {