diff options
author | Chris Lattner <sabre@nondot.org> | 2004-11-18 05:28:21 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2004-11-18 05:28:21 +0000 |
commit | 9fddc12c9b16a5526b0ee2e6f1da252f7974d7d0 (patch) | |
tree | 3715f3c6e1a575360e4c4e92279f88d7282e5051 /lib/CodeGen/LiveInterval.cpp | |
parent | 1e409bfd2adf441b92f84e09706b768513f42c85 (diff) |
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
Diffstat (limited to 'lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | lib/CodeGen/LiveInterval.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp index 80a6ed290c..54e460f7b4 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); |