summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorNate Begeman <natebegeman@mac.com>2005-08-18 07:30:15 +0000
committerNate Begeman <natebegeman@mac.com>2005-08-18 07:30:15 +0000
commit19a271a67b405b85dbc93321ca022b2c6abb0fa9 (patch)
tree70a6e7b79fc2f90ab6612e30d2166f3c60e00612 /llvm/lib/CodeGen
parentcfb9a74c2ef06f1040d17eadd98b108097f4f4c3 (diff)
downloadbcm5719-llvm-19a271a67b405b85dbc93321ca022b2c6abb0fa9.tar.gz
bcm5719-llvm-19a271a67b405b85dbc93321ca022b2c6abb0fa9.zip
Add support for target DAG nodes that take 4 operands, such as PowerPC's
rlwinm. llvm-svn: 22856
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index f413010185b..7f0725efaab 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -1810,6 +1810,14 @@ void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
N->setValueTypes(VT);
N->setOperands(Op1, Op2, Op3);
}
+void SelectionDAG::SelectNodeTo(SDNode *N, MVT::ValueType VT,
+ unsigned TargetOpc, SDOperand Op1,
+ SDOperand Op2, SDOperand Op3, SDOperand Op4) {
+ RemoveNodeFromCSEMaps(N);
+ N->MorphNodeTo(ISD::BUILTIN_OP_END+TargetOpc);
+ N->setValueTypes(VT);
+ N->setOperands(Op1, Op2, Op3, Op4);
+}
/// ReplaceAllUsesWith - Modify anything using 'From' to use 'To' instead.
/// This can cause recursive merging of nodes in the DAG.
OpenPOWER on IntegriCloud