mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
Check that a live range exists before shortening it. This fixes PR8989.
The live range may have been deleted earlier because of rematerialization. llvm-svn: 123891
This commit is contained in:
parent
bb94da29b2
commit
ea33059ff5
@ -1685,9 +1685,11 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
|
||||
DoDelete = false;
|
||||
|
||||
if (MI->allDefsAreDead()) {
|
||||
LiveInterval &li = li_->getInterval(SrcReg);
|
||||
if (!ShortenDeadCopySrcLiveRange(li, MI))
|
||||
ShortenDeadCopyLiveRange(li, MI);
|
||||
if (li_->hasInterval(SrcReg)) {
|
||||
LiveInterval &li = li_->getInterval(SrcReg);
|
||||
if (!ShortenDeadCopySrcLiveRange(li, MI))
|
||||
ShortenDeadCopyLiveRange(li, MI);
|
||||
}
|
||||
DoDelete = true;
|
||||
}
|
||||
if (!DoDelete) {
|
||||
|
Loading…
Reference in New Issue
Block a user