mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
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. llvm-svn: 30845
This commit is contained in:
parent
d22f3dd3ed
commit
084d415941
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user