[llvm] [LLVM][TableGen] Fix VarlenDecoder.td to not used fixed opcode values (PR #136632)

Rahul Joshi via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 21 16:13:03 PDT 2025


https://github.com/jurahul created https://github.com/llvm/llvm-project/pull/136632

Fix test to allow any opcode values for the OPC_Decode checks, since the specific opcode value can be different for downstream configurations.

>From cb51aebf85ea36fc43bc052c392aeb74e8731896 Mon Sep 17 00:00:00 2001
From: Rahul Joshi <rjoshi at nvidia.com>
Date: Mon, 21 Apr 2025 16:10:11 -0700
Subject: [PATCH] [LLVM][TableGen] Fix VarlenDecoder.td to not used fixed
 opcode values

- Fix test to allow any opcode values for the OPC_Decode checks,
  since these specific opcode value can be different for downstream
  configurations.
---
 llvm/test/TableGen/VarLenDecoder.td | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/llvm/test/TableGen/VarLenDecoder.td b/llvm/test/TableGen/VarLenDecoder.td
index 0ca5c6ce53506..db7a520533e85 100644
--- a/llvm/test/TableGen/VarLenDecoder.td
+++ b/llvm/test/TableGen/VarLenDecoder.td
@@ -56,9 +56,9 @@ def FOO32 : MyVarInst<MemOp32> {
 
 // CHECK-LARGE:      /* 0 */       MCD::OPC_ExtractField, 3, 5,  // Inst{7-3} ...
 // CHECK-LARGE-NEXT: /* 3 */       MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 12
-// CHECK-LARGE-NEXT: /* 8 */       MCD::OPC_Decode, 178, 2, 0, // Opcode: FOO16
+// CHECK-LARGE-NEXT: /* 8 */       MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 0, // Opcode: FOO16
 // CHECK-LARGE-NEXT: /* 12 */      MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 21
-// CHECK-LARGE-NEXT: /* 17 */      MCD::OPC_Decode, 179, 2, 1, // Opcode: FOO32
+// CHECK-LARGE-NEXT: /* 17 */      MCD::OPC_Decode, {{[0-9]+}}, {{[0-9]+}}, 1, // Opcode: FOO32
 // CHECK-LARGE-NEXT: /* 21 */      MCD::OPC_Fail,
 
 // Instruction length table



More information about the llvm-commits mailing list