Remat uncoalescable COPY instrs

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108010 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jakob Stoklund Olesen 2010-07-09 20:43:05 +00:00
parent 6c7d3a16b3
commit 90fc0f4443

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;