aboutsummaryrefslogtreecommitdiffstats
path: root/utils/TableGen
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2007-05-15 01:19:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2007-05-15 01:19:51 +0000
commit39376d08436dc7bc04daa0da84b0648f0cf48751 (patch)
tree37123dca8dc0b647934e906e5d81134b5b1330f9 /utils/TableGen
parent4b2e7acd6a9bb70774321146ec94d43db6b430a9 (diff)
downloadexternal_llvm-39376d08436dc7bc04daa0da84b0648f0cf48751.zip
external_llvm-39376d08436dc7bc04daa0da84b0648f0cf48751.tar.gz
external_llvm-39376d08436dc7bc04daa0da84b0648f0cf48751.tar.bz2
PredicateOperand related bug fix.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37060 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen')
-rw-r--r--utils/TableGen/DAGISelEmitter.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/utils/TableGen/DAGISelEmitter.cpp b/utils/TableGen/DAGISelEmitter.cpp
index c3db37e..1926359 100644
--- a/utils/TableGen/DAGISelEmitter.cpp
+++ b/utils/TableGen/DAGISelEmitter.cpp
@@ -2799,6 +2799,7 @@ public:
// in the 'execute always' values. Match up the node operands to the
// instruction operands to do this.
std::vector<std::string> AllOps;
+ unsigned NumEAInputs = 0; // # of synthesized 'execute always' inputs.
for (unsigned ChildNo = 0, InstOpNo = NumResults;
InstOpNo != II.OperandList.size(); ++InstOpNo) {
std::vector<std::string> Ops;
@@ -2821,6 +2822,7 @@ public:
Ops = EmitResultCode(Pred.AlwaysOps[i], RetSelected,
InFlagDecled, ResNodeDecled);
AllOps.insert(AllOps.end(), Ops.begin(), Ops.end());
+ NumEAInputs += Ops.size();
}
}
}
@@ -2899,7 +2901,7 @@ public:
else if (NodeHasOptInFlag)
EndAdjust = "-(HasInFlag?1:0)"; // May have a flag.
- emitCode("for (unsigned i = " + utostr(NumInputs) +
+ emitCode("for (unsigned i = " + utostr(NumInputs - NumEAInputs) +
", e = N.getNumOperands()" + EndAdjust + "; i != e; ++i) {");
emitCode(" AddToISelQueue(N.getOperand(i));");