aboutsummaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2012-03-20 21:07:51 +0000
committerEvan Cheng <evan.cheng@apple.com>2012-03-20 21:07:51 +0000
commitaa7b3df1788e6ffdaa9b661cfdccdc41ad181567 (patch)
tree83b504e8676d94aba427d32f0ce79eb9a48204fd /utils
parent98a27acc6b1d4bc4bda6eb122851b3f9b39efeb8 (diff)
downloadexternal_llvm-aa7b3df1788e6ffdaa9b661cfdccdc41ad181567.zip
external_llvm-aa7b3df1788e6ffdaa9b661cfdccdc41ad181567.tar.gz
external_llvm-aa7b3df1788e6ffdaa9b661cfdccdc41ad181567.tar.bz2
Reserve number of MI operands to accom,odate complex patterns.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153125 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils')
-rw-r--r--utils/TableGen/PseudoLoweringEmitter.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/utils/TableGen/PseudoLoweringEmitter.cpp b/utils/TableGen/PseudoLoweringEmitter.cpp
index d3e2389..802d112 100644
--- a/utils/TableGen/PseudoLoweringEmitter.cpp
+++ b/utils/TableGen/PseudoLoweringEmitter.cpp
@@ -100,8 +100,11 @@ void PseudoLoweringEmitter::evaluateExpansion(Record *Rec) {
throw TGError(Rec->getLoc(), "Pseudo result '" + Operator->getName() +
"' operand count mismatch");
+ unsigned NumMIOperands = 0;
+ for (unsigned i = 0, e = Insn.Operands.size(); i != e; ++i)
+ NumMIOperands += Insn.Operands[i].MINumOperands;
IndexedMap<OpData> OperandMap;
- OperandMap.grow(Insn.Operands.size());
+ OperandMap.grow(NumMIOperands);
addDagOperandMapping(Rec, Dag, Insn, OperandMap, 0);