summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
diff options
context:
space:
mode:
authorRichard Osborne <richard@xmos.com>2010-03-10 11:41:08 +0000
committerRichard Osborne <richard@xmos.com>2010-03-10 11:41:08 +0000
commit54dfa01adca1559a78372349f81b3a013775645f (patch)
tree9c0df69ed01ab3c3e1a7253e029de34bcd242970 /llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
parent85f90559550563863522a58a87fdc4e46e95794b (diff)
downloadbcm5719-llvm-54dfa01adca1559a78372349f81b3a013775645f.tar.gz
bcm5719-llvm-54dfa01adca1559a78372349f81b3a013775645f.zip
Lower add (mul a, b), c into MACCU / MACCS nodes which translate
directly to the maccu / maccs instructions. We handle this in ExpandADDSUB since after type legalisation it is messy to recognise these operations. llvm-svn: 98150
Diffstat (limited to 'llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp')
-rw-r--r--llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
index b1ab13272f3..12967d42de4 100644
--- a/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
+++ b/llvm/lib/Target/XCore/XCoreISelDAGToDAG.cpp
@@ -208,6 +208,18 @@ SDNode *XCoreDAGToDAGISel::Select(SDNode *N) {
return CurDAG->getMachineNode(XCore::LSUB_l5r, dl, MVT::i32, MVT::i32,
Ops, 3);
}
+ case XCoreISD::MACCU: {
+ SDValue Ops[] = { N->getOperand(0), N->getOperand(1),
+ N->getOperand(2), N->getOperand(3) };
+ return CurDAG->getMachineNode(XCore::MACCU_l4r, dl, MVT::i32, MVT::i32,
+ Ops, 4);
+ }
+ case XCoreISD::MACCS: {
+ SDValue Ops[] = { N->getOperand(0), N->getOperand(1),
+ N->getOperand(2), N->getOperand(3) };
+ return CurDAG->getMachineNode(XCore::MACCS_l4r, dl, MVT::i32, MVT::i32,
+ Ops, 4);
+ }
// Other cases are autogenerated.
}
}
OpenPOWER on IntegriCloud