Bug fix wrt chain operand.

llvm-svn: 25115
This commit is contained in:
Evan Cheng 2006-01-06 00:41:12 +00:00
parent 20c88dfd1b
commit 6b037909ff
1 changed files with 4 additions and 7 deletions

View File

@ -1902,6 +1902,10 @@ public:
<< ".getValue(" << CInfo.getNumResults() << "))) goto P"
<< PatternNo << "Fail; // Already selected for a chain use?\n";
}
if (!FoundChain) {
OS << " SDOperand Chain = " << RootName << ".getOperand(0);\n";
FoundChain = true;
}
}
for (unsigned i = 0, e = N->getNumChildren(); i != e; ++i, ++OpNo) {
@ -1975,13 +1979,6 @@ public:
}
}
if (HasChain) {
if (!FoundChain) {
OS << " SDOperand Chain = " << RootName << ".getOperand(0);\n";
FoundChain = true;
}
}
// If there is a node predicate for this, emit the call.
if (!N->getPredicateFn().empty())
OS << " if (!" << N->getPredicateFn() << "(" << RootName