Skip to content

Commit 12645e3

Browse files
authored
Make DebugInfo tests robust for newer SPIRV-Tools (#3659)
Newer SPIRV-Tools spirv-dis versions print the textual instruction name instead of the instruction number. Make the FileCheck check lines accept both for compatibility.
1 parent f66ecee commit 12645e3

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

test/DebugInfo/DebugMacroDef.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[type:.*]] = OpTypeInt 32 0
4646
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[uint_1_reg:.*]] = OpConstant %[[type]] 1
47-
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] 32 %[[#]] %[[uint_1_reg]] %[[#]] %[[#]]
47+
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] {{(32|DebugMacroDef)}} %[[#]] %[[uint_1_reg]] %[[#]] %[[#]]
4848

4949
target triple = "spir64-unknown-unknown"
5050

test/DebugInfo/DebugMacroDefNoValue.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,9 @@
6464
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[baz_name:.*]] = OpString "BAZ"
6565
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[foo_name:.*]] = OpString "FOO"
6666
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[foo_value:.*]] = OpString "1"
67-
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] 32 %[[#]] %[[uint_1_reg]] %[[bar_name]]
68-
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] 32 %[[#]] %[[uint_2_reg]] %[[baz_name]]
69-
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] 32 %[[#]] %[[uint_3_reg]] %[[foo_name]] %[[foo_value]]
67+
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] {{(32|DebugMacroDef)}} %[[#]] %[[uint_1_reg]] %[[bar_name]]
68+
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] {{(32|DebugMacroDef)}} %[[#]] %[[uint_2_reg]] %[[baz_name]]
69+
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] {{(32|DebugMacroDef)}} %[[#]] %[[uint_3_reg]] %[[foo_name]] %[[foo_value]]
7070

7171
target triple = "spir64-unknown-unknown"
7272

test/DebugInfo/DebugMacroDefRoot.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[uint_1_reg:.*]] = OpConstant %[[type]] 1
4848
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[size_name:.*]] = OpString "SIZE"
4949
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[size_value:.*]] = OpString "5"
50-
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] 32 %[[#]] %[[uint_1_reg]] %[[size_name]] %[[size_value]]
50+
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] {{(32|DebugMacroDef)}} %[[#]] %[[uint_1_reg]] %[[size_name]] %[[size_value]]
5151

5252
target triple = "spir64-unknown-unknown"
5353

test/DebugInfo/DebugMacroUndefinedUndef.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,8 +48,8 @@
4848
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[type:.*]] = OpTypeInt 32 0
4949
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[uint_1_reg:.*]] = OpConstant %[[type]] 1
5050
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[source_file:.*]] = OpString "./def.c"
51-
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[debug_none:.*]] = OpExtInst %void %[[#]] 0
52-
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] 33 %[[source_file]] %[[uint_1_reg]] %[[debug_none]]
51+
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[debug_none:.*]] = OpExtInst %void %[[#]] {{(0|DebugInfoNone)}}
52+
; CHECK-SPIRV-NON-SEMANTIC-200-DAG: %[[#]] = OpExtInst %void %[[#]] {{(33|DebugMacroUndef)}} %[[source_file]] %[[uint_1_reg]] %[[debug_none]]
5353

5454
target triple = "spir64-unknown-unknown"
5555

0 commit comments

Comments
 (0)