[llvm] 9c2121b - [NFC][test] Replace hardcoded number with numeric substitution blocks

via llvm-commits llvm-commits at lists.llvm.org
Thu May 5 17:08:46 PDT 2022


Author: Sheng
Date: 2022-05-06T08:08:34+08:00
New Revision: 9c2121b843ff7c9846a89305b4b73e3c480fe4e7

URL: https://github.com/llvm/llvm-project/commit/9c2121b843ff7c9846a89305b4b73e3c480fe4e7
DIFF: https://github.com/llvm/llvm-project/commit/9c2121b843ff7c9846a89305b4b73e3c480fe4e7.diff

LOG: [NFC][test] Replace hardcoded number with numeric substitution blocks

In VarLenDecoder.td, the opcode in CHECK line is hardcoded, which
causes chaos in several downstream projects. This patch is trying
to fix that.

Added: 
    

Modified: 
    llvm/test/TableGen/VarLenDecoder.td

Removed: 
    


################################################################################
diff  --git a/llvm/test/TableGen/VarLenDecoder.td b/llvm/test/TableGen/VarLenDecoder.td
index 657ca6abd847d..42f81a9d0cf3f 100644
--- a/llvm/test/TableGen/VarLenDecoder.td
+++ b/llvm/test/TableGen/VarLenDecoder.td
@@ -47,9 +47,9 @@ def FOO32 : MyVarInst<MemOp32> {
 
 // CHECK:      MCD::OPC_ExtractField, 3, 5,  // Inst{7-3} ...
 // CHECK-NEXT: MCD::OPC_FilterValue, 8, 4, 0, 0, // Skip to: 12
-// CHECK-NEXT: MCD::OPC_Decode, 244, 1, 0, // Opcode: FOO16
+// CHECK-NEXT: MCD::OPC_Decode, [[#OPCODE:]], 1, 0, // Opcode: FOO16
 // CHECK-NEXT: MCD::OPC_FilterValue, 9, 4, 0, 0, // Skip to: 21
-// CHECK-NEXT: MCD::OPC_Decode, 245, 1, 1, // Opcode: FOO32
+// CHECK-NEXT: MCD::OPC_Decode, [[#OPCODE+1]], 1, 1, // Opcode: FOO32
 // CHECK-NEXT: MCD::OPC_Fail,
 
 // Instruction length table


        


More information about the llvm-commits mailing list