From 9fddc12c9b16a5526b0ee2e6f1da252f7974d7d0 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Thu, 18 Nov 2004 05:28:21 +0000 Subject: [PATCH] There is no need to check to see if j overflowed in this loop as we're only incrementing i. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17944 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/LiveInterval.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 80a6ed290c7..54e460f7b46 100644 --- a/lib/CodeGen/LiveInterval.cpp +++ b/lib/CodeGen/LiveInterval.cpp @@ -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);