mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-01 00:33:09 +00:00
Expand MOVi32imm in ARM mode after regalloc. This provides
scheduling opportunities (extra instruction can go in between MOVT / MOVW pair removing the stall). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112546 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
f523b3e087
commit
6d1e29d2f2
@ -167,6 +167,7 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) {
|
||||
break;
|
||||
}
|
||||
|
||||
case ARM::MOVi32imm:
|
||||
case ARM::t2MOVi32imm: {
|
||||
unsigned PredReg = 0;
|
||||
ARMCC::CondCodes Pred = llvm::getInstrPredicate(&MI, PredReg);
|
||||
@ -175,9 +176,13 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) {
|
||||
const MachineOperand &MO = MI.getOperand(1);
|
||||
MachineInstrBuilder LO16, HI16;
|
||||
|
||||
LO16 = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(ARM::t2MOVi16),
|
||||
LO16 = BuildMI(MBB, MBBI, MI.getDebugLoc(),
|
||||
TII->get(Opcode == ARM::MOVi32imm ?
|
||||
ARM::MOVi16 : ARM::t2MOVi16),
|
||||
DstReg);
|
||||
HI16 = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(ARM::t2MOVTi16))
|
||||
HI16 = BuildMI(MBB, MBBI, MI.getDebugLoc(),
|
||||
TII->get(Opcode == ARM::MOVi32imm ?
|
||||
ARM::MOVTi16 : ARM::t2MOVTi16))
|
||||
.addReg(DstReg, getDefRegState(true) | getDeadRegState(DstIsDead))
|
||||
.addReg(DstReg);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user