Skip to content

Commit ea4d10c

Browse files
committed
[lit] [SPIRV] update to lit FileCheck
Update the RUN lines and CHECK lines to match lit.
1 parent 8b6812e commit ea4d10c

File tree

73 files changed

+641
-641
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

73 files changed

+641
-641
lines changed

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.cbuffer.hlsl

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// RUN: %dxc -T vs_6_0 -E main -fspv-debug=rich
1+
// RUN: %dxc -T vs_6_0 -E main -fspv-debug=rich -fcgl %s -spirv | FileCheck %s
22

33
struct S {
44
float f1; // Size: 32, Offset: [ 0 - 32]
@@ -19,24 +19,24 @@ cbuffer AnotherCBuffer : register(b2) {
1919
float4 n; // Size: 128, Offset: [128 - 256]
2020
}
2121

22-
// CHECK: [[AnotherCBuffer:%\d+]] = OpExtInst %void [[ext:%\d+]] DebugTypeComposite {{%\d+}} Structure {{%\d+}} 17 9 {{%\d+}} {{%\d+}} %uint_256 FlagIsProtected|FlagIsPrivate [[m:%\d+]] [[n:%\d+]]
23-
// CHECK: [[n]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 19 12 [[AnotherCBuffer]] %uint_128 %uint_128
24-
// CHECK: [[m]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 18 12 [[AnotherCBuffer]] %uint_0 %uint_96
22+
// CHECK: [[AnotherCBuffer:%[0-9]+]] = OpExtInst %void [[ext:%[0-9]+]] DebugTypeComposite {{%[0-9]+}} Structure {{%[0-9]+}} 17 9 {{%[0-9]+}} {{%[0-9]+}} %uint_256 FlagIsProtected|FlagIsPrivate [[m:%[0-9]+]] [[n:%[0-9]+]]
23+
// CHECK: [[n]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 19 12 [[AnotherCBuffer]] %uint_128 %uint_128
24+
// CHECK: [[m]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 18 12 [[AnotherCBuffer]] %uint_0 %uint_96
2525

26-
// CHECK: [[S:%\d+]] = OpExtInst %void [[ext]] DebugTypeComposite {{%\d+}} Structure {{%\d+}} 3 8 {{%\d+}} {{%\d+}} %uint_128 FlagIsProtected|FlagIsPrivate [[f1:%\d+]] [[f2:%\d+]]
27-
// CHECK: [[f2]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 5 12 [[S]] %uint_32 %uint_96
28-
// CHECK: [[f1]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 4 11 [[S]] %uint_0 %uint_32
26+
// CHECK: [[S:%[0-9]+]] = OpExtInst %void [[ext]] DebugTypeComposite {{%[0-9]+}} Structure {{%[0-9]+}} 3 8 {{%[0-9]+}} {{%[0-9]+}} %uint_128 FlagIsProtected|FlagIsPrivate [[f1:%[0-9]+]] [[f2:%[0-9]+]]
27+
// CHECK: [[f2]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 5 12 [[S]] %uint_32 %uint_96
28+
// CHECK: [[f1]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 4 11 [[S]] %uint_0 %uint_32
2929

30-
// CHECK: [[MyCbuffer:%\d+]] = OpExtInst %void [[ext]] DebugTypeComposite {{%\d+}} Structure {{%\d+}} 8 9 {{%\d+}} {{%\d+}} %uint_1280 FlagIsProtected|FlagIsPrivate [[a:%\d+]] [[b:%\d+]] [[c:%\d+]] [[d:%\d+]] [[s:%\d+]] [[t:%\d+]]
31-
// CHECK: [[t]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 14 11 [[MyCbuffer]] %uint_768 %uint_512
32-
// CHECK: [[s]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} [[S]] {{%\d+}} 13 7 [[MyCbuffer]] %uint_640 %uint_128
33-
// CHECK: [[d]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 12 14 [[MyCbuffer]] %uint_128 %uint_512
34-
// CHECK: [[c]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 11 11 [[MyCbuffer]] %uint_64 %uint_64
35-
// CHECK: [[b]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 10 9 [[MyCbuffer]] %uint_32 %uint_32
36-
// CHECK: [[a]] = OpExtInst %void [[ext]] DebugTypeMember {{%\d+}} {{%\d+}} {{%\d+}} 9 10 [[MyCbuffer]] %uint_0 %uint_32
30+
// CHECK: [[MyCbuffer:%[0-9]+]] = OpExtInst %void [[ext]] DebugTypeComposite {{%[0-9]+}} Structure {{%[0-9]+}} 8 9 {{%[0-9]+}} {{%[0-9]+}} %uint_1280 FlagIsProtected|FlagIsPrivate [[a:%[0-9]+]] [[b:%[0-9]+]] [[c:%[0-9]+]] [[d:%[0-9]+]] [[s:%[0-9]+]] [[t:%[0-9]+]]
31+
// CHECK: [[t]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 14 11 [[MyCbuffer]] %uint_768 %uint_512
32+
// CHECK: [[s]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} [[S]] {{%[0-9]+}} 13 7 [[MyCbuffer]] %uint_640 %uint_128
33+
// CHECK: [[d]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 12 14 [[MyCbuffer]] %uint_128 %uint_512
34+
// CHECK: [[c]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 11 11 [[MyCbuffer]] %uint_64 %uint_64
35+
// CHECK: [[b]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 10 9 [[MyCbuffer]] %uint_32 %uint_32
36+
// CHECK: [[a]] = OpExtInst %void [[ext]] DebugTypeMember {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 9 10 [[MyCbuffer]] %uint_0 %uint_32
3737

38-
// CHECK: {{%\d+}} = OpExtInst %void [[ext]] DebugGlobalVariable {{%\d+}} {{%\d+}} {{%\d+}} 17 9 {{%\d+}} {{%\d+}} %AnotherCBuffer
39-
// CHECK: {{%\d+}} = OpExtInst %void [[ext]] DebugGlobalVariable {{%\d+}} {{%\d+}} {{%\d+}} 8 9 {{%\d+}} {{%\d+}} %MyCbuffer
38+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[ext]] DebugGlobalVariable {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 17 9 {{%[0-9]+}} {{%[0-9]+}} %AnotherCBuffer
39+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[ext]] DebugGlobalVariable {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 8 9 {{%[0-9]+}} {{%[0-9]+}} %MyCbuffer
4040

4141
float main() : A {
4242
return t[0] + m[0];

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.debugcompilationunit.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich -fcgl %s -spirv | FileCheck %s
22

3-
// CHECK: [[debugSet:%\d+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4-
// CHECK: [[debugSource:%\d+]] = OpExtInst %void [[debugSet]] DebugSource
5-
// CHECK: {{%\d+}} = OpExtInst %void [[debugSet]] DebugCompilationUnit 1 4 [[debugSource]] HLSL
3+
// CHECK: [[debugSet:%[0-9]+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4+
// CHECK: [[debugSource:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugSource
5+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[debugSet]] DebugCompilationUnit 1 4 [[debugSource]] HLSL
66

77
float4 main(float4 color : COLOR) : SV_TARGET {
88
return color;

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.debugdeclare.hlsl

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich -fcgl %s -spirv | FileCheck %s
22

33
// TODO: FlagIsPublic is shown as FlagIsProtected|FlagIsPrivate.
44

5-
// CHECK: [[set:%\d+]] = OpExtInstImport "OpenCL.DebugInfo.100"
6-
// CHECK: [[y:%\d+]] = OpExtInst %void [[set]] DebugLocalVariable {{%\d+}} {{%\d+}} {{%\d+}} 23 23 {{%\d+}} FlagIsLocal 2
7-
// CHECK: [[x:%\d+]] = OpExtInst %void [[set]] DebugLocalVariable {{%\d+}} {{%\d+}} {{%\d+}} 23 14 {{%\d+}} FlagIsLocal 1
8-
// CHECK: [[condition:%\d+]] = OpExtInst %void [[set]] DebugLocalVariable {{%\d+}} {{%\d+}} {{%\d+}} 30 8 {{%\d+}} FlagIsLocal
9-
// CHECK: [[expr:%\d+]] = OpExtInst %void [[set]] DebugExpression
10-
// CHECK: [[color:%\d+]] = OpExtInst %void [[set]] DebugLocalVariable {{%\d+}} {{%\d+}} {{%\d+}} 28 20 {{%\d+}} FlagIsLocal 1
5+
// CHECK: [[set:%[0-9]+]] = OpExtInstImport "OpenCL.DebugInfo.100"
6+
// CHECK: [[y:%[0-9]+]] = OpExtInst %void [[set]] DebugLocalVariable {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 23 23 {{%[0-9]+}} FlagIsLocal 2
7+
// CHECK: [[x:%[0-9]+]] = OpExtInst %void [[set]] DebugLocalVariable {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 23 14 {{%[0-9]+}} FlagIsLocal 1
8+
// CHECK: [[condition:%[0-9]+]] = OpExtInst %void [[set]] DebugLocalVariable {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 30 8 {{%[0-9]+}} FlagIsLocal
9+
// CHECK: [[expr:%[0-9]+]] = OpExtInst %void [[set]] DebugExpression
10+
// CHECK: [[color:%[0-9]+]] = OpExtInst %void [[set]] DebugLocalVariable {{%[0-9]+}} {{%[0-9]+}} {{%[0-9]+}} 28 20 {{%[0-9]+}} FlagIsLocal 1
1111

1212
// CHECK: %color = OpFunctionParameter
13-
// CHECK: {{%\d+}} = OpExtInst %void [[set]] DebugDeclare [[color]] %color [[expr]]
13+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[set]] DebugDeclare [[color]] %color [[expr]]
1414
// CHECK: %condition = OpVariable
1515
// CHECK: OpStore %condition %false
16-
// CHECK: {{%\d+}} = OpExtInst %void [[set]] DebugDeclare [[condition]] %condition [[expr]]
16+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[set]] DebugDeclare [[condition]] %condition [[expr]]
1717

