Add more checking to filter out more kinds of things that

FastISel doesn't support yet.

llvm-svn: 55002
This commit is contained in:
Dan Gohman 2008-08-19 20:30:54 +00:00
parent 7f55d8ff44
commit a6c14d0ddb
1 changed files with 11 additions and 1 deletions

View File

@ -180,9 +180,16 @@ void FastISelEmitter::run(std::ostream &OS) {
MVT::SimpleValueType VT = InstPatNode->getTypeNum(0);
// For now, filter out instructions which just set a register to
// an Operand, like MOV32ri.
// an Operand or an immediate, like MOV32ri.
if (InstPatOp->isSubClassOf("Operand"))
continue;
if (InstPatOp->getName() == "imm" ||
InstPatOp->getName() == "fpimm")
continue;
// For now, filter out any instructions with predicates.
if (!InstPatNode->getPredicateFn().empty())
continue;
// Check all the operands. For now only accept register operands.
OperandsSignature Operands;
@ -190,6 +197,9 @@ void FastISelEmitter::run(std::ostream &OS) {
TreePatternNode *Op = InstPatNode->getChild(i);
if (!Op->isLeaf())
goto continue_label;
// For now, filter out any operand with a predicate.
if (!Op->getPredicateFn().empty())
goto continue_label;
DefInit *OpDI = dynamic_cast<DefInit*>(Op->getLeafValue());
if (!OpDI)
goto continue_label;