If the coalescer commuted a def MI to allow coalescing, it can changed a previously coalesced copy into an non-identity copy.
llvm-svn: 48752
This commit is contained in:
parent
6e225173c5
commit
69a3f9c417
|
@ -323,7 +323,8 @@ bool SimpleRegisterCoalescing::RemoveCopyByCommutingDef(LiveInterval &IntA,
|
||||||
MachineInstr *UseMI = &*UI;
|
MachineInstr *UseMI = &*UI;
|
||||||
++UI;
|
++UI;
|
||||||
if (JoinedCopies.count(UseMI))
|
if (JoinedCopies.count(UseMI))
|
||||||
continue;
|
// It'll no longer be "joined" after the change.
|
||||||
|
JoinedCopies.erase(UseMI);
|
||||||
unsigned UseIdx = li_->getInstructionIndex(UseMI);
|
unsigned UseIdx = li_->getInstructionIndex(UseMI);
|
||||||
LiveInterval::iterator ULR = IntA.FindLiveRangeContaining(UseIdx);
|
LiveInterval::iterator ULR = IntA.FindLiveRangeContaining(UseIdx);
|
||||||
if (ULR->valno != AValNo)
|
if (ULR->valno != AValNo)
|
||||||
|
|
Loading…
Reference in New Issue