summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2008-09-07 08:19:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2008-09-07 08:19:51 +0000
commit34fc6ceb73ed9e6acaa40c86b0b68684b95cca23 (patch)
treef8e84eb82ee39fb37d24e06aa3e122164573f28b /utils
parentb9baf3167908fc56f7ed49d0b31fe25237bca841 (diff)
downloadllvm-34fc6ceb73ed9e6acaa40c86b0b68684b95cca23.tar.gz
llvm-34fc6ceb73ed9e6acaa40c86b0b68684b95cca23.tar.bz2
llvm-34fc6ceb73ed9e6acaa40c86b0b68684b95cca23.tar.xz
Ignore multi-instruction patterns. e.g.
def : Pat<(i8 (trunc GR32:$src)), (i8 (EXTRACT_SUBREG (MOV32to32_ GR32:$src), x86_subreg_8bit))> git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55875 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/FastISelEmitter.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/utils/TableGen/FastISelEmitter.cpp b/utils/TableGen/FastISelEmitter.cpp
index 3d07405be5..6f47c633e1 100644
--- a/utils/TableGen/FastISelEmitter.cpp
+++ b/utils/TableGen/FastISelEmitter.cpp
@@ -259,6 +259,20 @@ void FastISelMap::CollectPatterns(CodeGenDAGPatterns &CGP) {
if (II.OperandList.empty())
continue;
+ // For now, ignore multi-instruction patterns.
+ bool MultiInsts = false;
+ for (unsigned i = 0, e = Dst->getNumChildren(); i != e; ++i) {
+ TreePatternNode *ChildOp = Dst->getChild(i);
+ if (ChildOp->isLeaf())
+ continue;
+ if (ChildOp->getOperator()->isSubClassOf("Instruction")) {
+ MultiInsts = true;
+ break;
+ }
+ }
+ if (MultiInsts)
+ continue;
+
// For now, ignore instructions where the first operand is not an
// output register.
const CodeGenRegisterClass *DstRC = 0;