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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24558 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng 2005-12-01 00:41:50 +00:00
parent 66a48bbc35
commit c121e33e35

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);