mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-15 07:34:33 +00:00
Use copyRegToReg hook to copy registers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83421 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
0b22873adc
commit
349d82d400
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user