Debian Codegraph @

llvm-project/llvm/projects/llvm-spirv/test/OpenCL.std/vload_half.spvasm

raw
1 ; REQUIRES: spirv-as
2 ; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
3 ; RUN: spirv-val %t.spv
4 ; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
5 ; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
6 ;
7 ; CHECK-LABEL: spir_kernel void @test
8 ;
9 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS1Dh(
10 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS1Dh(
11 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS1Dh(
12 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS1Dh(
13 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS3Dh(
14 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS3Dh(
15 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS3Dh(
16 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS3Dh(
17 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS2Dh(
18 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS2Dh(
19 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS2Dh(
20 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPU3AS2Dh(
21 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPDh(
22 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPDh(
23 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPDh(
24 ; CHECK-SPV-IR: call spir_func float @_Z29__spirv_ocl_vload_half_RfloatiPDh(
25 ;
26 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS1KDh
27 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS1KDh
28 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS1KDh
29 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS1KDh
30 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS3KDh
31 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS3KDh
32 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS3KDh
33 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS3KDh
34 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS2KDh
35 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS2KDh
36 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS2KDh
37 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPU3AS2KDh
38 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPKDh
39 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPKDh
40 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPKDh
41 ; CHECK-CL20: call spir_func float @_Z10vload_halfjPKDh
42
43 OpCapability Addresses
44 OpCapability Kernel
45 OpCapability Float16Buffer
46 %1 = OpExtInstImport "OpenCL.std"
47 OpMemoryModel Physical32 OpenCL
48 OpEntryPoint Kernel %7 "test"
49 %34 = OpString "kernel_arg_type.test.half*,half*,"
50 OpSource OpenCL_C 200000
51 %uint = OpTypeInt 32 0
52 %uint_0 = OpConstant %uint 0
53 %void = OpTypeVoid
54 %half = OpTypeFloat 16
55 %_ptr_CrossWorkgroup_half = OpTypePointer CrossWorkgroup %half
56 %_ptr_Workgroup_half = OpTypePointer Workgroup %half
57 %6 = OpTypeFunction %void %_ptr_CrossWorkgroup_half %_ptr_Workgroup_half
58 %float = OpTypeFloat 32
59 %_ptr_UniformConstant_half = OpTypePointer UniformConstant %half
60 %_ptr_Function_half = OpTypePointer Function %half
61 %23 = OpUndef %_ptr_UniformConstant_half
62 %29 = OpUndef %_ptr_Function_half
63 %7 = OpFunction %void None %6
64 %pg = OpFunctionParameter %_ptr_CrossWorkgroup_half
65 %pl = OpFunctionParameter %_ptr_Workgroup_half
66 %entry = OpLabel
67 %call = OpExtInst %float %1 vload_half %uint_0 %pg
68 %call1 = OpExtInst %float %1 vload_half %uint_0 %pg
69 %call2 = OpExtInst %float %1 vload_half %uint_0 %pg
70 %call3 = OpExtInst %float %1 vload_half %uint_0 %pg
71 %call4 = OpExtInst %float %1 vload_half %uint_0 %pl
72 %call5 = OpExtInst %float %1 vload_half %uint_0 %pl
73 %call6 = OpExtInst %float %1 vload_half %uint_0 %pl
74 %call7 = OpExtInst %float %1 vload_half %uint_0 %pl
75 %call8 = OpExtInst %float %1 vload_half %uint_0 %23
76 %call9 = OpExtInst %float %1 vload_half %uint_0 %23
77 %call10 = OpExtInst %float %1 vload_half %uint_0 %23
78 %call11 = OpExtInst %float %1 vload_half %uint_0 %23
79 %call12 = OpExtInst %float %1 vload_half %uint_0 %29
80 %call13 = OpExtInst %float %1 vload_half %uint_0 %29
81 %call14 = OpExtInst %float %1 vload_half %uint_0 %29
82 %call15 = OpExtInst %float %1 vload_half %uint_0 %29
83 OpReturn
84 OpFunctionEnd