diff options
author | Richard Osborne <richard@xmos.com> | 2013-01-25 21:20:28 +0000 |
---|---|---|
committer | Richard Osborne <richard@xmos.com> | 2013-01-25 21:20:28 +0000 |
commit | 0f1bcedf5a871c360f2ca1354464d81cb81bdca7 (patch) | |
tree | 0f2f0339e8167749c4becb8e16f38aac4a956f72 /lib/Target/XCore/XCoreISelDAGToDAG.cpp | |
parent | a965baca3c7ce1ced00446cff1c6395d03dfed52 (diff) | |
download | llvm-0f1bcedf5a871c360f2ca1354464d81cb81bdca7.tar.gz llvm-0f1bcedf5a871c360f2ca1354464d81cb81bdca7.tar.bz2 llvm-0f1bcedf5a871c360f2ca1354464d81cb81bdca7.tar.xz |
Fix order of operands for crc8_l4r
The order in which operands appear in the encoded instruction is different
to order in which they appear in assembly. This changes the XCore backend to
use the instruction encoding order.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173493 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore/XCoreISelDAGToDAG.cpp')
-rw-r--r-- | lib/Target/XCore/XCoreISelDAGToDAG.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/Target/XCore/XCoreISelDAGToDAG.cpp b/lib/Target/XCore/XCoreISelDAGToDAG.cpp index 472ce6305c..fbf86c5230 100644 --- a/lib/Target/XCore/XCoreISelDAGToDAG.cpp +++ b/lib/Target/XCore/XCoreISelDAGToDAG.cpp @@ -211,15 +211,10 @@ SDNode *XCoreDAGToDAGISel::Select(SDNode *N) { return CurDAG->getMachineNode(XCore::LMUL_l6r, dl, MVT::i32, MVT::i32, Ops, 4); } - case ISD::INTRINSIC_WO_CHAIN: { - unsigned IntNo = cast<ConstantSDNode>(N->getOperand(0))->getZExtValue(); - switch (IntNo) { - case Intrinsic::xcore_crc8: - SDValue Ops[] = { N->getOperand(1), N->getOperand(2), N->getOperand(3) }; - return CurDAG->getMachineNode(XCore::CRC8_l4r, dl, MVT::i32, MVT::i32, - Ops, 3); - } - break; + case XCoreISD::CRC8: { + SDValue Ops[] = { N->getOperand(0), N->getOperand(1), N->getOperand(2) }; + return CurDAG->getMachineNode(XCore::CRC8_l4r, dl, MVT::i32, MVT::i32, + Ops, 3); } case ISD::BRIND: if (SDNode *ResNode = SelectBRIND(N)) |