mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-29 22:30:33 +00:00
Fix the sense of joinable
llvm-svn: 15196
This commit is contained in:
parent
db6b0d2361
commit
fd9f044bcf
@ -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;
|
||||
}
|
||||
|
||||
|
||||
|
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user