diff options
author | Evan Cheng <evan.cheng@apple.com> | 2008-09-07 08:19:51 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2008-09-07 08:19:51 +0000 |
commit | 7cab17af29ad637533737b9e1b767f76c49893f5 (patch) | |
tree | 7178a41e8d18fe49d79f9444d617cfc791352750 /llvm/utils/TableGen/FastISelEmitter.cpp | |
parent | 421f488cb7ba0798bb696ae363c79b526df8d3f7 (diff) | |
download | bcm5719-llvm-7cab17af29ad637533737b9e1b767f76c49893f5.tar.gz bcm5719-llvm-7cab17af29ad637533737b9e1b767f76c49893f5.zip |
Ignore multi-instruction patterns. e.g.
def : Pat<(i8 (trunc GR32:$src)),
(i8 (EXTRACT_SUBREG (MOV32to32_ GR32:$src), x86_subreg_8bit))>
llvm-svn: 55875
Diffstat (limited to 'llvm/utils/TableGen/FastISelEmitter.cpp')
-rw-r--r-- | llvm/utils/TableGen/FastISelEmitter.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp index 3d07405be55..6f47c633e16 100644 --- a/llvm/utils/TableGen/FastISelEmitter.cpp +++ b/llvm/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; |