File: acos.spvasm

package info (click to toggle)
spirv-llvm-translator-14 14.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,640 kB
  • sloc: cpp: 47,664; lisp: 3,704; sh: 153; python: 43; makefile: 33
file content (80 lines) | stat: -rw-r--r-- 3,930 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
; REQUIRES: spirv-as
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
; RUN: spirv-val %t.spv
; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
;
; CHECK-LABEL: spir_kernel void @test
; CHECK-SPV-IR: call spir_func float @_Z16__spirv_ocl_acosf(float
; CHECK-SPV-IR: call spir_func double @_Z16__spirv_ocl_acosd(double
; CHECK-CL20: call spir_func float @_Z4acosf(float
; CHECK-CL20: call spir_func double @_Z4acosd(double
; CHECK-LABEL: spir_kernel void @test2
; CHECK-SPV-IR: call spir_func <4 x float> @_Z16__spirv_ocl_acosDv4_f(<4 x float>
; CHECK-SPV-IR: call spir_func <4 x double> @_Z16__spirv_ocl_acosDv4_d(<4 x double>
; CHECK-CL20: call spir_func <4 x float> @_Z4acosDv4_f(<4 x float>
; CHECK-CL20: call spir_func <4 x double> @_Z4acosDv4_d(<4 x double>

               OpCapability Addresses
               OpCapability Kernel
               OpCapability Float64
          %1 = OpExtInstImport "OpenCL.std"
               OpMemoryModel Physical32 OpenCL
               OpEntryPoint Kernel %8 "test"
               OpEntryPoint Kernel %21 "test2"
         %29 = OpString "kernel_arg_type.test.float,double,float*,double*,"
         %30 = OpString "kernel_arg_type.test2.float4,double4,float4*,double4*,"
               OpSource OpenCL_C 200000
               OpName %arg1 "arg1"
               OpName %arg2 "arg2"
               OpName %output1 "output1"
               OpName %output2 "output2"
               OpName %entry "entry"
               OpName %call "call"
               OpName %call1 "call1"
               OpName %arg1_0 "arg1"
               OpName %arg2_0 "arg2"
               OpName %output1_0 "output1"
               OpName %output2_0 "output2"
               OpName %entry_0 "entry"
               OpName %call_0 "call"
               OpName %call1_0 "call1"
               OpDecorate %output1 FuncParamAttr NoCapture
               OpDecorate %output2 FuncParamAttr NoCapture
               OpDecorate %output1_0 FuncParamAttr NoCapture
               OpDecorate %output2_0 FuncParamAttr NoCapture
       %void = OpTypeVoid
      %float = OpTypeFloat 32
     %double = OpTypeFloat 64
%_ptr_CrossWorkgroup_float = OpTypePointer CrossWorkgroup %float
%_ptr_CrossWorkgroup_double = OpTypePointer CrossWorkgroup %double
          %7 = OpTypeFunction %void %float %double %_ptr_CrossWorkgroup_float %_ptr_CrossWorkgroup_double
    %v4float = OpTypeVector %float 4
   %v4double = OpTypeVector %double 4
%_ptr_CrossWorkgroup_v4float = OpTypePointer CrossWorkgroup %v4float
%_ptr_CrossWorkgroup_v4double = OpTypePointer CrossWorkgroup %v4double
         %20 = OpTypeFunction %void %v4float %v4double %_ptr_CrossWorkgroup_v4float %_ptr_CrossWorkgroup_v4double
          %8 = OpFunction %void None %7
       %arg1 = OpFunctionParameter %float
       %arg2 = OpFunctionParameter %double
    %output1 = OpFunctionParameter %_ptr_CrossWorkgroup_float
    %output2 = OpFunctionParameter %_ptr_CrossWorkgroup_double
      %entry = OpLabel
       %call = OpExtInst %float %1 acos %arg1
               OpStore %output1 %call Aligned 4
      %call1 = OpExtInst %double %1 acos %arg2
               OpStore %output2 %call1 Aligned 8
               OpReturn
               OpFunctionEnd
         %21 = OpFunction %void None %20
     %arg1_0 = OpFunctionParameter %v4float
     %arg2_0 = OpFunctionParameter %v4double
  %output1_0 = OpFunctionParameter %_ptr_CrossWorkgroup_v4float
  %output2_0 = OpFunctionParameter %_ptr_CrossWorkgroup_v4double
    %entry_0 = OpLabel
     %call_0 = OpExtInst %v4float %1 acos %arg1_0
               OpStore %output1_0 %call_0 Aligned 16
    %call1_0 = OpExtInst %v4double %1 acos %arg2_0
               OpStore %output2_0 %call1_0 Aligned 32
               OpReturn
               OpFunctionEnd