| 1 |
119734787 65536 393230 38 0 |
| 2 |
2 Capability Addresses |
| 3 |
2 Capability Linkage |
| 4 |
2 Capability Kernel |
| 5 |
5 ExtInstImport 1 "OpenCL.std" |
| 6 |
3 MemoryModel 2 2 |
| 7 |
3 Source 4 100000 |
| 8 |
7 Name 4 "test_atomicStore" |
| 9 |
4 Name 5 "entry" |
| 10 |
7 Name 20 "test_atomicExchange" |
| 11 |
4 Name 21 "entry" |
| 12 |
6 Name 29 "test_atomicLoad" |
| 13 |
4 Name 30 "entry" |
| 14 |
4 Decorate 36 Alignment 4 |
| 15 |
2 DecorationGroup 36 |
| 16 |
4 Decorate 37 Alignment 8 |
| 17 |
2 DecorationGroup 37 |
| 18 |
8 Decorate 29 LinkageAttributes "test_atomicLoad" Export |
| 19 |
9 Decorate 20 LinkageAttributes "test_atomicExchange" Export |
| 20 |
9 Decorate 4 LinkageAttributes "test_atomicStore" Export |
| 21 |
7 GroupDecorate 36 12 14 23 24 32 |
| 22 |
5 GroupDecorate 37 9 22 31 |
| 23 |
4 TypeInt 10 32 0 |
| 24 |
4 Constant 10 18 2 |
| 25 |
2 TypeVoid 2 |
| 26 |
3 TypeFunction 3 2 |
| 27 |
3 TypeFloat 6 32 |
| 28 |
4 TypePointer 7 4 6 |
| 29 |
4 TypePointer 8 7 7 |
| 30 |
4 TypePointer 11 7 10 |
| 31 |
4 TypePointer 13 7 6 |
| 32 |
3 TypeFunction 19 6 |
| 33 |
|
| 34 |
|
| 35 |
5 Function 2 4 0 3 |
| 36 |
|
| 37 |
2 Label 5 |
| 38 |
4 Variable 8 9 7 |
| 39 |
4 Variable 11 12 7 |
| 40 |
4 Variable 13 14 7 |
| 41 |
6 Load 7 15 9 2 8 |
| 42 |
6 Load 10 16 12 2 4 |
| 43 |
6 Load 6 17 14 2 4 |
| 44 |
5 AtomicStore 15 18 16 17 |
| 45 |
1 Return |
| 46 |
|
| 47 |
1 FunctionEnd |
| 48 |
|
| 49 |
5 Function 6 20 0 19 |
| 50 |
|
| 51 |
2 Label 21 |
| 52 |
4 Variable 8 22 7 |
| 53 |
4 Variable 11 23 7 |
| 54 |
4 Variable 13 24 7 |
| 55 |
6 Load 7 25 22 2 8 |
| 56 |
6 Load 10 26 23 2 4 |
| 57 |
6 Load 6 27 24 2 4 |
| 58 |
7 AtomicExchange 6 28 25 18 26 27 |
| 59 |
2 ReturnValue 28 |
| 60 |
|
| 61 |
1 FunctionEnd |
| 62 |
|
| 63 |
5 Function 6 29 0 19 |
| 64 |
|
| 65 |
2 Label 30 |
| 66 |
4 Variable 8 31 7 |
| 67 |
4 Variable 11 32 7 |
| 68 |
6 Load 7 33 31 2 8 |
| 69 |
6 Load 10 34 32 2 4 |
| 70 |
6 AtomicLoad 6 35 33 18 34 |
| 71 |
2 ReturnValue 35 |
| 72 |
|
| 73 |
1 FunctionEnd |
| 74 |
|
| 75 |
; RUN: llvm-spirv %s -to-binary -o %t.spv |
| 76 |
; RUN: spirv-val %t.spv |
| 77 |
; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t.bc --spirv-target-env="CL1.2" |
| 78 |
; RUN: llvm-dis < %t.bc | FileCheck %s --check-prefix=CHECK-LLVM-12 |
| 79 |
|
| 80 |
; CHECK-LLVM-12: %{{[0-9]+}} = call spir_func float @{{[_A-Z0-9]+}}atomic_xchg{{[_A-Za-z0-9]+}}ff(ptr addrspace({{[0-9]+}}) %{{[0-9]+}}, float %{{[0-9]+}}) |
| 81 |
; CHECK-LLVM-12: %{{[0-9]+}} = call spir_func float @{{[_A-Z0-9]+}}atomic_add{{[_A-Za-z0-9]+}}ff(ptr addrspace({{[0-9]+}}) %{{[0-9]+}}, float 0.000000e+00) |
| 82 |
|