aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-08-16 19:49:35 +0000
committerNate Begeman <natebegeman@mac.com>2005-08-16 19:49:35 +0000
commit7cbd525ba85ebe440d15fa359ec940e404d14906 (patch)
treee4f2be03af10a438196be30a325975ef611a5e17 /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parentf3e133a35f5aa6ed32ca29aa3675eff349d61008 (diff)
Implement BR_CC and BRTWOWAY_CC. This allows the removal of a rather nasty
fixme from the PowerPC backend. Emit slightly better code for legalizing select_cc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@22805 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index cf3cb706ec..7a790c8df9 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1602,7 +1602,11 @@ SDOperand SelectionDAG::getNode(unsigned Opcode, MVT::ValueType VT,
else // Unconditional branch to false dest.
return getNode(ISD::BR, MVT::Other, Ops[0], Ops[3]);
break;
-
+ case ISD::BRTWOWAY_CC:
+ assert(Ops.size() == 6 && "BRTWOWAY_CC takes 6 operands!");
+ assert(Ops[2].getValueType() == Ops[3].getValueType() &&
+ "LHS and RHS of comparison must have same type!");
+ break;
case ISD::TRUNCSTORE: {
assert(Ops.size() == 5 && "TRUNCSTORE takes 5 operands!");
MVT::ValueType EVT = cast<VTSDNode>(Ops[4])->getVT();
@@ -1833,6 +1837,8 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const {
case ISD::BR: return "br";
case ISD::BRCOND: return "brcond";
case ISD::BRCONDTWOWAY: return "brcondtwoway";
+ case ISD::BR_CC: return "br_cc";
+ case ISD::BRTWOWAY_CC: return "brtwoway_cc";
case ISD::RET: return "ret";
case ISD::CALL: return "call";
case ISD::TAILCALL:return "tailcall";