1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00

Revert r112461. It was failing on PPC...

llvm-svn: 112463
This commit is contained in:
Bill Wendling 2010-08-30 04:36:50 +00:00
parent c325a15569
commit 999c8b219d

View File

@ -253,6 +253,7 @@ unsigned InstrEmitter::getVR(SDValue Op,
return I->second;
}
/// AddRegisterOperand - Add the specified register as an operand to the
/// specified machine instr. Insert register copies if the register is
/// not in the required register class.
@ -336,10 +337,7 @@ void InstrEmitter::AddOperand(MachineInstr *MI, SDValue Op,
const ConstantFP *CFP = F->getConstantFPValue();
MI->addOperand(MachineOperand::CreateFPImm(CFP));
} else if (RegisterSDNode *R = dyn_cast<RegisterSDNode>(Op)) {
unsigned Reg = R->getReg();
const TargetInstrDesc &TID = MI->getDesc();
MI->addOperand(MachineOperand::CreateReg(Reg,
(Reg == 0 || !TID.OpInfo) ? false : TID.OpInfo[IIOpNum].isOptionalDef()));
MI->addOperand(MachineOperand::CreateReg(R->getReg(), false));
} else if (GlobalAddressSDNode *TGA = dyn_cast<GlobalAddressSDNode>(Op)) {
MI->addOperand(MachineOperand::CreateGA(TGA->getGlobal(), TGA->getOffset(),
TGA->getTargetFlags()));