diff options
author | Momchil Velikov <momchil.velikov@arm.com> | 2023-04-11 09:45:15 +0100 |
---|---|---|
committer | Momchil Velikov <momchil.velikov@arm.com> | 2023-04-11 11:11:30 +0100 |
commit | 4ac6f99ae0f58d0d3ad56b46240112c5bdd8fc0a (patch) | |
tree | 59e21ccc83d779cc0cad7c0d77a383d5e4821da2 /llvm/lib/CodeGen/LiveInterval.cpp | |
parent | 7b8692a55ca75a68cd538c254ed1027995512ef3 (diff) | |
download | llvm-4ac6f99ae0f58d0d3ad56b46240112c5bdd8fc0a.zip llvm-4ac6f99ae0f58d0d3ad56b46240112c5bdd8fc0a.tar.gz llvm-4ac6f99ae0f58d0d3ad56b46240112c5bdd8fc0a.tar.bz2 |
[LiveInterval] Fix live range overlap check
Reviewed By: MatzeB
Differential Revision: https://reviews.llvm.org/D145707
Diffstat (limited to 'llvm/lib/CodeGen/LiveInterval.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveInterval.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/LiveInterval.cpp b/llvm/lib/CodeGen/LiveInterval.cpp index 7cd3d26..1cf3543 100644 --- a/llvm/lib/CodeGen/LiveInterval.cpp +++ b/llvm/lib/CodeGen/LiveInterval.cpp @@ -445,7 +445,7 @@ bool LiveRange::overlaps(const LiveRange &Other, const CoalescerPair &CP, while (true) { // J has just been advanced to satisfy: - assert(J->end >= I->start); + assert(J->end > I->start); // Check for an overlap. if (J->start < I->end) { // I and J are overlapping. Find the later start. @@ -460,11 +460,11 @@ bool LiveRange::overlaps(const LiveRange &Other, const CoalescerPair &CP, std::swap(I, J); std::swap(IE, JE); } - // Advance J until J->end >= I->start. + // Advance J until J->end > I->start. do if (++J == JE) return false; - while (J->end < I->start); + while (J->end <= I->start); } } |