1818
// CHECK: %x = OpFunctionParameter
1919
// CHECK: %y = OpFunctionParameter
20-
// CHECK: {{%\d+}} = OpExtInst %void [[set]] DebugDeclare [[x]] %x [[expr]]
21-
// CHECK: {{%\d+}} = OpExtInst %void [[set]] DebugDeclare [[y]] %y [[expr]]
20+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[set]] DebugDeclare [[x]] %x [[expr]]
21+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[set]] DebugDeclare [[y]] %y [[expr]]
2222

2323
void foo(int x, float y)
2424
{

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.debugdeclare.without.init.hlsl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich -fcgl %s -spirv | FileCheck %s
22

33
// CHECK: %i = OpFunctionParameter %_ptr_Function_PS_INPUT
4-
// CHECK: DebugDeclare {{%\d+}} %i
4+
// CHECK: DebugDeclare {{%[0-9]+}} %i
55
// CHECK: %ps_output = OpVariable %_ptr_Function_PS_OUTPUT Function
66
// CHECK: %c = OpVariable %_ptr_Function_v4float Function
7-
// CHECK: DebugDeclare {{%\d+}} %ps_output
8-
// CHECK: DebugDeclare {{%\d+}} %c
7+
// CHECK: DebugDeclare {{%[0-9]+}} %ps_output
8+
// CHECK: DebugDeclare {{%[0-9]+}} %c
99

1010
Texture2D g_tColor;
1111

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.debuglexicalblock.hlsl

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich -fcgl %s -spirv | FileCheck %s
22

3-
// CHECK: [[debugSet:%\d+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4-
// CHECK: [[debugSource:%\d+]] = OpExtInst %void [[debugSet]] DebugSource
5-
// CHECK: [[main:%\d+]] = OpExtInst %void [[debugSet]] DebugFunction
6-
// CHECK: [[mainFnLexBlock:%\d+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 13 1 [[main]]
7-
// CHECK: [[whileLoopLexBlock:%\d+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 21 3 [[mainFnLexBlock]]
8-
// CHECK: [[ifStmtLexBlock:%\d+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 26 20 [[whileLoopLexBlock]]
9-
// CHECK: [[tempLexBlock:%\d+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 28 7 [[ifStmtLexBlock]]
10-
// CHECK: [[forLoopLexBlock:%\d+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 15 12 [[mainFnLexBlock]]
3+
// CHECK: [[debugSet:%[0-9]+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4+
// CHECK: [[debugSource:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugSource
5+
// CHECK: [[main:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugFunction
6+
// CHECK: [[mainFnLexBlock:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 13 1 [[main]]
7+
// CHECK: [[whileLoopLexBlock:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 21 3 [[mainFnLexBlock]]
8+
// CHECK: [[ifStmtLexBlock:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 26 20 [[whileLoopLexBlock]]
9+
// CHECK: [[tempLexBlock:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 28 7 [[ifStmtLexBlock]]
10+
// CHECK: [[forLoopLexBlock:%[0-9]+]] = OpExtInst %void [[debugSet]] DebugLexicalBlock [[debugSource]] 15 12 [[mainFnLexBlock]]
1111

1212
float4 main(float4 color : COLOR) : SV_TARGET
1313
{

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.debugscope.hlsl

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,61 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich -fcgl %s -spirv | FileCheck %s
22

3-
// CHECK: [[set:%\d+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4-
// CHECK: [[compUnit:%\d+]] = OpExtInst %void [[set]] DebugCompilationUnit
5-
// CHECK: [[main:%\d+]] = OpExtInst %void [[set]] DebugFunction
6-
// CHECK: [[mainFnLexBlock:%\d+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%\d+}} 15 1 [[main]]
7-
// CHECK: [[whileLoopLexBlock:%\d+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%\d+}} 35 3 [[mainFnLexBlock]]
8-
// CHECK: [[ifStmtLexBlock:%\d+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%\d+}} 42 20 [[whileLoopLexBlock]]
9-
// CHECK: [[tempLexBlock:%\d+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%\d+}} 47 7 [[ifStmtLexBlock]]
10-
// CHECK: [[forLoopLexBlock:%\d+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%\d+}} 20 12 [[mainFnLexBlock]]
3+
// CHECK: [[set:%[0-9]+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4+
// CHECK: [[compUnit:%[0-9]+]] = OpExtInst %void [[set]] DebugCompilationUnit
5+
// CHECK: [[main:%[0-9]+]] = OpExtInst %void [[set]] DebugFunction
6+
// CHECK: [[mainFnLexBlock:%[0-9]+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%[0-9]+}} 15 1 [[main]]
7+
// CHECK: [[whileLoopLexBlock:%[0-9]+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%[0-9]+}} 35 3 [[mainFnLexBlock]]
8+
// CHECK: [[ifStmtLexBlock:%[0-9]+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%[0-9]+}} 42 20 [[whileLoopLexBlock]]
9+
// CHECK: [[tempLexBlock:%[0-9]+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%[0-9]+}} 47 7 [[ifStmtLexBlock]]
10+
// CHECK: [[forLoopLexBlock:%[0-9]+]] = OpExtInst %void [[set]] DebugLexicalBlock {{%[0-9]+}} 20 12 [[mainFnLexBlock]]
1111

1212
float4 main(float4 color : COLOR) : SV_TARGET
1313
// CHECK: %src_main = OpFunction
14-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[main]]
14+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[main]]
1515
{
1616
// CHECK: %bb_entry = OpLabel
17-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
17+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
1818

1919
float4 c = 0.xxxx;
2020
for (;;) {
2121
// CHECK: %for_body = OpLabel
22-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[forLoopLexBlock]]
22+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[forLoopLexBlock]]
2323
float4 a = 0.xxxx;
2424
float4 b = 1.xxxx;
2525
c = c + a + b;
2626
// CHECK: %for_continue = OpLabel
27-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
27+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
2828
}
2929
// CHECK: %for_merge = OpLabel
30-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
30+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
3131

