Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/spirv-ocl-builtins-version.spt

raw
1 119734787 65536 393230 15 0
2 2 Capability Addresses
3 2 Capability Kernel
4 3 MemoryModel 1 2
5 5 EntryPoint 6 4 "test"
6 8 String 14 "kernel_arg_type.test."
7 3 Source 3 102000
8 4 Name 5 "entry"
9 4 TypeInt 6 32 0
10 4 Constant 6 7 2
11 4 Constant 6 8 528
12 4 Constant 6 9 272
13 4 Constant 6 10 2064
14 4 Constant 6 11 784
15 4 Constant 6 12 2320
16 4 Constant 6 13 2832
17 2 TypeVoid 2
18 3 TypeFunction 3 2
19
20 5 Function 2 4 0 3
21
22 2 Label 5
23 4 ControlBarrier 7 7 8
24 4 ControlBarrier 7 7 9
25 4 ControlBarrier 7 7 10
26 4 ControlBarrier 7 7 11
27 4 ControlBarrier 7 7 12
28 4 ControlBarrier 7 7 13
29 1 Return
30
31 1 FunctionEnd
32
33 ; RUN: llvm-spirv %s -to-binary -o %t.spv
34 ; RUN: spirv-val %t.spv
35
36 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t1.bc --spirv-target-env="CL1.2"
37 ; RUN: llvm-dis < %t1.bc | FileCheck %s --check-prefix=CHECK-LLVM-12
38
39 ; CHECK-LLVM-12: call spir_func void @_Z7barrierj(i32 2) [[attr:#[0-9]+]]
40 ; CHECK-LLVM-12: call spir_func void @_Z7barrierj(i32 1) [[attr]]
41 ; CHECK-LLVM-12: call spir_func void @_Z7barrierj(i32 4) [[attr]]
42 ; CHECK-LLVM-12: call spir_func void @_Z7barrierj(i32 3) [[attr]]
43 ; CHECK-LLVM-12: call spir_func void @_Z7barrierj(i32 5) [[attr]]
44 ; CHECK-LLVM-12: call spir_func void @_Z7barrierj(i32 7) [[attr]]
45 ; CHECK-LLVM-12: attributes [[attr]] = { convergent nounwind }
46
47 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t2.bc --spirv-target-env="CL2.0"
48 ; RUN: llvm-dis < %t2.bc | FileCheck %s --check-prefix=CHECK-LLVM-20
49
50 ; CHECK-LLVM-20: call spir_func void @_Z18work_group_barrierj12memory_scope(i32 2, i32 1) [[attr:#[0-9]+]]
51 ; CHECK-LLVM-20: call spir_func void @_Z18work_group_barrierj12memory_scope(i32 1, i32 1) [[attr]]
52 ; CHECK-LLVM-20: call spir_func void @_Z18work_group_barrierj12memory_scope(i32 4, i32 1) [[attr]]
53 ; CHECK-LLVM-20: call spir_func void @_Z18work_group_barrierj12memory_scope(i32 3, i32 1) [[attr]]
54 ; CHECK-LLVM-20: call spir_func void @_Z18work_group_barrierj12memory_scope(i32 5, i32 1) [[attr]]
55 ; CHECK-LLVM-20: call spir_func void @_Z18work_group_barrierj12memory_scope(i32 7, i32 1) [[attr]]
56 ; CHECK-LLVM-20: attributes [[attr]] = { convergent nounwind }
57
58 ; RUN: llvm-spirv -r -emit-opaque-pointers %t.spv -o %t3.bc --spirv-target-env="SPV-IR"
59 ; RUN: llvm-dis < %t3.bc | FileCheck %s --check-prefix=CHECK-LLVM-SPV-IR
60
61 ; CHECK-LLVM-SPV-IR: call spir_func void @_Z22__spirv_ControlBarrieriii(i32 2, i32 2, i32 528) [[attr:#[0-9]+]]
62 ; CHECK-LLVM-SPV-IR: call spir_func void @_Z22__spirv_ControlBarrieriii(i32 2, i32 2, i32 272) [[attr]]
63 ; CHECK-LLVM-SPV-IR: call spir_func void @_Z22__spirv_ControlBarrieriii(i32 2, i32 2, i32 2064) [[attr]]
64 ; CHECK-LLVM-SPV-IR: call spir_func void @_Z22__spirv_ControlBarrieriii(i32 2, i32 2, i32 784) [[attr]]
65 ; CHECK-LLVM-SPV-IR: call spir_func void @_Z22__spirv_ControlBarrieriii(i32 2, i32 2, i32 2320) [[attr]]
66 ; CHECK-LLVM-SPV-IR: call spir_func void @_Z22__spirv_ControlBarrieriii(i32 2, i32 2, i32 2832) [[attr]]
67 ; CHECK-LLVM-SPV-IR: attributes [[attr]] = { convergent nounwind }