From: Owen Anderson Date: Mon, 6 Dec 2010 18:57:40 +0000 (+0000) Subject: Revert r121021, which broke the buildbots. X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=c76c59840b7a4491afdcd2f35483f8d6e5ab533a;p=oota-llvm.git Revert r121021, which broke the buildbots. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121026 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/ARM/ARMExpandPseudoInsts.cpp b/lib/Target/ARM/ARMExpandPseudoInsts.cpp index 78433e99f55..1c02c34e826 100644 --- a/lib/Target/ARM/ARMExpandPseudoInsts.cpp +++ b/lib/Target/ARM/ARMExpandPseudoInsts.cpp @@ -699,36 +699,6 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) { MI.eraseFromParent(); break; } - case ARM::t2LDRHpci: - case ARM::t2LDRBpci: - case ARM::t2LDRSHpci: - case ARM::t2LDRSBpci: - case ARM::t2LDRpci: { - unsigned NewLdOpc; - if (Opcode == ARM::t2LDRpci) - NewLdOpc = ARM::t2LDRi12; - else if (Opcode == ARM::t2LDRHpci) - NewLdOpc = ARM::t2LDRHi12; - else if (Opcode == ARM::t2LDRBpci) - NewLdOpc = ARM::t2LDRBi12; - else if (Opcode == ARM::t2LDRSHpci) - NewLdOpc = ARM::t2LDRSHi12; - else if (Opcode == ARM::t2LDRSBpci) - NewLdOpc = ARM::t2LDRSBi12; - else - llvm_unreachable("Not a known opcode?"); - - unsigned DstReg = MI.getOperand(0).getReg(); - bool DstIsDead = MI.getOperand(0).isDead(); - MachineInstrBuilder MIB = - BuildMI(MBB, MBBI, MI.getDebugLoc(), - TII->get(NewLdOpc), DstReg) - .addOperand(MI.getOperand(1)); - (*MIB).setMemRefs(MI.memoperands_begin(), MI.memoperands_end()); - TransferImpOps(MI, MIB, MIB); - MI.eraseFromParent(); - break; - } case ARM::tLDRpci_pic: case ARM::t2LDRpci_pic: { unsigned NewLdOpc = (Opcode == ARM::tLDRpci_pic) @@ -736,9 +706,9 @@ bool ARMExpandPseudo::ExpandMBB(MachineBasicBlock &MBB) { unsigned DstReg = MI.getOperand(0).getReg(); bool DstIsDead = MI.getOperand(0).isDead(); MachineInstrBuilder MIB1 = - BuildMI(MBB, MBBI, MI.getDebugLoc(), + AddDefaultPred(BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(NewLdOpc), DstReg) - .addOperand(MI.getOperand(1)); + .addOperand(MI.getOperand(1))); (*MIB1).setMemRefs(MI.memoperands_begin(), MI.memoperands_end()); MachineInstrBuilder MIB2 = BuildMI(MBB, MBBI, MI.getDebugLoc(), TII->get(ARM::tPICADD)) diff --git a/lib/Target/ARM/ARMInstrThumb2.td b/lib/Target/ARM/ARMInstrThumb2.td index 98b7d067129..0adcba02d3b 100644 --- a/lib/Target/ARM/ARMInstrThumb2.td +++ b/lib/Target/ARM/ARMInstrThumb2.td @@ -888,8 +888,24 @@ multiclass T2I_ld opcod, string opc, let Inst{5-4} = addr{1-0}; // imm } - def pci : tPseudoInst<(outs GPR:$Rt), (ins i32imm:$addr), Size4Bytes, iis, - [(set GPR:$Rt, (opnode (ARMWrapper tconstpool:$addr)))]>; + // FIXME: Is the pci variant actually needed? + def pci : T2Ipc <(outs GPR:$Rt), (ins i32imm:$addr), iii, + opc, ".w\t$Rt, $addr", + [(set GPR:$Rt, (opnode (ARMWrapper tconstpool:$addr)))]> { + let isReMaterializable = 1; + let Inst{31-27} = 0b11111; + let Inst{26-25} = 0b00; + let Inst{24} = signed; + let Inst{23} = ?; // add = (U == '1') + let Inst{22-21} = opcod; + let Inst{20} = 1; // load + let Inst{19-16} = 0b1111; // Rn + + bits<4> Rt; + bits<12> addr; + let Inst{15-12} = Rt{3-0}; + let Inst{11-0} = addr{11-0}; + } } /// T2I_st - Defines a set of (op r, {imm12|imm8|so_reg}) store patterns.