; REQUIRES: regkeys, spirv-as, dg2-supported ; RUN: spirv-as --target-env spv1.0 -o %t.spv %s ; RUN: ocloc compile -spirv_input -file %t.spv -device dg2 -options " -igc_opts 'ShaderDumpTranslationOnly=1'" 2>&1 | FileCheck %s --check-prefixes=CHECK,%SPV_CHECK_PREFIX% ; LLVM15PLUS expects -emit-opaque-pointers to be passed ; CHECK-LABEL: spir_kernel void @test ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfnDv2_fiPU3AS1Dh( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfnDv3_fiPU3AS1Dh( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfnDv4_fiPU3AS1Dh( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfnDv8_fiPU3AS1Dh( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfnDv16_fiPU3AS1Dh( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half2_v2f32_i32_p1f16( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half3_v3f32_i32_p1f16( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half4_v4f32_i32_p1f16( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half8_v8f32_i32_p1f16( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half16_v16f32_i32_p1f16( ; CHECK-LLVM15PLUS: call spir_func void @_Z13vstorea_half2Dv2_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z13vstorea_half3Dv3_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z13vstorea_half4Dv4_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z13vstorea_half8Dv8_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z14vstorea_half16Dv16_fjPU3AS1Dh( ; CHECK-LABEL: spir_kernel void @testRTE ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv2_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv3_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv4_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv8_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv16_fiPU3AS1Dhi( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half2_r_v2f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half3_r_v3f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half4_r_v4f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half8_r_v8f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half16_r_v16f32_i32_p1f16_i32( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half2_rteDv2_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half3_rteDv3_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half4_rteDv4_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half8_rteDv8_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z18vstorea_half16_rteDv16_fjPU3AS1Dh( ; CHECK-LABEL: spir_kernel void @testRTZ ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv2_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv3_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv4_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv8_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv16_fiPU3AS1Dhi( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half2_r_v2f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half3_r_v3f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half4_r_v4f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half8_r_v8f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half16_r_v16f32_i32_p1f16_i32( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half2_rtzDv2_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half3_rtzDv3_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half4_rtzDv4_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half8_rtzDv8_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z18vstorea_half16_rtzDv16_fjPU3AS1Dh( ; CHECK-LABEL: spir_kernel void @testRTP ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv2_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv3_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv4_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv8_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv16_fiPU3AS1Dhi( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half2_r_v2f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half3_r_v3f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half4_r_v4f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half8_r_v8f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half16_r_v16f32_i32_p1f16_i32( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half2_rtpDv2_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half3_rtpDv3_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half4_rtpDv4_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half8_rtpDv8_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z18vstorea_half16_rtpDv16_fjPU3AS1Dh( ; CHECK-LABEL: spir_kernel void @testRTN ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv2_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv3_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv4_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv8_fiPU3AS1Dhi( ; CHECK-KHR: call spir_func void @{{[0-9A-z_]+}}vstorea_halfn_rDv16_fiPU3AS1Dhi( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half2_r_v2f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half3_r_v3f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half4_r_v4f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half8_r_v8f32_i32_p1f16_i32( ; CHECK-LEGACY: call spir_func void @{{[0-9A-z_]+}}vstorea_half16_r_v16f32_i32_p1f16_i32( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half2_rtnDv2_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half3_rtnDv3_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half4_rtnDv4_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z17vstorea_half8_rtnDv8_fjPU3AS1Dh( ; CHECK-LLVM15PLUS: call spir_func void @_Z18vstorea_half16_rtnDv16_fjPU3AS1Dh( OpCapability Addresses OpCapability Kernel OpCapability Vector16 OpCapability Float16Buffer %1 = OpExtInstImport "OpenCL.std" OpMemoryModel Physical32 OpenCL OpEntryPoint Kernel %6 "test" OpEntryPoint Kernel %27 "testRTE" OpEntryPoint Kernel %35 "testRTZ" OpEntryPoint Kernel %43 "testRTP" OpEntryPoint Kernel %51 "testRTN" %59 = OpString "kernel_arg_type.test.half*," %60 = OpString "kernel_arg_type.testRTE.half*," %61 = OpString "kernel_arg_type.testRTZ.half*," %62 = OpString "kernel_arg_type.testRTP.half*," %63 = OpString "kernel_arg_type.testRTN.half*," OpSource OpenCL_C 200000 %uint = OpTypeInt 32 0 %uint_0 = OpConstant %uint 0 %void = OpTypeVoid %half = OpTypeFloat 16 %_ptr_CrossWorkgroup_half = OpTypePointer CrossWorkgroup %half %5 = OpTypeFunction %void %_ptr_CrossWorkgroup_half %float = OpTypeFloat 32 %v2float = OpTypeVector %float 2 %v3float = OpTypeVector %float 3 %v4float = OpTypeVector %float 4 %v8float = OpTypeVector %float 8 %v16float = OpTypeVector %float 16 %11 = OpConstantNull %v2float %16 = OpConstantNull %v3float %19 = OpConstantNull %v4float %22 = OpConstantNull %v8float %25 = OpConstantNull %v16float %6 = OpFunction %void None %5 %ptr = OpFunctionParameter %_ptr_CrossWorkgroup_half %entry = OpLabel %14 = OpExtInst %void %1 vstorea_halfn %11 %uint_0 %ptr %17 = OpExtInst %void %1 vstorea_halfn %16 %uint_0 %ptr %20 = OpExtInst %void %1 vstorea_halfn %19 %uint_0 %ptr %23 = OpExtInst %void %1 vstorea_halfn %22 %uint_0 %ptr %26 = OpExtInst %void %1 vstorea_halfn %25 %uint_0 %ptr OpReturn OpFunctionEnd %27 = OpFunction %void None %5 %ptr_0 = OpFunctionParameter %_ptr_CrossWorkgroup_half %entry_0 = OpLabel %30 = OpExtInst %void %1 vstorea_halfn_r %11 %uint_0 %ptr_0 RTE %31 = OpExtInst %void %1 vstorea_halfn_r %16 %uint_0 %ptr_0 RTE %32 = OpExtInst %void %1 vstorea_halfn_r %19 %uint_0 %ptr_0 RTE %33 = OpExtInst %void %1 vstorea_halfn_r %22 %uint_0 %ptr_0 RTE %34 = OpExtInst %void %1 vstorea_halfn_r %25 %uint_0 %ptr_0 RTE OpReturn OpFunctionEnd %35 = OpFunction %void None %5 %ptr_1 = OpFunctionParameter %_ptr_CrossWorkgroup_half %entry_1 = OpLabel %38 = OpExtInst %void %1 vstorea_halfn_r %11 %uint_0 %ptr_1 RTZ %39 = OpExtInst %void %1 vstorea_halfn_r %16 %uint_0 %ptr_1 RTZ %40 = OpExtInst %void %1 vstorea_halfn_r %19 %uint_0 %ptr_1 RTZ %41 = OpExtInst %void %1 vstorea_halfn_r %22 %uint_0 %ptr_1 RTZ %42 = OpExtInst %void %1 vstorea_halfn_r %25 %uint_0 %ptr_1 RTZ OpReturn OpFunctionEnd %43 = OpFunction %void None %5 %ptr_2 = OpFunctionParameter %_ptr_CrossWorkgroup_half %entry_2 = OpLabel %46 = OpExtInst %void %1 vstorea_halfn_r %11 %uint_0 %ptr_2 RTP %47 = OpExtInst %void %1 vstorea_halfn_r %16 %uint_0 %ptr_2 RTP %48 = OpExtInst %void %1 vstorea_halfn_r %19 %uint_0 %ptr_2 RTP %49 = OpExtInst %void %1 vstorea_halfn_r %22 %uint_0 %ptr_2 RTP %50 = OpExtInst %void %1 vstorea_halfn_r %25 %uint_0 %ptr_2 RTP OpReturn OpFunctionEnd %51 = OpFunction %void None %5 %ptr_3 = OpFunctionParameter %_ptr_CrossWorkgroup_half %entry_3 = OpLabel %54 = OpExtInst %void %1 vstorea_halfn_r %11 %uint_0 %ptr_3 RTN %55 = OpExtInst %void %1 vstorea_halfn_r %16 %uint_0 %ptr_3 RTN %56 = OpExtInst %void %1 vstorea_halfn_r %19 %uint_0 %ptr_3 RTN %57 = OpExtInst %void %1 vstorea_halfn_r %22 %uint_0 %ptr_3 RTN %58 = OpExtInst %void %1 vstorea_halfn_r %25 %uint_0 %ptr_3 RTN OpReturn OpFunctionEnd