forked from OSchip/llvm-project
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
145755f1d6
commit
4060abb4b9
|
@ -1685,9 +1685,11 @@ bool SimpleRegisterCoalescing::runOnMachineFunction(MachineFunction &fn) {
|
||||||
DoDelete = false;
|
DoDelete = false;
|
||||||
|
|
||||||
if (MI->allDefsAreDead()) {
|
if (MI->allDefsAreDead()) {
|
||||||
LiveInterval &li = li_->getInterval(SrcReg);
|
if (li_->hasInterval(SrcReg)) {
|
||||||
if (!ShortenDeadCopySrcLiveRange(li, MI))
|
LiveInterval &li = li_->getInterval(SrcReg);
|
||||||
ShortenDeadCopyLiveRange(li, MI);
|
if (!ShortenDeadCopySrcLiveRange(li, MI))
|
||||||
|
ShortenDeadCopyLiveRange(li, MI);
|
||||||
|
}
|
||||||
DoDelete = true;
|
DoDelete = true;
|
||||||
}
|
}
|
||||||
if (!DoDelete) {
|
if (!DoDelete) {
|
||||||
|
|
Loading…
Reference in New Issue