Use a getCopyToReg() variant to generate a flaggy CopyToReg node.

llvm-svn: 24558
This commit is contained in:
Evan Cheng 2005-12-01 00:41:50 +00:00
parent fed83adbe3
commit d94aa71e1a
1 changed files with 2 additions and 8 deletions

View File

@ -720,14 +720,8 @@ SDOperand PPCDAGToDAGISel::SelectSETCC(SDOperand Op) {
// Force the ccreg into CR7.
SDOperand CR7Reg = CurDAG->getRegister(PPC::CR7, MVT::i32);
std::vector<MVT::ValueType> VTs;
VTs.push_back(MVT::Other);
VTs.push_back(MVT::Flag); // NONSTANDARD CopyToReg node: defines a flag
std::vector<SDOperand> Ops;
Ops.push_back(CurDAG->getEntryNode());
Ops.push_back(CR7Reg);
Ops.push_back(CCReg);
CCReg = CurDAG->getNode(ISD::CopyToReg, VTs, Ops).getValue(1);
SDOperand InFlag; // Null incoming flag value.
CCReg = CurDAG->getCopyToReg(CurDAG->getEntryNode(), CR7Reg, CCReg, InFlag);
if (TLI.getTargetMachine().getSubtarget<PPCSubtarget>().isGigaProcessor())
IntCR = CurDAG->getTargetNode(PPC::MFOCRF, MVT::i32, CR7Reg, CCReg);