diff options
author | Dan Gohman <gohman@apple.com> | 2008-05-29 19:57:41 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-05-29 19:57:41 +0000 |
commit | d35121ad00667d93ea779a722dbee7d022410815 (patch) | |
tree | 167ea139429affa229aaff59e15188e662dee79e /utils/TableGen/CodeGenDAGPatterns.cpp | |
parent | b99e2e20b2ad1e7c5bf613fba4ead50e9654876c (diff) |
Fix a tblgen problem handling variable_ops in tblgen instruction
definitions. This adds a new construct, "discard", for indicating
that a named node in the input matching pattern is to be discarded,
instead of corresponding to a node in the output pattern. This
allows tblgen to know where the arguments for the varaible_ops are
supposed to begin.
This fixes "rdar://5791600", whatever that is ;-).
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51699 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'utils/TableGen/CodeGenDAGPatterns.cpp')
-rw-r--r-- | utils/TableGen/CodeGenDAGPatterns.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/utils/TableGen/CodeGenDAGPatterns.cpp b/utils/TableGen/CodeGenDAGPatterns.cpp index 8c46b35fa1..006c067e8f 100644 --- a/utils/TableGen/CodeGenDAGPatterns.cpp +++ b/utils/TableGen/CodeGenDAGPatterns.cpp @@ -916,6 +916,8 @@ bool TreePatternNode::ApplyTypeConstraints(TreePattern &TP, bool NotRegisters) { MadeChange |= Child->UpdateNodeType(MVT::iPTR, TP); } else if (OperandNode->getName() == "unknown") { MadeChange |= Child->UpdateNodeType(MVT::isUnknown, TP); + } else if (OperandNode->getName() == "discard") { + MadeChange |= Child->UpdateNodeType(MVT::isUnknown, TP); } else { assert(0 && "Unknown operand type!"); abort(); |