mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-21 18:24:23 +00:00
When creating a ConstantRange for [n,UINT_MAX], special case n == 0, because
ConstantRange(0, 0) creates an empty range rather than a full one. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@100993 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -2920,9 +2920,10 @@ ScalarEvolution::getUnsignedRange(const SCEV *S) {
|
|||||||
// initial value.
|
// initial value.
|
||||||
if (AddRec->hasNoUnsignedWrap())
|
if (AddRec->hasNoUnsignedWrap())
|
||||||
if (const SCEVConstant *C = dyn_cast<SCEVConstant>(AddRec->getStart()))
|
if (const SCEVConstant *C = dyn_cast<SCEVConstant>(AddRec->getStart()))
|
||||||
ConservativeResult =
|
if (!C->isZero())
|
||||||
ConstantRange(C->getValue()->getValue(),
|
ConservativeResult =
|
||||||
APInt(getTypeSizeInBits(C->getType()), 0));
|
ConstantRange(C->getValue()->getValue(),
|
||||||
|
APInt(getTypeSizeInBits(C->getType()), 0));
|
||||||
|
|
||||||
// TODO: non-affine addrec
|
// TODO: non-affine addrec
|
||||||
if (AddRec->isAffine()) {
|
if (AddRec->isAffine()) {
|
||||||
|
Reference in New Issue
Block a user