3232
// CHECK: %while_check = OpLabel
33-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
33+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
3434
while (c.x)
3535
{
3636
// CHECK: %while_body = OpLabel
37-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[whileLoopLexBlock]]
37+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[whileLoopLexBlock]]
3838
float4 a = 0.xxxx;
3939
float4 b = 1.xxxx;
4040
c = c + a + b;
4141

4242
if (bool(c.x)) {
4343
// CHECK: %if_true = OpLabel
44-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[ifStmtLexBlock]]
44+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[ifStmtLexBlock]]
4545
c = c + c;
46-
// CHECK: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[tempLexBlock]]
46+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[tempLexBlock]]
4747
{
4848
c = c + c;
4949
}
5050
}
5151
// CHECK: %if_merge = OpLabel
52-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[whileLoopLexBlock]]
52+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[whileLoopLexBlock]]
5353

5454
// CHECK:%while_continue = OpLabel
55-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
55+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
5656
}
5757
// CHECK: %while_merge = OpLabel
58-
// CHECK-NEXT: {{%\d+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
58+
// CHECK-NEXT: {{%[0-9]+}} = OpExtInst %void [[set]] DebugScope [[mainFnLexBlock]]
5959

6060
return color + c;
6161
}

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.debugsource.hlsl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich-with-source
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich-with-source -fcgl %s -spirv | FileCheck %s
22

