diff options
Diffstat (limited to 'llvm/utils/TableGen/Common/InstructionEncoding.cpp')
| -rw-r--r-- | llvm/utils/TableGen/Common/InstructionEncoding.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/utils/TableGen/Common/InstructionEncoding.cpp b/llvm/utils/TableGen/Common/InstructionEncoding.cpp index 7260ee3d9b53..30bbac463c0f 100644 --- a/llvm/utils/TableGen/Common/InstructionEncoding.cpp +++ b/llvm/utils/TableGen/Common/InstructionEncoding.cpp @@ -316,6 +316,14 @@ static void addOneOperandFields(const Record *EncodingDef, else OpInfo.addField(I, J - I, Offset); } + + if (!OpInfo.InitValue && OpInfo.fields().empty()) { + // We found a field in InstructionEncoding record that corresponds to the + // named operand, but that field has no constant bits and doesn't contribute + // to the Inst field. For now, treat that field as if it didn't exist. + // TODO: Remove along with IgnoreNonDecodableOperands. + OpInfo.HasNoEncoding = true; + } } void InstructionEncoding::parseFixedLenOperands(const BitsInit &Bits) { |
