1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-24 19:52:54 +01:00

Promote xform fns to be explicit nodes in result patterns, and clean off

predicates since they will have already matched at this point.

llvm-svn: 23362
This commit is contained in:
Chris Lattner 2005-09-14 23:01:59 +00:00
parent 57cae81b5e
commit 6f94c802a2

View File

@ -830,7 +830,21 @@ void DAGISelEmitter::ParseAndResolveInstructions() {
I->error("Operand $" + OpName + I->error("Operand $" + OpName +
"'s type disagrees between the operand and pattern"); "'s type disagrees between the operand and pattern");
ResultNodeOperands.push_back(InVal->clone()); // Construct the result for the dest-pattern operand list.
TreePatternNode *OpNode = InVal->clone();
// No predicate is useful on the result.
OpNode->setPredicateFn("");
// Promote the xform function to be an explicit node if set.
if (Record *Xform = OpNode->getTransformFn()) {
OpNode->setTransformFn(0);
std::vector<TreePatternNode*> Children;
Children.push_back(OpNode);
OpNode = new TreePatternNode(Xform, Children);
}
ResultNodeOperands.push_back(OpNode);
} }
if (!InstInputsCheck.empty()) if (!InstInputsCheck.empty())