From c0075cce7cf6682af8a09126709106866b2f5971 Mon Sep 17 00:00:00 2001 From: Jakob Stoklund Olesen Date: Sat, 10 Jul 2010 22:42:53 +0000 Subject: [PATCH] Only collect subreg extracting copies for later coalescing. This also avoids fatal copies from physregs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108061 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/TwoAddressInstructionPass.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/CodeGen/TwoAddressInstructionPass.cpp b/lib/CodeGen/TwoAddressInstructionPass.cpp index 00dec66dcaf..681473ba795 100644 --- a/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1434,7 +1434,7 @@ bool TwoAddressInstructionPass::EliminateRegSequences() { IsImpDef = false; // Remember COPY sources. These might be candidate for coalescing. - if (DefMI->isCopy()) + if (DefMI->isCopy() && DefMI->getOperand(1).getSubReg()) RealSrcs.push_back(DefMI->getOperand(1).getReg()); if (!Seen.insert(SrcReg) ||