[PATCH] D21408: [ARM] MRRC2 shouldn't allow predicates
Ranjeet Singh via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 15 14:09:27 PDT 2016
rs created this revision.
rs added a reviewer: rengolin.
rs added a subscriber: llvm-commits.
Herald added subscribers: rengolin, aemerson.
The MRRC2 instruction can't be predicated, neither can the thumb variants of the instruction but the tablegen descriptions of the instructions in ARMInstrThumb2.td is wrong and will be looked at in a future patch. This patch fixes an assertion failure that picked up this problem caused by patch http://reviews.llvm.org/D21178
http://reviews.llvm.org/D21408
Files:
lib/Target/ARM/ARMISelDAGToDAG.cpp
Index: lib/Target/ARM/ARMISelDAGToDAG.cpp
===================================================================
--- lib/Target/ARM/ARMISelDAGToDAG.cpp
+++ lib/Target/ARM/ARMISelDAGToDAG.cpp
@@ -3350,8 +3350,15 @@
Ops.push_back(getI32Imm(cast<ConstantSDNode>(N->getOperand(2))->getZExtValue(), dl)); /* coproc */
Ops.push_back(getI32Imm(cast<ConstantSDNode>(N->getOperand(3))->getZExtValue(), dl)); /* opc */
Ops.push_back(getI32Imm(cast<ConstantSDNode>(N->getOperand(4))->getZExtValue(), dl)); /* CRm */
- Ops.push_back(getAL(CurDAG, dl));
- Ops.push_back(CurDAG->getRegister(0, MVT::i32));
+
+ // MRRC2 in ARM mode is not predicatable
+ // FIXME: The tablegen for the thumb instructions MRRC/MRRC2 instructions
+ // is wrong as it shouldn't allow predicates.
+ if (Opc != ARM::MRRC2) {
+ Ops.push_back(getAL(CurDAG, dl));
+ Ops.push_back(CurDAG->getRegister(0, MVT::i32));
+ }
+
Ops.push_back(Chain);
// Writes to two registers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D21408.60902.patch
Type: text/x-patch
Size: 1014 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160615/7dd57783/attachment.bin>
More information about the llvm-commits
mailing list