diff options
| author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-06 23:40:35 +0000 |
|---|---|---|
| committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2010-07-06 23:40:35 +0000 |
| commit | e2d3067f6b58892dc6e8c72908aa148708c40381 (patch) | |
| tree | ad5712cf1a545e1a645d201751d1585b5abda1a7 /llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | |
| parent | 0fc6354f2f991addedd90e7c238d2aa6d75e7112 (diff) | |
| download | bcm5719-llvm-e2d3067f6b58892dc6e8c72908aa148708c40381.tar.gz bcm5719-llvm-e2d3067f6b58892dc6e8c72908aa148708c40381.zip | |
Remove references to INSERT_SUBREG after de-SSA
llvm-svn: 107732
Diffstat (limited to 'llvm/lib/CodeGen/TwoAddressInstructionPass.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/TwoAddressInstructionPass.cpp | 24 |
1 files changed, 5 insertions, 19 deletions
diff --git a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp index efe14e6b28a..48ced83b3b2 100644 --- a/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp +++ b/llvm/lib/CodeGen/TwoAddressInstructionPass.cpp @@ -1359,25 +1359,11 @@ TwoAddressInstructionPass::CoalesceExtSubRegs(SmallVector<unsigned,4> &Srcs, // Insert a copy or an extract to replace the original extracts. MachineBasicBlock::iterator InsertLoc = SomeMI; - if (NewSrcSubIdx) { - // Insert an extract subreg. - BuildMI(*SomeMI->getParent(), InsertLoc, SomeMI->getDebugLoc(), - TII->get(TargetOpcode::EXTRACT_SUBREG), DstReg) - .addReg(SrcReg).addImm(NewSrcSubIdx); - } else if (NewDstSubIdx) { - // Do a subreg insertion. - BuildMI(*SomeMI->getParent(), InsertLoc, SomeMI->getDebugLoc(), - TII->get(TargetOpcode::INSERT_SUBREG), DstReg) - .addReg(DstReg).addReg(SrcReg).addImm(NewDstSubIdx); - } else { - // Insert a copy. - bool Emitted = - TII->copyRegToReg(*SomeMI->getParent(), InsertLoc, DstReg, SrcReg, - MRI->getRegClass(DstReg), MRI->getRegClass(SrcReg), - SomeMI->getDebugLoc()); - (void)Emitted; - } - MachineBasicBlock::iterator CopyMI = prior(InsertLoc); + MachineInstr *CopyMI = BuildMI(*SomeMI->getParent(), SomeMI, + SomeMI->getDebugLoc(), + TII->get(TargetOpcode::COPY)) + .addReg(DstReg, RegState::Define, NewDstSubIdx) + .addReg(SrcReg, 0, NewSrcSubIdx); // Remove all the old extract instructions. for (MachineRegisterInfo::use_nodbg_iterator |

