Skip to content
This repository was archived by the owner on Feb 5, 2019. It is now read-only.

Commit a991ea5

Browse files
committed
Simplify overlap check.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157137 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 7ebed91 commit a991ea5

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

lib/CodeGen/RegisterCoalescer.cpp

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1397,15 +1397,8 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
13971397

13981398
while (I != IE && J != JE) {
13991399
// Determine if these two live ranges overlap.
1400-
bool Overlaps;
1401-
if (I->start < J->start) {
1402-
Overlaps = I->end > J->start;
1403-
} else {
1404-
Overlaps = J->end > I->start;
1405-
}
1406-
14071400
// If so, check value # info to determine if they are really different.
1408-
if (Overlaps) {
1401+
if (I->end > J->start && J->end > I->start) {
14091402
// If the live range overlap will map to the same value number in the
14101403
// result liverange, we can still coalesce them. If not, we can't.
14111404
if (LHSValNoAssignments[I->valno->id] !=

0 commit comments

Comments
 (0)