Skip to content

Commit 2df19d4

Browse files
svenvhjsji
authored andcommitted
Fix DebugLinePriority.spt SPIR-V validation errors (#2981)
This test had the following issues: - The ID bound in the header was set too low. - The OpVariable with ID 6 was declared with the Function storage class, but defined outside of a Function. Fix those and run spirv-val on this test. Original commit: KhronosGroup/SPIRV-LLVM-Translator@05adb2479d3ee31
1 parent 6c96bf7 commit 2df19d4

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

llvm-spirv/test/DebugInfo/NonSemantic/Shader200/DebugLinePriority.spt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
; RUN: llvm-spirv -to-binary %s -o %t.spv
2+
; RUN: spirv-val %t.spv
23
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
34
; RUN: llvm-dis %t.rev.bc -o %t.rev.ll
45
; RUN: FileCheck < %t.rev.ll %s -check-prefix=CHECK-LLVM
56

6-
; CHECK-LLVM: %[[#Var:]] = load i32, ptr @_ZN5Outer5Inner6globalE, align 4, !dbg ![[#LineLoc:]]
7+
; CHECK-LLVM: %[[#Var:]] = load i32, ptr addrspace(1) @_ZN5Outer5Inner6globalE, align 4, !dbg ![[#LineLoc:]]
78
; CHECK-LLVM: %inc = add nsw i32 %[[#Var]], 1, !dbg ![[#DebugLineLoc:]]
89
; CHECK-LLVM: ![[#LineLoc]] = !DILocation(line: 357, column: 113, scope: ![[#Scope:]])
910
; CHECK-LLVM: ![[#DebugLineLoc]] = !DILocation(line: 8, column: 16, scope: ![[#Scope]])
1011

11-
119734787 66560 393230 54 0
12+
119734787 66560 393230 138 0
1213
2 Capability Addresses
1314
2 Capability Linkage
1415
2 Capability Kernel
@@ -49,11 +50,11 @@
4950
4 Constant 3 47 8
5051
4 Constant 3 50 16
5152
4 Constant 3 52 9
52-
4 TypePointer 4 7 3
53+
4 TypePointer 4 5 3
5354
2 TypeVoid 7
5455
3 TypeFunction 8 7
5556
2 TypeBool 38
56-
5 Variable 4 6 7 5
57+
5 Variable 4 6 5 5
5758
3 ConstantTrue 38 39
5859
3 ConstantFalse 38 42
5960

0 commit comments

Comments
 (0)