3-
// CHECK: [[debugSet:%\d+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4-
// CHECK: {{%\d+}} = OpExtInst %void [[debugSet]] DebugSource {{%\d+}} {{%\d+}}
3+
// CHECK: [[debugSet:%[0-9]+]] = OpExtInstImport "OpenCL.DebugInfo.100"
4+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[debugSet]] DebugSource {{%[0-9]+}} {{%[0-9]+}}
55

66
float4 main(float4 color : COLOR) : SV_TARGET {
77
return color;

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.debugsource.multiple.hlsl

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich-with-source
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich-with-source -fcgl %s -spirv | FileCheck %s
22

3-
// CHECK: [[debugSet:%\d+]] = OpExtInstImport "OpenCL.DebugInfo.100"
3+
// CHECK: [[debugSet:%[0-9]+]] = OpExtInstImport "OpenCL.DebugInfo.100"
44

55
// CHECK: rich.debug.debugsource.multiple.hlsl
66
// CHECK: spirv.debug.opline.include-file-3.hlsli
7-
// CHECK: [[file3_code:%\d+]] = OpString "int b;
7+
// CHECK: [[file3_code:%[0-9]+]] = OpString "int b;
88
// CHECK: spirv.debug.opline.include-file-2.hlsli
9-
// CHECK: [[file2_code:%\d+]] = OpString "static int a;
9+
// CHECK: [[file2_code:%[0-9]+]] = OpString "static int a;
1010
// CHECK: spirv.debug.opline.include-file-1.hlsli
11-
// CHECK: [[file1_code:%\d+]] = OpString "int function1() {
12-
// CHECK: [[main_code:%\d+]] = OpString "// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich-with-source
11+
// CHECK: [[file1_code:%[0-9]+]] = OpString "int function1() {
12+
// CHECK: [[main_code:%[0-9]+]] = OpString "// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich-with-source -fcgl %s -spirv | FileCheck %s
1313

14-
// CHECK: {{%\d+}} = OpExtInst %void [[debugSet]] DebugSource {{%\d+}} [[file3_code]]
15-
// CHECK: {{%\d+}} = OpExtInst %void [[debugSet]] DebugSource {{%\d+}} [[file2_code]]
16-
// CHECK: {{%\d+}} = OpExtInst %void [[debugSet]] DebugSource {{%\d+}} [[file1_code]]
17-
// CHECK: {{%\d+}} = OpExtInst %void [[debugSet]] DebugSource {{%\d+}} [[main_code]]
14+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[debugSet]] DebugSource {{%[0-9]+}} [[file3_code]]
15+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[debugSet]] DebugSource {{%[0-9]+}} [[file2_code]]
16+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[debugSet]] DebugSource {{%[0-9]+}} [[file1_code]]
17+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[debugSet]] DebugSource {{%[0-9]+}} [[main_code]]
1818

