Skip to content

Commit 4f743ab

Browse files
committed
Refine the expression of valid range
1 parent 76e91cc commit 4f743ab

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/Analysis/IVDescriptors.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,8 +729,8 @@ RecurrenceDescriptor::isFindLastIVPattern(PHINode *OrigPhi, Instruction *I,
729729
// TODO: This range restriction can be lifted by adding an additional
730730
// virtual OR reduction.
731731
const APInt Sentinel = APInt::getSignedMinValue(NumBits);
732-
const ConstantRange ValidRange = ConstantRange::getNonEmpty(
733-
Sentinel + 1, APInt::getSignedMinValue(NumBits));
732+
const ConstantRange ValidRange =
733+
ConstantRange::getNonEmpty(Sentinel + 1, Sentinel);
734734
LLVM_DEBUG(dbgs() << "LV: FindLastIV valid range is " << ValidRange
735735
<< ", and the signed range of " << *AR << " is "
736736
<< IVRange << "\n");

0 commit comments

Comments
 (0)