[llvm] [LLVM][TableGen] Parameterize NumToSkip in DecoderEmitter (PR #136456)

Alan Phipps via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 14:42:41 PDT 2025


evodius96 wrote:

Note: this is failing for our downstream toolchain due to a hard-coded field, specfically due to '178' being used, whereas our downstream target ends up with '179'.

```
llvm-project/llvm/test/TableGen/VarLenDecoder.td:59:22: error: CHECK-LARGE-NEXT: expected string not found in input
// CHECK-LARGE-NEXT: /* 8 */ MCD::OPC_Decode, 178, 2, 0, // Opcode: FOO16
                     ^
<stdin>:78:1: note: possible intended match here
/* 8 */ MCD::OPC_Decode, 179, 2, 0, // Opcode: FOO16
```
Is it necessary to hard code the values? I observe other checks in these tests use regular expressions to avoid having to deal with hard-coded fields and opcodes.  

https://github.com/llvm/llvm-project/pull/136456


More information about the llvm-commits mailing list