mirror of
https://github.com/RPCSX/llvm.git
synced 2024-12-28 15:33:14 +00:00
Make sure a reserved register has a live interval before merging.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149910 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
8833ef03b9
commit
602cb9d9f2
@ -1414,8 +1414,12 @@ bool RegisterCoalescer::JoinIntervals(CoalescerPair &CP) {
|
||||
// Deny any overlapping intervals. This depends on all the reserved
|
||||
// register live ranges to look like dead defs.
|
||||
for (const unsigned *AS = TRI->getOverlaps(CP.getDstReg()); *AS; ++AS) {
|
||||
if (!LIS->hasInterval(*AS))
|
||||
if (!LIS->hasInterval(*AS)) {
|
||||
// Make sure at least DstReg itself exists before attempting a join.
|
||||
if (*AS == CP.getDstReg())
|
||||
LIS->getOrCreateInterval(CP.getDstReg());
|
||||
continue;
|
||||
}
|
||||
if (RHS.overlaps(LIS->getInterval(*AS))) {
|
||||
DEBUG(dbgs() << "\t\tInterference: " << PrintReg(*AS, TRI) << '\n');
|
||||
return false;
|
||||
|
Loading…
Reference in New Issue
Block a user