mirror of
https://github.com/KhronosGroup/OpenCL-CTS.git
synced 2026-03-19 06:09:01 +00:00
* initial support for cl_khr_expect_assume Tests expect with 64-bit SPIR-V binaries. * add support for assume testing with 64-bit binaries * add 32-bit SPIR-V files * fix formatting * address review comments
87 lines
4.0 KiB
Plaintext
87 lines
4.0 KiB
Plaintext
; SPIR-V
|
|
; Version: 1.0
|
|
; Generator: Khronos LLVM/SPIR-V Translator; 14
|
|
; Bound: 58
|
|
; Schema: 0
|
|
OpCapability Addresses
|
|
OpCapability Linkage
|
|
OpCapability Kernel
|
|
OpCapability Vector16
|
|
OpCapability Int8
|
|
OpCapability Int64
|
|
OpCapability ExpectAssumeKHR
|
|
OpExtension "SPV_KHR_expect_assume"
|
|
%1 = OpExtInstImport "OpenCL.std"
|
|
OpMemoryModel Physical64 OpenCL
|
|
OpEntryPoint Kernel %expect_char "expect_char"
|
|
OpSource OpenCL_C 102000
|
|
OpDecorate %dst FuncParamAttr NoCapture
|
|
OpDecorate %dst Alignment 64
|
|
%void = OpTypeVoid
|
|
%uchar = OpTypeInt 8 0
|
|
%uchar2 = OpTypeVector %uchar 2
|
|
%uchar3 = OpTypeVector %uchar 3
|
|
%uchar4 = OpTypeVector %uchar 4
|
|
%uchar8 = OpTypeVector %uchar 8
|
|
%uchar16 = OpTypeVector %uchar 16
|
|
%ulong = OpTypeInt 64 0
|
|
%uchar_0 = OpConstantNull %uchar
|
|
%uchar2_0 = OpConstantNull %uchar2
|
|
%uchar3_0 = OpConstantNull %uchar3
|
|
%uchar4_0 = OpConstantNull %uchar4
|
|
%uchar8_0 = OpConstantNull %uchar8
|
|
%uchar16_0 = OpConstantNull %uchar16
|
|
%index_1 = OpConstant %ulong 1
|
|
%index_2 = OpConstant %ulong 2
|
|
%index_3 = OpConstant %ulong 3
|
|
%index_4 = OpConstant %ulong 4
|
|
%index_5 = OpConstant %ulong 5
|
|
%_ptr_CrossWorkgroup_uchar16 = OpTypePointer CrossWorkgroup %uchar16
|
|
%6 = OpTypeFunction %void %_ptr_CrossWorkgroup_uchar16 %uchar
|
|
%expect_char = OpFunction %void None %6
|
|
%dst = OpFunctionParameter %_ptr_CrossWorkgroup_uchar16
|
|
%value = OpFunctionParameter %uchar
|
|
%10 = OpLabel
|
|
; setup
|
|
%value_vec = OpCompositeInsert %uchar2 %value %uchar2_0 0
|
|
; scalar expect:
|
|
; char v1e = __builtin_expect(value, 0);
|
|
; dst[0] = (char16)(v1e, 0, ...);
|
|
%v1e = OpExpectKHR %uchar %value %uchar_0
|
|
%v1v16 = OpCompositeInsert %uchar16 %v1e %uchar16_0 0
|
|
OpStore %dst %v1v16 Aligned 64
|
|
; vec2 expect:
|
|
; char2 v2 = (char2)(value);
|
|
; char2 v2e = __builtin_expect(v2, 0);
|
|
; dst[1] = (char16)(v2e, 0, ...);
|
|
%v2 = OpVectorShuffle %uchar2 %value_vec %value_vec 0 0
|
|
%v2e = OpExpectKHR %uchar2 %v2 %uchar2_0
|
|
%v2v16 = OpVectorShuffle %uchar16 %v2e %uchar2_0 0 1 2 2 2 2 2 2 2 2 2 2 2 2 2 2
|
|
%dst_1 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar16 %dst %index_1
|
|
OpStore %dst_1 %v2v16 Aligned 64
|
|
; vec3 expect
|
|
%v3 = OpVectorShuffle %uchar3 %value_vec %value_vec 0 0 0
|
|
%v3e = OpExpectKHR %uchar3 %v3 %uchar3_0
|
|
%v3v16 = OpVectorShuffle %uchar16 %v3e %uchar2_0 0 1 2 3 3 3 3 3 3 3 3 3 3 3 3 3
|
|
%dst_2 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar16 %dst %index_2
|
|
OpStore %dst_2 %v3v16 Aligned 64
|
|
; vec4 expect
|
|
%v4 = OpVectorShuffle %uchar4 %value_vec %value_vec 0 0 0 0
|
|
%v4e = OpExpectKHR %uchar4 %v4 %uchar4_0
|
|
%v4v16 = OpVectorShuffle %uchar16 %v4e %uchar2_0 0 1 2 3 4 4 4 4 4 4 4 4 4 4 4 4
|
|
%dst_3 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar16 %dst %index_3
|
|
OpStore %dst_3 %v4v16 Aligned 64
|
|
; vec8 expect
|
|
%v8 = OpVectorShuffle %uchar8 %value_vec %value_vec 0 0 0 0 0 0 0 0
|
|
%v8e = OpExpectKHR %uchar8 %v8 %uchar8_0
|
|
%v8v16 = OpVectorShuffle %uchar16 %v8e %uchar2_0 0 1 2 3 4 5 6 7 8 8 8 8 8 8 8 8
|
|
%dst_4 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar16 %dst %index_4
|
|
OpStore %dst_4 %v8v16 Aligned 64
|
|
; vec16 expect
|
|
%v16 = OpVectorShuffle %uchar16 %value_vec %value_vec 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
|
|
%v16e = OpExpectKHR %uchar16 %v16 %uchar16_0
|
|
%dst_5 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar16 %dst %index_5
|
|
OpStore %dst_5 %v16e Aligned 64
|
|
OpReturn
|
|
OpFunctionEnd
|