diff options
author | Evan Cheng <evan.cheng@apple.com> | 2006-10-09 21:02:17 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2006-10-09 21:02:17 +0000 |
commit | d3eea90a9b650a03330c361914c0deb0a0410431 (patch) | |
tree | bf19a75f8585cbc7e6b6ffecc8a3abaf689265c0 | |
parent | 466685d41a9ea4905b9486fea38e83802e46f196 (diff) |
Predicate function on the node should be matched before its childrean' matching
code. This is especially important now matching ISD::LOAD also requires a
Predicate_Load call.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@30845 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | utils/TableGen/DAGISelEmitter.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp index 28fdec5e88..6267a3bf7e 100644 --- a/utils/TableGen/DAGISelEmitter.cpp +++ b/utils/TableGen/DAGISelEmitter.cpp @@ -2312,6 +2312,10 @@ public: } } + // If there is a node predicate for this, emit the call. + if (!N->getPredicateFn().empty()) + emitCheck(N->getPredicateFn() + "(" + RootName + ".Val)"); + const ComplexPattern *CP; for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) { emitInit("SDOperand " + RootName + utostr(OpNo) + " = " + @@ -2420,10 +2424,6 @@ public: Code += ", CPTmp" + utostr(i); emitCheck(Code + ")"); } - - // If there is a node predicate for this, emit the call. - if (!N->getPredicateFn().empty()) - emitCheck(N->getPredicateFn() + "(" + RootName + ".Val)"); } /// EmitResultCode - Emit the action for a pattern. Now that it has matched |