Skip to content

Commit af0723d

Browse files
committed
Add comment for wrap check
1 parent 1c33007 commit af0723d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Analysis/IVDescriptors.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -733,6 +733,8 @@ RecurrenceDescriptor::isFindLastIVPattern(PHINode *OrigPhi, Instruction *I,
733733
LLVM_DEBUG(dbgs() << "LV: FindLastIV valid range is " << ValidRange
734734
<< ", and the signed range of " << *AR << " is "
735735
<< IVRange << "\n");
736+
// Ensure the induction variable does not wrap around by verifying that its
737+
// range is fully contained within the valid range.
736738
return ValidRange.contains(IVRange);
737739
};
738740

0 commit comments

Comments
 (0)