aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/CodeGen/LiveInterval.cpp8
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/LiveInterval.cpp b/lib/CodeGen/LiveInterval.cpp
index 5326511104..6bd441f643 100644
--- a/lib/CodeGen/LiveInterval.cpp
+++ b/lib/CodeGen/LiveInterval.cpp
@@ -116,16 +116,16 @@ bool LiveInterval::joinable(const LiveInterval &other, unsigned CopyIdx) const {
if (i->start == j->start) {
// If this is not the allowed value merge, we cannot join.
if (i->ValId != ThisValIdx || j->ValId != OtherValIdx)
- return true;
+ return false;
} else if (i->start < j->start) {
if (i->end > j->start) {
if (i->ValId != ThisValIdx || j->ValId != OtherValIdx)
- return true;
+ return false;
}
} else {
if (j->end > i->start) {
if (i->ValId != ThisValIdx || j->ValId != OtherValIdx)
- return true;
+ return false;
}
}
if (i->end < j->end)
@@ -134,7 +134,7 @@ bool LiveInterval::joinable(const LiveInterval &other, unsigned CopyIdx) const {
++j;
}
- return false;
+ return true;
}
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 361210e106..ed90fca3df 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -577,7 +577,7 @@ void LiveIntervals::joinIntervalsInMachineBB(MachineBasicBlock *MBB) {
IntA.containsOneValue() && IntB.containsOneValue();
unsigned MIDefIdx = getDefIndex(getInstructionIndex(mi));
- if ((TriviallyJoinable || !IntB.joinable(IntA, MIDefIdx)) &&
+ if ((TriviallyJoinable || IntB.joinable(IntA, MIDefIdx)) &&
!overlapsAliases(&IntA, &IntB)) {
IntB.join(IntA, MIDefIdx);