diff options
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); |