From 349d82d40003cb6e6c604c5a447ba692468a50a6 Mon Sep 17 00:00:00 2001 From: Bob Wilson Date: Tue, 6 Oct 2009 22:01:15 +0000 Subject: [PATCH] Use copyRegToReg hook to copy registers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83421 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/ARM/NEONPreAllocPass.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/lib/Target/ARM/NEONPreAllocPass.cpp b/lib/Target/ARM/NEONPreAllocPass.cpp index 985cc86848b..9edb44b4daa 100644 --- a/lib/Target/ARM/NEONPreAllocPass.cpp +++ b/lib/Target/ARM/NEONPreAllocPass.cpp @@ -163,9 +163,8 @@ bool NEONPreAllocPass::PreAllocNEONRegisters(MachineBasicBlock &MBB) { if (MO.isUse()) { // Insert a copy from VirtReg. - AddDefaultPred(BuildMI(MBB, MBBI, MI->getDebugLoc(), - TII->get(ARM::FCPYD), MO.getReg()) - .addReg(VirtReg)); + TII->copyRegToReg(MBB, MBBI, MO.getReg(), VirtReg, + ARM::DPRRegisterClass, ARM::DPRRegisterClass); if (MO.isKill()) { MachineInstr *CopyMI = prior(MBBI); CopyMI->findRegisterUseOperand(VirtReg)->setIsKill(); @@ -173,9 +172,8 @@ bool NEONPreAllocPass::PreAllocNEONRegisters(MachineBasicBlock &MBB) { MO.setIsKill(); } else if (MO.isDef() && !MO.isDead()) { // Add a copy to VirtReg. - AddDefaultPred(BuildMI(MBB, NextI, MI->getDebugLoc(), - TII->get(ARM::FCPYD), VirtReg) - .addReg(MO.getReg())); + TII->copyRegToReg(MBB, NextI, VirtReg, MO.getReg(), + ARM::DPRRegisterClass, ARM::DPRRegisterClass); } } }