diff options
author | Bill Wendling <isanbard@gmail.com> | 2010-08-30 04:36:50 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2010-08-30 04:36:50 +0000 |
commit | c040719a153df8202f10054f33c9ac581b1c6c57 (patch) | |
tree | 7123db9b6f402c75e0b907af8bb1005d08f39685 /lib/CodeGen/SelectionDAG/InstrEmitter.cpp | |
parent | 4822bce4aa395e3e96215e18f5c926c78d4a0e64 (diff) | |
download | llvm-c040719a153df8202f10054f33c9ac581b1c6c57.tar.gz llvm-c040719a153df8202f10054f33c9ac581b1c6c57.tar.bz2 llvm-c040719a153df8202f10054f33c9ac581b1c6c57.tar.xz |
Revert r112461. It was failing on PPC...
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112463 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/InstrEmitter.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/InstrEmitter.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp index 0b8a2db4f4..61c2a90e7e 100644 --- a/lib/CodeGen/SelectionDAG/InstrEmitter.cpp +++ b/lib/CodeGen/SelectionDAG/InstrEmitter.cpp @@ -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())); |