From c121e33e35b2e7292e6d99d8db91f73b84269e36 Mon Sep 17 00:00:00 2001 From: Evan Cheng Date: Thu, 1 Dec 2005 00:41:50 +0000 Subject: [PATCH] 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 --- lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 47338b457b6..b47808d9364 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -720,14 +720,8 @@ SDOperand PPCDAGToDAGISel::SelectSETCC(SDOperand Op) { // Force the ccreg into CR7. SDOperand CR7Reg = CurDAG->getRegister(PPC::CR7, MVT::i32); - std::vector VTs; - VTs.push_back(MVT::Other); - VTs.push_back(MVT::Flag); // NONSTANDARD CopyToReg node: defines a flag - std::vector 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().isGigaProcessor()) IntCR = CurDAG->getTargetNode(PPC::MFOCRF, MVT::i32, CR7Reg, CCReg);