diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-05-15 01:19:51 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-05-15 01:19:51 +0000 |
commit | b0925c0e49262c01fb51b12ea08d4e8288f6a812 (patch) | |
tree | 16e3e5556e3f0cc8ce0d084f3877da4bf3052db0 /llvm | |
parent | c5900bd25b4843ac3d9a7f354a98ff09aff2c482 (diff) | |
download | bcm5719-llvm-b0925c0e49262c01fb51b12ea08d4e8288f6a812.tar.gz bcm5719-llvm-b0925c0e49262c01fb51b12ea08d4e8288f6a812.zip |
PredicateOperand related bug fix.
llvm-svn: 37060
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/utils/TableGen/DAGISelEmitter.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/utils/TableGen/DAGISelEmitter.cpp b/llvm/utils/TableGen/DAGISelEmitter.cpp index c3db37e696e..1926359c43f 100644 --- a/llvm/utils/TableGen/DAGISelEmitter.cpp +++ b/llvm/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));"); |