Simplify overlap check.
authorJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 19 May 2012 23:59:27 +0000 (23:59 +0000)
committerJakob Stoklund Olesen <stoklund@2pi.dk>
Sat, 19 May 2012 23:59:27 +0000 (23:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157137 91177308-0d34-0410-b5e6-96231b3b80d8

lib/CodeGen/RegisterCoalescer.cpp

index ca5d2807397cc2b255e7be7bc66b2f2c8be1f4f7..7831906c620a9839bc5f018420192b6d6df3d289 100644 (file)
@@ -1397,15 +1397,8 @@ bool RegisterCoalescer::joinIntervals(CoalescerPair &CP) {
 
   while (I != IE && J != JE) {
     // Determine if these two live ranges overlap.
-    bool Overlaps;
-    if (I->start < J->start) {
-      Overlaps = I->end > J->start;
-    } else {
-      Overlaps = J->end > I->start;
-    }
-
     // If so, check value # info to determine if they are really different.
-    if (Overlaps) {
+    if (I->end > J->start && J->end > I->start) {
       // If the live range overlap will map to the same value number in the
       // result liverange, we can still coalesce them.  If not, we can't.
       if (LHSValNoAssignments[I->valno->id] !=