Skip to content

Commit 76e91cc

Browse files
committed
Revert "Refine the expression of valid range"
This reverts commit 4bd1df2.
1 parent dd21cd3 commit 76e91cc

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 =
733-
ConstantRange::getFull(NumBits).difference(ConstantRange(Sentinel));
732+
const ConstantRange ValidRange = ConstantRange::getNonEmpty(
733+
Sentinel + 1, APInt::getSignedMinValue(NumBits));
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)