| 1 |
; RUN: llvm-spirv -to-binary %s -o %t.spv |
| 2 |
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc |
| 3 |
; RUN: llvm-dis %t.rev.bc -o %t.rev.ll |
| 4 |
; RUN: FileCheck < %t.rev.ll %s -check-prefix=CHECK-LLVM |
| 5 |
|
| 6 |
; CHECK-LLVM: %[[#Var:]] = load i32, ptr @_ZN5Outer5Inner6globalE, align 4, !dbg ![[#LineLoc:]] |
| 7 |
; CHECK-LLVM: %inc = add nsw i32 %[[#Var]], 1, !dbg ![[#DebugLineLoc:]] |
| 8 |
; CHECK-LLVM: ![[#LineLoc]] = !DILocation(line: 357, column: 113, scope: ![[#Scope:]]) |
| 9 |
; CHECK-LLVM: ![[#DebugLineLoc]] = !DILocation(line: 8, column: 16, scope: ![[#Scope]]) |
| 10 |
|
| 11 |
119734787 66560 393230 54 0 |
| 12 |
2 Capability Addresses |
| 13 |
2 Capability Linkage |
| 14 |
2 Capability Kernel |
| 15 |
8 Extension "SPV_KHR_non_semantic_info" |
| 16 |
5 ExtInstImport 1 "OpenCL.std" |
| 17 |
11 ExtInstImport 2 "NonSemantic.Shader.DebugInfo.200" |
| 18 |
3 MemoryModel 2 2 |
| 19 |
10 String 14 "/path/to/inlined-namespace.cxx" |
| 20 |
3 String 16 "0" |
| 21 |
3 String 18 "" |
| 22 |
4 String 23 "clang" |
| 23 |
3 String 25 "int" |
| 24 |
3 String 30 "foo" |
| 25 |
4 String 31 "_Z3foov" |
| 26 |
4 String 37 "Outer" |
| 27 |
4 String 41 "Inner" |
| 28 |
4 String 44 "global" |
| 29 |
8 String 45 "_ZN5Outer5Inner6globalE" |
| 30 |
3 Source 0 0 |
| 31 |
8 Name 6 "_ZN5Outer5Inner6globalE" |
| 32 |
4 Name 9 "_Z3foov" |
| 33 |
4 Name 10 "entry" |
| 34 |
3 Name 13 "inc" |
| 35 |
10 Decorate 6 LinkageAttributes "_ZN5Outer5Inner6globalE" Export |
| 36 |
4 Decorate 6 Alignment 4 |
| 37 |
6 Decorate 9 LinkageAttributes "_Z3foov" Export |
| 38 |
3 Decorate 13 NoSignedWrap |
| 39 |
4 TypeInt 3 32 0 |
| 40 |
4 Constant 3 5 0 |
| 41 |
4 Constant 3 12 1 |
| 42 |
4 Constant 3 20 65536 |
| 43 |
4 Constant 3 21 4 |
| 44 |
4 Constant 3 22 217 |
| 45 |
4 Constant 3 26 32 |
| 46 |
4 Constant 3 32 7 |
| 47 |
4 Constant 3 33 136 |
| 48 |
4 Constant 3 46 3 |
| 49 |
4 Constant 3 47 8 |
| 50 |
4 Constant 3 50 16 |
| 51 |
4 Constant 3 52 9 |
| 52 |
4 TypePointer 4 7 3 |
| 53 |
2 TypeVoid 7 |
| 54 |
3 TypeFunction 8 7 |
| 55 |
2 TypeBool 38 |
| 56 |
5 Variable 4 6 7 5 |
| 57 |
3 ConstantTrue 38 39 |
| 58 |
3 ConstantFalse 38 42 |
| 59 |
|
| 60 |
6 ExtInst 7 15 2 DebugSource 14 |
| 61 |
7 ExtInst 7 17 2 DebugBuildIdentifier 16 12 |
| 62 |
6 ExtInst 7 19 2 DebugStoragePath 18 |
| 63 |
10 ExtInst 7 24 2 DebugCompilationUnit 20 21 15 22 23 |
| 64 |
8 ExtInst 7 27 2 DebugTypeBasic 25 26 21 |
| 65 |
5 ExtInst 7 28 2 DebugInfoNone |
| 66 |
7 ExtInst 7 29 2 DebugTypeFunction 5 28 |
| 67 |
15 ExtInst 7 34 2 DebugFunction 30 29 15 32 5 24 31 33 32 28 |
| 68 |
6 ExtInst 7 36 2 DebugSource 18 |
| 69 |
11 ExtInst 7 40 2 DebugLexicalBlock 36 5 5 24 37 39 |
| 70 |
11 ExtInst 7 43 2 DebugLexicalBlock 36 5 5 40 41 42 |
| 71 |
14 ExtInst 7 48 2 DebugGlobalVariable 44 27 15 46 5 43 45 6 47 |
| 72 |
|
| 73 |
5 Function 7 9 2 8 |
| 74 |
|
| 75 |
2 Label 10 |
| 76 |
7 ExtInst 7 35 2 DebugFunctionDefinition 34 9 |
| 77 |
6 ExtInst 7 49 2 DebugScope 34 |
| 78 |
4 Line 14 357 113 |
| 79 |
6 Load 3 11 6 2 4 |
| 80 |
10 ExtInst 7 51 2 DebugLine 14 47 47 50 33 |
| 81 |
5 IAdd 3 13 11 12 |
| 82 |
5 ExtInst 7 511 2 DebugNoLine |
| 83 |
5 ISub 3 137 11 12 |
| 84 |
1 NoLine |
| 85 |
5 Store 6 13 2 4 |
| 86 |
1 Return |
| 87 |
|
| 88 |
1 FunctionEnd |
| 89 |
|