From 710ff32983ca919fa0da14e077450b6a7654274f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Sat, 8 Apr 2006 22:45:08 +0000 Subject: [PATCH] Add VRRC select support git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@27543 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/PowerPC/PPCISelDAGToDAG.cpp | 5 ++++- lib/Target/PowerPC/PPCISelLowering.cpp | 3 ++- lib/Target/PowerPC/PPCInstrInfo.td | 2 ++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp index 4e74b2c639d..b699b92afb3 100644 --- a/lib/Target/PowerPC/PPCISelDAGToDAG.cpp +++ b/lib/Target/PowerPC/PPCISelDAGToDAG.cpp @@ -1219,8 +1219,11 @@ void PPCDAGToDAGISel::Select(SDOperand &Result, SDOperand Op) { SelectCCOp = PPC::SELECT_CC_Int; else if (N->getValueType(0) == MVT::f32) SelectCCOp = PPC::SELECT_CC_F4; - else + else if (N->getValueType(0) == MVT::f64) SelectCCOp = PPC::SELECT_CC_F8; + else + SelectCCOp = PPC::SELECT_CC_VRRC; + SDOperand N2, N3; Select(N2, N->getOperand(2)); Select(N3, N->getOperand(3)); diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp index 5722594c61d..2067a11428c 100644 --- a/lib/Target/PowerPC/PPCISelLowering.cpp +++ b/lib/Target/PowerPC/PPCISelLowering.cpp @@ -1484,7 +1484,8 @@ PPCTargetLowering::InsertAtEndOfBasicBlock(MachineInstr *MI, MachineBasicBlock *BB) { assert((MI->getOpcode() == PPC::SELECT_CC_Int || MI->getOpcode() == PPC::SELECT_CC_F4 || - MI->getOpcode() == PPC::SELECT_CC_F8) && + MI->getOpcode() == PPC::SELECT_CC_F8 || + MI->getOpcode() == PPC::SELECT_CC_VRRC) && "Unexpected instr type to insert"); // To "insert" a SELECT_CC instruction, we actually have to insert the diamond diff --git a/lib/Target/PowerPC/PPCInstrInfo.td b/lib/Target/PowerPC/PPCInstrInfo.td index 125425a63db..7fc4b7aac75 100644 --- a/lib/Target/PowerPC/PPCInstrInfo.td +++ b/lib/Target/PowerPC/PPCInstrInfo.td @@ -247,6 +247,8 @@ let usesCustomDAGSchedInserter = 1, // Expanded by the scheduler. i32imm:$BROPC), "; SELECT_CC PSEUDO!", []>; def SELECT_CC_F8 : Pseudo<(ops F8RC:$dst, CRRC:$cond, F8RC:$T, F8RC:$F, i32imm:$BROPC), "; SELECT_CC PSEUDO!", []>; + def SELECT_CC_VRRC: Pseudo<(ops VRRC:$dst, CRRC:$cond, VRRC:$T, VRRC:$F, + i32imm:$BROPC), "; SELECT_CC PSEUDO!", []>; } let isTerminator = 1, noResults = 1, PPC970_Unit = 7 in {