mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-03-12 17:37:13 +00:00
Check that a live range exists before shortening it. This fixes PR8989.
The live range may have been deleted earlier because of rematerialization. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@123891 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
b908a009cf
commit
fd50d76ff8
@ -1685,9 +1685,11 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
|
||||
DoDelete = false;
|
||||
|
||||
if (MI->allDefsAreDead()) {
|
||||
if (li_->hasInterval(SrcReg)) {
|
||||
LiveInterval &li = li_->getInterval(SrcReg);
|
||||
if (!ShortenDeadCopySrcLiveRange(li, MI))
|
||||
ShortenDeadCopyLiveRange(li, MI);
|
||||
}
|
||||
DoDelete = true;
|
||||
}
|
||||
if (!DoDelete) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user