diff options
author | Richard Osborne <richard@xmos.com> | 2010-03-10 11:41:08 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2010-03-10 11:41:08 +0000 |
commit | ebc64cf780e6e0200cd462f26e9925dcc7632f2b (patch) | |
tree | 4e8f3cd761b329eaa2c00942df285e9908d6f257 /lib/Target/XCore/XCoreISelDAGToDAG.cpp | |
parent | 1250ac8a098cea157713049048e325735a8e090e (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98150 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreISelDAGToDAG.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/lib/Target/XCore/XCoreISelDAGToDAG.cpp b/lib/Target/XCore/XCoreISelDAGToDAG.cpp index b1ab13272f..12967d42de 100644 --- a/lib/Target/XCore/XCoreISelDAGToDAG.cpp +++ b/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. } } |