summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/FastISelEmitter.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/utils/TableGen/FastISelEmitter.cpp')
-rw-r--r--llvm/utils/TableGen/FastISelEmitter.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/llvm/utils/TableGen/FastISelEmitter.cpp b/llvm/utils/TableGen/FastISelEmitter.cpp
index 5868a24e193..f730f1d8c08 100644
--- a/llvm/utils/TableGen/FastISelEmitter.cpp
+++ b/llvm/utils/TableGen/FastISelEmitter.cpp
@@ -64,6 +64,12 @@ struct OperandsSignature {
const CodeGenTarget &Target,
MVT::SimpleValueType VT,
const CodeGenRegisterClass *DstRC) {
+ if (!InstPatNode->isLeaf() &&
+ InstPatNode->getOperator()->getName() == "imm") {
+ Operands.push_back("i");
+ return true;
+ }
+
for (unsigned i = 0, e = InstPatNode->getNumChildren(); i != e; ++i) {
TreePatternNode *Op = InstPatNode->getChild(i);
// For now, filter out any operand with a predicate.
@@ -219,9 +225,6 @@ void FastISelEmitter::run(std::ostream &OS) {
// 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())
OpenPOWER on IntegriCloud