Remat uncoalescable COPY instrs

llvm-svn: 108010
This commit is contained in:
Jakob Stoklund Olesen 2010-07-09 20:43:05 +00:00
parent b591b3b48d
commit c99c720728

View File

@ -781,6 +781,17 @@ SimpleRegisterCoalescing::UpdateRegDefsUses(const CoalescerPair &CP) {
ReMaterializeTrivialDef(li_->getInterval(SrcReg), CopyDstReg, 0,
UseMI))
continue;
if (UseMI->isCopy() &&
!UseMI->getOperand(1).getSubReg() &&
!UseMI->getOperand(0).getSubReg() &&
UseMI->getOperand(1).getReg() == SrcReg &&
UseMI->getOperand(0).getReg() != SrcReg &&
UseMI->getOperand(0).getReg() != DstReg &&
!JoinedCopies.count(UseMI) &&
ReMaterializeTrivialDef(li_->getInterval(SrcReg),
UseMI->getOperand(0).getReg(), 0, UseMI))
continue;
}
SmallVector<unsigned,8> Ops;