1919
#include "spirv.debug.opline.include-file-1.hlsli"
2020

tools/clang/test/CodeGenSPIRV_Lit/rich.debug.function.hlsl

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich
1+
// RUN: %dxc -T ps_6_0 -E main -fspv-debug=rich -fcgl %s -spirv | FileCheck %s
22

33
// TODO: FlagIsPublic is shown as FlagIsProtected|FlagIsPrivate.
44

5-
// CHECK: [[set:%\d+]] = OpExtInstImport "OpenCL.DebugInfo.100"
6-
// CHECK: [[fooName:%\d+]] = OpString "foo"
7-
// CHECK: [[emptyStr:%\d+]] = OpString ""
8-
// CHECK: [[mainName:%\d+]] = OpString "main"
5+
// CHECK: [[set:%[0-9]+]] = OpExtInstImport "OpenCL.DebugInfo.100"
6+
// CHECK: [[fooName:%[0-9]+]] = OpString "foo"
7+
// CHECK: [[emptyStr:%[0-9]+]] = OpString ""
8+
// CHECK: [[mainName:%[0-9]+]] = OpString "main"
99

10-
// CHECK: [[int:%\d+]] = OpExtInst %void [[set]] DebugTypeBasic {{%\d+}} %uint_32 Signed
11-
// CHECK: [[float:%\d+]] = OpExtInst %void [[set]] DebugTypeBasic {{%\d+}} %uint_32 Float
10+
// CHECK: [[int:%[0-9]+]] = OpExtInst %void [[set]] DebugTypeBasic {{%[0-9]+}} %uint_32 Signed
11+
// CHECK: [[float:%[0-9]+]] = OpExtInst %void [[set]] DebugTypeBasic {{%[0-9]+}} %uint_32 Float
1212

