summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/FastISelEmitter.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2008-08-25 20:20:32 +0000
committerOwen Anderson <resistor@mac.com>2008-08-25 20:20:32 +0000
commit32635dbfb22825a0631c841ea22fc8372a684ace (patch)
tree880ba4b759fa83696b265de2ef03033bbc57f09f /llvm/utils/TableGen/FastISelEmitter.cpp
parenta3b3c86a47059f31abb5c58ce37aa58a9b347101 (diff)
downloadbcm5719-llvm-32635dbfb22825a0631c841ea22fc8372a684ace.tar.gz
bcm5719-llvm-32635dbfb22825a0631c841ea22fc8372a684ace.zip
Add support for fast isel of (integer) immediate materialization pattens, and use them to support
bitcast of constants in fast isel. llvm-svn: 55325
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