mirror of
https://github.com/RPCSX/llvm.git
synced 2025-02-04 03:17:51 +00:00
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
This commit is contained in:
parent
b9baf31679
commit
34fc6ceb73
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user