13-
// CHECK: [[fooFnType:%\d+]] = OpExtInst %void [[set]] DebugTypeFunction FlagIsProtected|FlagIsPrivate %void [[int]] [[float]]
14-
// CHECK: [[source:%\d+]] = OpExtInst %void [[set]] DebugSource
15-
// CHECK: [[compilationUnit:%\d+]] = OpExtInst %void [[set]] DebugCompilationUnit
13+
// CHECK: [[fooFnType:%[0-9]+]] = OpExtInst %void [[set]] DebugTypeFunction FlagIsProtected|FlagIsPrivate %void [[int]] [[float]]
14+
// CHECK: [[source:%[0-9]+]] = OpExtInst %void [[set]] DebugSource
15+
// CHECK: [[compilationUnit:%[0-9]+]] = OpExtInst %void [[set]] DebugCompilationUnit
1616

1717
// Check DebugFunction instructions
1818
//
19-
// CHECK: {{%\d+}} = OpExtInst %void [[set]] DebugFunction [[fooName]] [[fooFnType]] [[source]] 25 1 [[compilationUnit]] [[emptyStr]] FlagIsProtected|FlagIsPrivate 26 %foo
19+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[set]] DebugFunction [[fooName]] [[fooFnType]] [[source]] 25 1 [[compilationUnit]] [[emptyStr]] FlagIsProtected|FlagIsPrivate 26 %foo
2020

21-
// CHECK: [[float4:%\d+]] = OpExtInst %void [[set]] DebugTypeVector [[float]] 4
22-
// CHECK: [[mainFnType:%\d+]] = OpExtInst %void [[set]] DebugTypeFunction FlagIsProtected|FlagIsPrivate [[float4]] [[float4]]
23-
// CHECK: {{%\d+}} = OpExtInst %void [[set]] DebugFunction [[mainName]] [[mainFnType]] [[source]] 30 1 [[compilationUnit]] [[emptyStr]] FlagIsProtected|FlagIsPrivate 31 %src_main
21+
// CHECK: [[float4:%[0-9]+]] = OpExtInst %void [[set]] DebugTypeVector [[float]] 4
22+
// CHECK: [[mainFnType:%[0-9]+]] = OpExtInst %void [[set]] DebugTypeFunction FlagIsProtected|FlagIsPrivate [[float4]] [[float4]]
23+
// CHECK: {{%[0-9]+}} = OpExtInst %void [[set]] DebugFunction [[mainName]] [[mainFnType]] [[source]] 30 1 [[compilationUnit]] [[emptyStr]] FlagIsProtected|FlagIsPrivate 31 %src_main
2424

2525
void foo(int x, float y)
2626
{

0 commit comments

Comments
 (0)