Files
TheRock/compiler/spirv-llvm-translator/test/OpenCL.std/acos.spvasm
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

81 lines
3.8 KiB
Plaintext

; 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