There is no need to check to see if j overflowed in this loop as we're only
authorChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2004 05:28:21 +0000 (05:28 +0000)
committerChris Lattner <sabre@nondot.org>
Thu, 18 Nov 2004 05:28:21 +0000 (05:28 +0000)
incrementing i.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17944 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/LiveInterval.cpp

index 80a6ed290c713516a154a4d52bde2f9e25692197..54e460f7b46aacaac0c2f705bf8147f920f38598 100644 (file)
@@ -82,7 +82,9 @@ bool LiveInterval::overlapsFrom(const LiveInterval& other,
     return true;
   }
 
-  while (i != ie && j != je) {
+  if (j == je) return false;
+
+  while (i != ie) {
     if (i->start > j->start) {
       std::swap(i, j);
       std::swap(ie, je);