Synchronise with Khronos-private Gitlab branch

The maintenance of the conformance tests is moving to Github.

This commit contains all the changes that have been done in
Gitlab since the first public release of the conformance tests.

Signed-off-by: Kevin Petit kevin.petit@arm.com
This commit is contained in:
Kevin Petit
2019-02-20 16:19:45 +00:00
committed by Kévin Petit
parent ba975e4112
commit 05a11d8e49
785 changed files with 18699 additions and 1070 deletions

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "atomic_dec_global"
OpName %global_id "__spirv_GlobalInvocationId"
OpName %val_ptr "val"
OpName %ctr_ptr "counter"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %val_ptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t
%scope_dev = OpConstant %int_t 1
%sem_cwg = OpConstant %int_t 512
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%val_ptr = OpFunctionParameter %int_ptr_t
%ctr_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%res = OpAtomicIDecrement %int_t %ctr_ptr %scope_dev %sem_cwg
%val_loc = OpInBoundsPtrAccessChain %int_ptr_t %val_ptr %idx
OpStore %val_loc %res Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "atomic_dec_global"
OpName %global_id "__spirv_GlobalInvocationId"
OpName %val_ptr "val"
OpName %ctr_ptr "counter"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %val_ptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t
%scope_dev = OpConstant %int_t 1
%sem_cwg = OpConstant %int_t 512
%shift_val = OpConstant %idx_t 32
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%val_ptr = OpFunctionParameter %int_ptr_t
%ctr_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%res = OpAtomicIDecrement %int_t %ctr_ptr %scope_dev %sem_cwg
%val_loc = OpInBoundsPtrAccessChain %int_ptr_t %val_ptr %idx
OpStore %val_loc %res Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "atomic_inc_global"
OpName %global_id "__spirv_GlobalInvocationId"
OpName %val_ptr "val"
OpName %ctr_ptr "counter"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %val_ptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t
%scope_dev = OpConstant %int_t 1
%sem_cwg = OpConstant %int_t 512
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%val_ptr = OpFunctionParameter %int_ptr_t
%ctr_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%res = OpAtomicIIncrement %int_t %ctr_ptr %scope_dev %sem_cwg
%val_loc = OpInBoundsPtrAccessChain %int_ptr_t %val_ptr %idx
OpStore %val_loc %res Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "atomic_inc_global"
OpName %global_id "__spirv_GlobalInvocationId"
OpName %val_ptr "val"
OpName %ctr_ptr "counter"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %val_ptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t
%scope_dev = OpConstant %int_t 1
%sem_cwg = OpConstant %int_t 512
%shift_val = OpConstant %idx_t 32
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%val_ptr = OpFunctionParameter %int_ptr_t
%ctr_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%res = OpAtomicIIncrement %int_t %ctr_ptr %scope_dev %sem_cwg
%val_loc = OpInBoundsPtrAccessChain %int_ptr_t %val_ptr %idx
OpStore %val_loc %res Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,53 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "branch_conditional"
OpName %out_ptr "res"
OpName %lhs_ptr "lhs"
OpName %rhs_ptr "rhs"
OpDecorate %dec FuncParamAttr NoCapture
%dec = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec %out_ptr %lhs_ptr %rhs_ptr
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%bool_t = OpTypeBool
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_zero = OpConstant %int_t 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%tmp_ptr_t = OpTypePointer Function %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%out_ptr = OpFunctionParameter %int_ptr_t
%lhs_ptr = OpFunctionParameter %int_ptr_t
%rhs_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%lhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %lhs_ptr %idx
%lhs_val = OpLoad %int_t %lhs_loc Aligned 4
%rhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %rhs_ptr %idx
%rhs_val = OpLoad %int_t %rhs_loc Aligned 4
%tmp = OpVariable %tmp_ptr_t Function
%compare = OpSLessThan %bool_t %lhs_val %rhs_val
OpBranchConditional %compare %block1 %block2
%block1 = OpLabel
%out1 = OpISub %int_t %rhs_val %lhs_val
OpStore %tmp %out1
OpBranch %final_block
%block2 = OpLabel
%out2 = OpISub %int_t %lhs_val %rhs_val
OpStore %tmp %out2
OpBranch %final_block
%final_block = OpLabel
%out_val = OpLoad %int_t %tmp
%out_loc = OpInBoundsPtrAccessChain %int_ptr_t %out_ptr %idx
OpStore %out_loc %out_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,58 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "branch_conditional"
OpName %out_ptr "res"
OpName %lhs_ptr "lhs"
OpName %rhs_ptr "rhs"
OpDecorate %dec FuncParamAttr NoCapture
%dec = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec %out_ptr %lhs_ptr %rhs_ptr
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%bool_t = OpTypeBool
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%shift_val = OpConstant %idx_t 32
%int_zero = OpConstant %int_t 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%tmp_ptr_t = OpTypePointer Function %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%out_ptr = OpFunctionParameter %int_ptr_t
%lhs_ptr = OpFunctionParameter %int_ptr_t
%rhs_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%lhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %lhs_ptr %idx
%lhs_val = OpLoad %int_t %lhs_loc Aligned 4
%rhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %rhs_ptr %idx
%rhs_val = OpLoad %int_t %rhs_loc Aligned 4
%tmp = OpVariable %tmp_ptr_t Function
OpStore %tmp %int_zero
%compare = OpSLessThan %bool_t %lhs_val %rhs_val
OpBranchConditional %compare %block1 %block2
%block1 = OpLabel
%out1 = OpISub %int_t %rhs_val %lhs_val
OpStore %tmp %out1
OpBranch %final_block
%block2 = OpLabel
%out2 = OpISub %int_t %lhs_val %rhs_val
OpStore %tmp %out2
OpBranch %final_block
%final_block = OpLabel
%out_val = OpLoad %int_t %tmp
%out_loc = OpInBoundsPtrAccessChain %int_ptr_t %out_ptr %idx
OpStore %out_loc %out_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,53 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "branch_conditional_weighted"
OpName %out_ptr "res"
OpName %lhs_ptr "lhs"
OpName %rhs_ptr "rhs"
OpDecorate %dec FuncParamAttr NoCapture
%dec = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec %out_ptr %lhs_ptr %rhs_ptr
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%bool_t = OpTypeBool
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_zero = OpConstant %int_t 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%tmp_ptr_t = OpTypePointer Function %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%out_ptr = OpFunctionParameter %int_ptr_t
%lhs_ptr = OpFunctionParameter %int_ptr_t
%rhs_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%lhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %lhs_ptr %idx
%lhs_val = OpLoad %int_t %lhs_loc Aligned 4
%rhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %rhs_ptr %idx
%rhs_val = OpLoad %int_t %rhs_loc Aligned 4
%tmp = OpVariable %tmp_ptr_t Function
%compare = OpSLessThan %bool_t %lhs_val %rhs_val
OpBranchConditional %compare %block1 %block2 4 6
%block1 = OpLabel
%out1 = OpISub %int_t %rhs_val %lhs_val
OpStore %tmp %out1
OpBranch %final_block
%block2 = OpLabel
%out2 = OpISub %int_t %lhs_val %rhs_val
OpStore %tmp %out2
OpBranch %final_block
%final_block = OpLabel
%out_val = OpLoad %int_t %tmp
%out_loc = OpInBoundsPtrAccessChain %int_ptr_t %out_ptr %idx
OpStore %out_loc %out_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,58 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "branch_conditional_weighted"
OpName %out_ptr "res"
OpName %lhs_ptr "lhs"
OpName %rhs_ptr "rhs"
OpDecorate %dec FuncParamAttr NoCapture
%dec = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec %out_ptr %lhs_ptr %rhs_ptr
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%bool_t = OpTypeBool
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%shift_val = OpConstant %idx_t 32
%int_zero = OpConstant %int_t 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%tmp_ptr_t = OpTypePointer Function %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%out_ptr = OpFunctionParameter %int_ptr_t
%lhs_ptr = OpFunctionParameter %int_ptr_t
%rhs_ptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%lhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %lhs_ptr %idx
%lhs_val = OpLoad %int_t %lhs_loc Aligned 4
%rhs_loc = OpInBoundsPtrAccessChain %int_ptr_t %rhs_ptr %idx
%rhs_val = OpLoad %int_t %rhs_loc Aligned 4
%tmp = OpVariable %tmp_ptr_t Function
OpStore %tmp %int_zero
%compare = OpSLessThan %bool_t %lhs_val %rhs_val
OpBranchConditional %compare %block1 %block2 4 6
%block1 = OpLabel
%out1 = OpISub %int_t %rhs_val %lhs_val
OpStore %tmp %out1
OpBranch %final_block
%block2 = OpLabel
%out2 = OpISub %int_t %lhs_val %rhs_val
OpStore %tmp %out2
OpBranch %final_block
%final_block = OpLabel
%out_val = OpLoad %int_t %tmp
%out_loc = OpInBoundsPtrAccessChain %int_ptr_t %out_ptr %idx
OpStore %out_loc %out_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "branch_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%outptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current_in = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
%current_out = OpInBoundsPtrAccessChain %int_ptr_t %outptr %idx
%val = OpLoad %int_t %current_in
OpBranch %final_block
%final_block = OpLabel
OpStore %current_out %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "branch_simple"
OpName %inptr "in"
OpName %outptr "out"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%shift_val = OpConstant %idx_t 32
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%outptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current_in = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
%current_out = OpInBoundsPtrAccessChain %int_ptr_t %outptr %idx
OpBranch %final_block
%final_block = OpLabel
%val = OpLoad %int_t %current_in
OpStore %current_out %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "composite_construct_int4"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int4_t = OpTypeVector %int_t 4
%int4_ptr_t = OpTypePointer CrossWorkgroup %int4_t
%func_t = OpTypeFunction %void_t %int4_ptr_t
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%val3 = OpConstant %int_t 119
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int4_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%vec = OpCompositeConstruct %int4_t %val0 %val1 %val2 %val3
%current = OpInBoundsPtrAccessChain %int4_ptr_t %inptr %idx
OpStore %current %vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "composite_construct_int4"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int4_t = OpTypeVector %int_t 4
%int4_ptr_t = OpTypePointer CrossWorkgroup %int4_t
%func_t = OpTypeFunction %void_t %int4_ptr_t
%shift_val = OpConstant %idx_t 32
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%val3 = OpConstant %int_t 119
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int4_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%vec = OpCompositeConstruct %int4_t %val0 %val1 %val2 %val3
%current = OpInBoundsPtrAccessChain %int4_ptr_t %inptr %idx
OpStore %current %vec
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,39 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "composite_construct_struct"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int2_t = OpTypeVector %int_t 2
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct2_t = OpTypeStruct %int2_t %struct_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct2_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%int_vec_0 = OpConstant %int_t 2100480000
%int_vec_1 = OpConstant %int_t 2100480000
%int2_val = OpConstantComposite %int2_t %int_vec_0 %int_vec_1
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%struct_val = OpCompositeConstruct %struct_t %int_val %char_val
%struct2_val = OpCompositeConstruct %struct2_t %int2_val %struct_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct2_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "composite_construct_struct"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int2_t = OpTypeVector %int_t 2
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct2_t = OpTypeStruct %int2_t %struct_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct2_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%int_vec_0 = OpConstant %int_t 2100480000
%int_vec_1 = OpConstant %int_t 2100480000
%int2_val = OpConstantComposite %int2_t %int_vec_0 %int_vec_1
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%struct_val = OpCompositeConstruct %struct_t %int_val %char_val
%struct2_val = OpCompositeConstruct %struct2_t %int2_val %struct_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct2_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%char_t = OpTypeInt 8 0
%char_ptr_t = OpTypePointer CrossWorkgroup %char_t
%func_t = OpTypeFunction %void_t %char_ptr_t
%val = OpConstant %char_t 20
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %char_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %char_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%char_t = OpTypeInt 8 0
%char_ptr_t = OpTypePointer CrossWorkgroup %char_t
%func_t = OpTypeFunction %void_t %char_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %char_t 20
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %char_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %char_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Float64
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_double_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%double_t = OpTypeFloat 64
%double_ptr_t = OpTypePointer CrossWorkgroup %double_t
%func_t = OpTypeFunction %void_t %double_ptr_t
%val = OpConstant %double_t 3.141592653589793
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %double_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %double_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Float64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_double_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%double_t = OpTypeFloat 64
%double_ptr_t = OpTypePointer CrossWorkgroup %double_t
%func_t = OpTypeFunction %void_t %double_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %double_t 3.141592653589793
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %double_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %double_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_false_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%bool_t = OpTypeBool
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%bool_val = OpConstantFalse %bool_t
%true_val = OpConstant %int_t 1
%false_val = OpConstant %int_t 0
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%val = OpSelect %int_t %bool_val %true_val %false_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,36 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_false_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%bool_t = OpTypeBool
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%bool_val = OpConstantFalse %bool_t
%true_val = OpConstant %int_t 1
%false_val = OpConstant %int_t 0
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%val = OpSelect %int_t %bool_val %true_val %false_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,28 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%val = OpConstant %float_t 3.1415927
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %float_t 3.1415927
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,31 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Float16
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_half_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%half_t = OpTypeFloat 16
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%half_val = OpConstant %half_t 3.25
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%val = OpFConvert %float_t %half_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,35 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Float16
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_half_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%half_t = OpTypeFloat 16
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%shift_val = OpConstant %idx_t 32
%half_val = OpConstant %half_t 3.25
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%val = OpFConvert %float_t %half_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_int3_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int3_t = OpTypeVector %int_t 3
%int3_ptr_t = OpTypePointer CrossWorkgroup %int3_t
%func_t = OpTypeFunction %void_t %int3_ptr_t
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%vec = OpConstantComposite %int3_t %val0 %val1 %val2
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int3_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int3_ptr_t %inptr %idx
OpStore %current %vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,36 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_int3_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int3_t = OpTypeVector %int_t 3
%int3_ptr_t = OpTypePointer CrossWorkgroup %int3_t
%func_t = OpTypeFunction %void_t %int3_ptr_t
%shift_val = OpConstant %idx_t 32
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%vec = OpConstantComposite %int3_t %val0 %val1 %val2
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int3_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int3_ptr_t %inptr %idx
OpStore %current %vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_int4_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int4_t = OpTypeVector %int_t 4
%int4_ptr_t = OpTypePointer CrossWorkgroup %int4_t
%func_t = OpTypeFunction %void_t %int4_ptr_t
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%val3 = OpConstant %int_t 119
%vec = OpConstantComposite %int4_t %val0 %val1 %val2 %val3
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int4_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int4_ptr_t %inptr %idx
OpStore %current %vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_int4_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int4_t = OpTypeVector %int_t 4
%int4_ptr_t = OpTypePointer CrossWorkgroup %int4_t
%func_t = OpTypeFunction %void_t %int4_ptr_t
%shift_val = OpConstant %idx_t 32
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%val3 = OpConstant %int_t 119
%vec = OpConstantComposite %int4_t %val0 %val1 %val2 %val3
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int4_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int4_ptr_t %inptr %idx
OpStore %current %vec
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,28 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_int_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%val = OpConstant %int_t 123
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_int_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %int_t 123
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_long_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%long_t = OpTypeInt 64 0
%long_ptr_t = OpTypePointer CrossWorkgroup %long_t
%func_t = OpTypeFunction %void_t %long_ptr_t
%val = OpConstant %long_t 34359738368
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %long_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %long_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_long_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%long_t = OpTypeInt 64 0
%long_ptr_t = OpTypePointer CrossWorkgroup %long_t
%func_t = OpTypeFunction %void_t %long_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %long_t 34359738368
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %long_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %long_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int16
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_short_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%short_t = OpTypeInt 16 0
%short_ptr_t = OpTypePointer CrossWorkgroup %short_t
%func_t = OpTypeFunction %void_t %short_ptr_t
%val = OpConstant %short_t 32000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %short_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %short_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int16
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_short_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%short_t = OpTypeInt 16 0
%short_ptr_t = OpTypePointer CrossWorkgroup %short_t
%func_t = OpTypeFunction %void_t %short_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %short_t 32000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %short_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %short_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_struct_int_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_struct_int_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Kernel
OpCapability Linkage
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_struct_int_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%float_t = OpTypeFloat 32
%struct_t = OpTypeStruct %int_t %float_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 1024
%float_val = OpConstant %float_t 3.1415
%struct_val = OpConstantComposite %struct_t %int_val %float_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,36 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_struct_int_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%float_t = OpTypeFloat 32
%struct_t = OpTypeStruct %int_t %float_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 1024
%float_val = OpConstant %float_t 3.1415
%struct_val = OpConstantComposite %struct_t %int_val %float_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,39 @@
OpCapability Addresses
OpCapability Kernel
OpCapability Linkage
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_struct_struct_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int2_t = OpTypeVector %int_t 2
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct2_t = OpTypeStruct %int2_t %struct_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct2_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%int_vec_0 = OpConstant %int_t 2100480000
%int_vec_1 = OpConstant %int_t 2100480000
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%int2_val = OpConstantComposite %int2_t %int_vec_0 %int_vec_1
%struct2_val = OpConstantComposite %struct2_t %int2_val %struct_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct2_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_struct_struct_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int2_t = OpTypeVector %int_t 2
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct2_t = OpTypeStruct %int2_t %struct_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct2_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%int_vec_0 = OpConstant %int_t 2100480000
%int_vec_1 = OpConstant %int_t 2100480000
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%int2_val = OpConstantComposite %int2_t %int_vec_0 %int_vec_1
%struct2_val = OpConstantComposite %struct2_t %int2_val %struct_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct2_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_true_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%bool_t = OpTypeBool
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%bool_val = OpConstantTrue %bool_t
%true_val = OpConstant %int_t 1
%false_val = OpConstant %int_t 0
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%val = OpSelect %int_t %bool_val %true_val %false_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
OpStore %current %val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,36 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_true_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%bool_t = OpTypeBool
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%bool_val = OpConstantTrue %bool_t
%true_val = OpConstant %int_t 1
%false_val = OpConstant %int_t 0
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%val = OpSelect %int_t %bool_val %true_val %false_val
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_uchar_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uchar_t = OpTypeInt 8 0
%uchar_ptr_t = OpTypePointer CrossWorkgroup %uchar_t
%func_t = OpTypeFunction %void_t %uchar_ptr_t
%val = OpConstant %uchar_t 19
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uchar_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %uchar_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_uchar_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uchar_t = OpTypeInt 8 0
%uchar_ptr_t = OpTypePointer CrossWorkgroup %uchar_t
%func_t = OpTypeFunction %void_t %uchar_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %uchar_t 19
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uchar_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %uchar_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,28 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_uint_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uint_t = OpTypeInt 32 0
%uint_ptr_t = OpTypePointer CrossWorkgroup %uint_t
%func_t = OpTypeFunction %void_t %uint_ptr_t
%val = OpConstant %uint_t 54321
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uint_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %uint_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_uint_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uint_t = OpTypeInt 32 0
%uint_ptr_t = OpTypePointer CrossWorkgroup %uint_t
%func_t = OpTypeFunction %void_t %uint_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %uint_t 54321
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uint_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %uint_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_ulong_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ulong_t = OpTypeInt 64 0
%ulong_ptr_t = OpTypePointer CrossWorkgroup %ulong_t
%func_t = OpTypeFunction %void_t %ulong_ptr_t
%val = OpConstant %ulong_t 9223372036854775810
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ulong_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %ulong_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_ulong_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ulong_t = OpTypeInt 64 0
%ulong_ptr_t = OpTypePointer CrossWorkgroup %ulong_t
%func_t = OpTypeFunction %void_t %ulong_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %ulong_t 9223372036854775810
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ulong_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %ulong_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int16
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "constant_ushort_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ushort_t = OpTypeInt 16 0
%ushort_ptr_t = OpTypePointer CrossWorkgroup %ushort_t
%func_t = OpTypeFunction %void_t %ushort_ptr_t
%val = OpConstant %ushort_t 65000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ushort_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %ushort_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int16
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "constant_ushort_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ushort_t = OpTypeInt 16 0
%ushort_ptr_t = OpTypePointer CrossWorkgroup %ushort_t
%func_t = OpTypeFunction %void_t %ushort_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %ushort_t 65000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ushort_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %ushort_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,30 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%char_t = OpTypeInt 8 0
%char_ptr_t = OpTypePointer CrossWorkgroup %char_t
%func_t = OpTypeFunction %void_t %char_ptr_t
%val = OpConstant %char_t 20
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %char_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %char_ptr_t %inptr %idx
%out_val = OpCopyObject %char_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%char_t = OpTypeInt 8 0
%char_ptr_t = OpTypePointer CrossWorkgroup %char_t
%func_t = OpTypeFunction %void_t %char_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %char_t 20
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %char_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %char_ptr_t %inptr %idx
%out_val = OpCopyObject %char_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,30 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Float64
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_double_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%double_t = OpTypeFloat 64
%double_ptr_t = OpTypePointer CrossWorkgroup %double_t
%func_t = OpTypeFunction %void_t %double_ptr_t
%val = OpConstant %double_t 3.141592653589793
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %double_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %double_ptr_t %inptr %idx
%out_val = OpCopyObject %double_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Float64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_double_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%double_t = OpTypeFloat 64
%double_ptr_t = OpTypePointer CrossWorkgroup %double_t
%func_t = OpTypeFunction %void_t %double_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %double_t 3.141592653589793
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %double_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %double_ptr_t %inptr %idx
%out_val = OpCopyObject %double_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%val = OpConstant %float_t 3.1415927
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
%out_val = OpCopyObject %float_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %float_t 3.1415927
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
%out_val = OpCopyObject %float_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,32 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Float16
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_half_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%half_t = OpTypeFloat 16
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%half_val = OpConstant %half_t 3.25
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%half_copy = OpCopyObject %half_t %half_val
%val = OpFConvert %float_t %half_copy
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,36 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Float16
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_half_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%float_t = OpTypeFloat 32
%half_t = OpTypeFloat 16
%float_ptr_t = OpTypePointer CrossWorkgroup %float_t
%func_t = OpTypeFunction %void_t %float_ptr_t
%shift_val = OpConstant %idx_t 32
%half_val = OpConstant %half_t 3.25
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %float_ptr_t
%entry = OpLabel
%half_copy = OpCopyObject %half_t %half_val
%val = OpFConvert %float_t %half_copy
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %float_ptr_t %inptr %idx
OpStore %current %val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_int3_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int3_t = OpTypeVector %int_t 3
%int3_ptr_t = OpTypePointer CrossWorkgroup %int3_t
%func_t = OpTypeFunction %void_t %int3_ptr_t
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%vec = OpConstantComposite %int3_t %val0 %val1 %val2
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int3_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int3_ptr_t %inptr %idx
%out_vec = OpCopyObject %int3_t %vec
OpStore %current %out_vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_int3_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int3_t = OpTypeVector %int_t 3
%int3_ptr_t = OpTypePointer CrossWorkgroup %int3_t
%func_t = OpTypeFunction %void_t %int3_ptr_t
%shift_val = OpConstant %idx_t 32
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%vec = OpConstantComposite %int3_t %val0 %val1 %val2
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int3_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int3_ptr_t %inptr %idx
%out_vec = OpCopyObject %int3_t %vec
OpStore %current %out_vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_int4_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int4_t = OpTypeVector %int_t 4
%int4_ptr_t = OpTypePointer CrossWorkgroup %int4_t
%func_t = OpTypeFunction %void_t %int4_ptr_t
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%val3 = OpConstant %int_t 119
%vec = OpConstantComposite %int4_t %val0 %val1 %val2 %val3
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int4_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int4_ptr_t %inptr %idx
%out_vec = OpCopyObject %int4_t %vec
OpStore %current %out_vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,38 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_int4_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int4_t = OpTypeVector %int_t 4
%int4_ptr_t = OpTypePointer CrossWorkgroup %int4_t
%func_t = OpTypeFunction %void_t %int4_ptr_t
%shift_val = OpConstant %idx_t 32
%val0 = OpConstant %int_t 123
%val1 = OpConstant %int_t 122
%val2 = OpConstant %int_t 121
%val3 = OpConstant %int_t 119
%vec = OpConstantComposite %int4_t %val0 %val1 %val2 %val3
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int4_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int4_ptr_t %inptr %idx
%out_vec = OpCopyObject %int4_t %vec
OpStore %current %out_vec Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_int_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%val = OpConstant %int_t 123
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
%out_val = OpCopyObject %int_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_int_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %int_t 123
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %int_ptr_t %inptr %idx
%out_val = OpCopyObject %int_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,30 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_long_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%long_t = OpTypeInt 64 0
%long_ptr_t = OpTypePointer CrossWorkgroup %long_t
%func_t = OpTypeFunction %void_t %long_ptr_t
%val = OpConstant %long_t 34359738368
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %long_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %long_ptr_t %inptr %idx
%out_val = OpCopyObject %long_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_long_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%long_t = OpTypeInt 64 0
%long_ptr_t = OpTypePointer CrossWorkgroup %long_t
%func_t = OpTypeFunction %void_t %long_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %long_t 34359738368
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %long_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %long_ptr_t %inptr %idx
%out_val = OpCopyObject %long_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,30 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int16
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_short_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%short_t = OpTypeInt 16 0
%short_ptr_t = OpTypePointer CrossWorkgroup %short_t
%func_t = OpTypeFunction %void_t %short_ptr_t
%val = OpConstant %short_t 32000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %short_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %short_ptr_t %inptr %idx
%out_val = OpCopyObject %short_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int16
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_short_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%short_t = OpTypeInt 16 0
%short_ptr_t = OpTypePointer CrossWorkgroup %short_t
%func_t = OpTypeFunction %void_t %short_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %short_t 32000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %short_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %short_ptr_t %inptr %idx
%out_val = OpCopyObject %short_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Kernel
OpCapability Linkage
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_struct_int_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
%out_val = OpCopyObject %struct_t %struct_val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,38 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_struct_int_char_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
%out_val = OpCopyObject %struct_t %struct_val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Kernel
OpCapability Linkage
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_struct_int_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%float_t = OpTypeFloat 32
%struct_t = OpTypeStruct %int_t %float_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 1024
%float_val = OpConstant %float_t 3.1415
%struct_val = OpConstantComposite %struct_t %int_val %float_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
%out_val = OpCopyObject %struct_t %struct_val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,37 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_struct_int_float_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%float_t = OpTypeFloat 32
%struct_t = OpTypeStruct %int_t %float_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 1024
%float_val = OpConstant %float_t 3.1415
%struct_val = OpConstantComposite %struct_t %int_val %float_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
%out_val = OpCopyObject %struct_t %struct_val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,40 @@
OpCapability Addresses
OpCapability Kernel
OpCapability Int8
OpCapability Linkage
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_struct_struct_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int2_t = OpTypeVector %int_t 2
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct2_t = OpTypeStruct %int2_t %struct_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct2_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%int_vec_0 = OpConstant %int_t 2100480000
%int_vec_1 = OpConstant %int_t 2100480000
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%int2_val = OpConstantComposite %int2_t %int_vec_0 %int_vec_1
%struct2_val = OpConstantComposite %struct2_t %int2_val %struct_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
%out_val = OpCopyObject %struct2_t %struct2_val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,44 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_struct_struct_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int2_t = OpTypeVector %int_t 2
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct2_t = OpTypeStruct %int2_t %struct_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct2_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 128
%int_vec_0 = OpConstant %int_t 2100480000
%int_vec_1 = OpConstant %int_t 2100480000
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%int2_val = OpConstantComposite %int2_t %int_vec_0 %int_vec_1
%struct2_val = OpConstantComposite %struct2_t %int2_val %struct_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
%out_val = OpCopyObject %struct2_t %struct2_val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,30 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_uchar_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uchar_t = OpTypeInt 8 0
%uchar_ptr_t = OpTypePointer CrossWorkgroup %uchar_t
%func_t = OpTypeFunction %void_t %uchar_ptr_t
%val = OpConstant %uchar_t 19
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uchar_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %uchar_ptr_t %inptr %idx
%out_val = OpCopyObject %uchar_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_uchar_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uchar_t = OpTypeInt 8 0
%uchar_ptr_t = OpTypePointer CrossWorkgroup %uchar_t
%func_t = OpTypeFunction %void_t %uchar_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %uchar_t 19
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uchar_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %uchar_ptr_t %inptr %idx
%out_val = OpCopyObject %uchar_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,29 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_uint_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uint_t = OpTypeInt 32 0
%uint_ptr_t = OpTypePointer CrossWorkgroup %uint_t
%func_t = OpTypeFunction %void_t %uint_ptr_t
%val = OpConstant %uint_t 54321
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uint_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %uint_ptr_t %inptr %idx
%out_val = OpCopyObject %uint_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_uint_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%uint_t = OpTypeInt 32 0
%uint_ptr_t = OpTypePointer CrossWorkgroup %uint_t
%func_t = OpTypeFunction %void_t %uint_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %uint_t 54321
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %uint_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %uint_ptr_t %inptr %idx
%out_val = OpCopyObject %uint_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,30 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_ulong_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ulong_t = OpTypeInt 64 0
%ulong_ptr_t = OpTypePointer CrossWorkgroup %ulong_t
%func_t = OpTypeFunction %void_t %ulong_ptr_t
%val = OpConstant %ulong_t 9223372036854775810
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ulong_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %ulong_ptr_t %inptr %idx
%out_val = OpCopyObject %ulong_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,33 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_ulong_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ulong_t = OpTypeInt 64 0
%ulong_ptr_t = OpTypePointer CrossWorkgroup %ulong_t
%func_t = OpTypeFunction %void_t %ulong_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %ulong_t 9223372036854775810
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ulong_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %ulong_ptr_t %inptr %idx
%out_val = OpCopyObject %ulong_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,30 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int16
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "copy_ushort_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ushort_t = OpTypeInt 16 0
%ushort_ptr_t = OpTypePointer CrossWorkgroup %ushort_t
%func_t = OpTypeFunction %void_t %ushort_ptr_t
%val = OpConstant %ushort_t 65000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ushort_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %ushort_ptr_t %inptr %idx
%out_val = OpCopyObject %ushort_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int16
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "copy_ushort_simple"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%ushort_t = OpTypeInt 16 0
%ushort_ptr_t = OpTypePointer CrossWorkgroup %ushort_t
%func_t = OpTypeFunction %void_t %ushort_ptr_t
%shift_val = OpConstant %idx_t 32
%val = OpConstant %ushort_t 65000
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %ushort_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %ushort_ptr_t %inptr %idx
%out_val = OpCopyObject %ushort_t %val
OpStore %current %out_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,39 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "decorate_aliased"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Aliased
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "decorate_aliased"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Aliased
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,39 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "decorate_alignment"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Alignment 4
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "decorate_alignment"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Alignment 4
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,75 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability ImageBasic
OpCapability LiteralSampler
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %15 "decorate_coherent"
OpName %5 "sampler"
OpName %8 "__spirv_BuiltInGlobalInvocationId"
OpName %9 "__spirv_BuiltInGlobalSize"
OpName %16 "dst"
OpName %17 "src"
OpName %18 "entry"
OpName %20 "call"
OpName %22 "call1"
OpName %24 "call2"
OpName %25 "mul"
OpName %26 "add"
OpName %29 "vecinit"
OpName %30 "vecinit6"
OpName %34 "TempSampledImage"
OpName %35 "call7.old"
OpName %38 "arrayidx"
OpDecorate %17 Coherent
OpDecorate %39 Constant
%39 = OpDecorationGroup
OpDecorate %8 BuiltIn GlobalInvocationId
OpDecorate %9 BuiltIn GlobalSize
OpDecorate %16 FuncParamAttr NoCapture
OpDecorate %5 LinkageAttributes "sampler" Export
OpDecorate %9 LinkageAttributes "__spirv_BuiltInGlobalSize" Import
OpDecorate %8 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
OpDecorate %5 Alignment 4
OpGroupDecorate %39 %5 %8 %9
%2 = OpTypeInt 32 0
%3 = OpConstant %2 16
%4 = OpTypePointer UniformConstant %2
%6 = OpTypeVector %2 3
%7 = OpTypePointer UniformConstant %6
%10 = OpTypeVoid
%11 = OpTypeVector %2 4
%12 = OpTypePointer CrossWorkgroup %11
%13 = OpTypeImage %10 2D 0 0 0 0 Unknown
%14 = OpTypeFunction %10 %12 %13
%27 = OpTypeVector %2 2
%31 = OpTypeSampler
%33 = OpTypeSampledImage %13
%36 = OpTypeFloat 32
%32 = OpConstantSampler %31 None 0 Nearest
%37 = OpConstant %36 0
%5 = OpVariable %4 UniformConstant %3
%8 = OpVariable %7 UniformConstant
%9 = OpVariable %7 UniformConstant
%15 = OpFunction %10 None %14
%16 = OpFunctionParameter %12
%17 = OpFunctionParameter %13
%18 = OpLabel
%28 = OpUndef %27
%19 = OpLoad %6 %8 Aligned 0
%20 = OpCompositeExtract %2 %19 0
%21 = OpLoad %6 %8 Aligned 0
%22 = OpCompositeExtract %2 %21 1
%23 = OpLoad %6 %9 Aligned 0
%24 = OpCompositeExtract %2 %23 0
%25 = OpIMul %2 %24 %22
%26 = OpIAdd %2 %25 %20
%29 = OpCompositeInsert %27 %22 %28 0
%30 = OpCompositeInsert %27 %20 %29 1
%34 = OpSampledImage %33 %17 %32
%35 = OpImageSampleExplicitLod %11 %34 %30 Lod %37
%38 = OpInBoundsPtrAccessChain %12 %16 %26
OpStore %38 %35 Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,88 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability ImageBasic
OpCapability LiteralSampler
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %16 "decorate_coherent"
OpName %5 "sampler"
OpName %9 "__spirv_BuiltInGlobalInvocationId"
OpName %10 "__spirv_BuiltInGlobalSize"
OpName %17 "dst"
OpName %18 "src"
OpName %19 "entry"
OpName %21 "call"
OpName %22 "conv"
OpName %24 "call1"
OpName %25 "conv2"
OpName %26 "conv3"
OpName %28 "call4"
OpName %29 "mul"
OpName %30 "add"
OpName %33 "vecinit"
OpName %34 "vecinit10"
OpName %38 "TempSampledImage"
OpName %39 "call11.old"
OpName %43 "sext"
OpName %44 "idxprom"
OpName %45 "arrayidx"
OpDecorate %18 Coherent
OpDecorate %46 Constant
%46 = OpDecorationGroup
OpDecorate %9 BuiltIn GlobalInvocationId
OpDecorate %10 BuiltIn GlobalSize
OpDecorate %17 FuncParamAttr NoCapture
OpDecorate %5 LinkageAttributes "sampler" Export
OpDecorate %10 LinkageAttributes "__spirv_BuiltInGlobalSize" Import
OpDecorate %9 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
OpDecorate %5 Alignment 4
OpGroupDecorate %46 %5 %9 %10
%2 = OpTypeInt 32 0
%6 = OpTypeInt 64 0
%3 = OpConstant %2 16
%42 = OpConstant %6 32
%4 = OpTypePointer UniformConstant %2
%7 = OpTypeVector %6 3
%8 = OpTypePointer UniformConstant %7
%11 = OpTypeVoid
%12 = OpTypeVector %2 4
%13 = OpTypePointer CrossWorkgroup %12
%14 = OpTypeImage %11 2D 0 0 0 0 Unknown
%15 = OpTypeFunction %11 %13 %14
%31 = OpTypeVector %2 2
%35 = OpTypeSampler
%37 = OpTypeSampledImage %14
%40 = OpTypeFloat 32
%36 = OpConstantSampler %35 None 0 Nearest
%41 = OpConstant %40 0
%5 = OpVariable %4 UniformConstant %3
%9 = OpVariable %8 UniformConstant
%10 = OpVariable %8 UniformConstant
%16 = OpFunction %11 None %15
%17 = OpFunctionParameter %13
%18 = OpFunctionParameter %14
%19 = OpLabel
%32 = OpUndef %31
%20 = OpLoad %7 %9 Aligned 0
%21 = OpCompositeExtract %6 %20 0
%22 = OpUConvert %2 %21
%23 = OpLoad %7 %9 Aligned 0
%24 = OpCompositeExtract %6 %23 1
%25 = OpUConvert %2 %24
%26 = OpSConvert %6 %25
%27 = OpLoad %7 %10 Aligned 0
%28 = OpCompositeExtract %6 %27 0
%29 = OpIMul %6 %26 %28
%30 = OpIAdd %6 %29 %21
%33 = OpCompositeInsert %31 %25 %32 0
%34 = OpCompositeInsert %31 %22 %33 1
%38 = OpSampledImage %37 %18 %36
%39 = OpImageSampleExplicitLod %12 %38 %34 Lod %41
%43 = OpShiftLeftLogical %6 %30 %42
%44 = OpShiftRightArithmetic %6 %43 %42
%45 = OpInBoundsPtrAccessChain %13 %17 %44
OpStore %45 %39 Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,39 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "decorate_constant"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Constant
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %lhs %rhs
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "decorate_constant"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Constant
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %lhs %rhs
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,39 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "decorate_constant"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Constant
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "decorate_constant"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Constant
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,34 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int8
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "decorate_cpacked"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpDecorate %struct_t CPacked
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 127
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,38 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability Int8
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "decorate_cpacked"
OpName %inptr "in"
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %inptr FuncParamAttr NoCapture
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpDecorate %struct_t CPacked
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%char_t = OpTypeInt 8 0
%struct_t = OpTypeStruct %int_t %char_t
%struct_ptr_t = OpTypePointer CrossWorkgroup %struct_t
%func_t = OpTypeFunction %void_t %struct_ptr_t
%shift_val = OpConstant %idx_t 32
%int_val = OpConstant %int_t 2100483600
%char_val = OpConstant %char_t 127
%struct_val = OpConstantComposite %struct_t %int_val %char_val
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%inptr = OpFunctionParameter %struct_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%current = OpInBoundsPtrAccessChain %struct_ptr_t %inptr %idx
OpStore %current %struct_val
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,61 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability ImageBasic
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %12 "decorate_nonreadable"
OpSource OpenCL_C 100000
OpName %5 "__spirv_BuiltInGlobalInvocationId"
OpName %6 "__spirv_BuiltInGlobalSize"
OpName %13 "dst"
OpName %14 "src"
OpName %15 "entry"
OpName %17 "call"
OpName %19 "call1"
OpName %21 "call2"
OpName %22 "mul"
OpName %23 "add"
OpName %26 "vecinit"
OpName %27 "vecinit3"
OpName %28 "arrayidx"
OpDecorate %13 NonReadable
OpDecorate %30 Constant
%30 = OpDecorationGroup
OpDecorate %5 BuiltIn GlobalInvocationId
OpDecorate %6 BuiltIn GlobalSize
OpDecorate %14 FuncParamAttr NoCapture
OpDecorate %6 LinkageAttributes "__spirv_BuiltInGlobalSize" Import
OpDecorate %5 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
OpGroupDecorate %30 %5 %6
%2 = OpTypeInt 32 0
%3 = OpTypeVector %2 3
%4 = OpTypePointer UniformConstant %3
%7 = OpTypeVoid
%8 = OpTypeImage %7 2D 0 0 0 0 Unknown
%9 = OpTypeVector %2 4
%10 = OpTypePointer CrossWorkgroup %9
%11 = OpTypeFunction %7 %8 %10
%24 = OpTypeVector %2 2
%5 = OpVariable %4 UniformConstant
%6 = OpVariable %4 UniformConstant
%12 = OpFunction %7 None %11
%13 = OpFunctionParameter %8
%14 = OpFunctionParameter %10
%15 = OpLabel
%25 = OpUndef %24
%16 = OpLoad %3 %5 Aligned 0
%17 = OpCompositeExtract %2 %16 0
%18 = OpLoad %3 %5 Aligned 0
%19 = OpCompositeExtract %2 %18 1
%20 = OpLoad %3 %6 Aligned 0
%21 = OpCompositeExtract %2 %20 0
%22 = OpIMul %2 %21 %19
%23 = OpIAdd %2 %22 %17
%26 = OpCompositeInsert %24 %19 %25 0
%27 = OpCompositeInsert %24 %17 %26 1
%28 = OpInBoundsPtrAccessChain %10 %14 %23
%29 = OpLoad %9 %28 Aligned 16
OpImageWrite %13 %27 %29
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,74 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability ImageBasic
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %13 "decorate_nonreadable"
OpSource OpenCL_C 100000
OpName %5 "__spirv_BuiltInGlobalInvocationId"
OpName %6 "__spirv_BuiltInGlobalSize"
OpName %14 "dst"
OpName %15 "src"
OpName %16 "entry"
OpName %18 "call"
OpName %19 "conv"
OpName %21 "call1"
OpName %22 "conv2"
OpName %23 "conv3"
OpName %25 "call4"
OpName %26 "mul"
OpName %27 "add"
OpName %30 "vecinit"
OpName %31 "vecinit7"
OpName %33 "sext"
OpName %34 "idxprom"
OpName %35 "arrayidx"
OpDecorate %14 NonReadable
OpDecorate %37 Constant
%37 = OpDecorationGroup
OpDecorate %5 BuiltIn GlobalInvocationId
OpDecorate %6 BuiltIn GlobalSize
OpDecorate %15 FuncParamAttr NoCapture
OpDecorate %6 LinkageAttributes "__spirv_BuiltInGlobalSize" Import
OpDecorate %5 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
OpGroupDecorate %37 %5 %6
%2 = OpTypeInt 64 0
%9 = OpTypeInt 32 0
%32 = OpConstant %2 32
%3 = OpTypeVector %2 3
%4 = OpTypePointer UniformConstant %3
%7 = OpTypeVoid
%8 = OpTypeImage %7 2D 0 0 0 0 Unknown
%10 = OpTypeVector %9 4
%11 = OpTypePointer CrossWorkgroup %10
%12 = OpTypeFunction %7 %8 %11
%28 = OpTypeVector %9 2
%5 = OpVariable %4 UniformConstant
%6 = OpVariable %4 UniformConstant
%13 = OpFunction %7 None %12
%14 = OpFunctionParameter %8
%15 = OpFunctionParameter %11
%16 = OpLabel
%29 = OpUndef %28
%17 = OpLoad %3 %5 Aligned 0
%18 = OpCompositeExtract %2 %17 0
%19 = OpUConvert %9 %18
%20 = OpLoad %3 %5 Aligned 0
%21 = OpCompositeExtract %2 %20 1
%22 = OpUConvert %9 %21
%23 = OpSConvert %2 %22
%24 = OpLoad %3 %6 Aligned 0
%25 = OpCompositeExtract %2 %24 0
%26 = OpIMul %2 %23 %25
%27 = OpIAdd %2 %26 %18
%30 = OpCompositeInsert %28 %22 %29 0
%31 = OpCompositeInsert %28 %19 %30 1
%33 = OpShiftLeftLogical %2 %27 %32
%34 = OpShiftRightArithmetic %2 %33 %32
%35 = OpInBoundsPtrAccessChain %11 %15 %34
%36 = OpLoad %10 %35 Aligned 16
OpImageWrite %14 %31 %36
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,75 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability ImageBasic
OpCapability LiteralSampler
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %15 "decorate_nonwritable"
OpName %5 "sampler"
OpName %8 "__spirv_BuiltInGlobalInvocationId"
OpName %9 "__spirv_BuiltInGlobalSize"
OpName %16 "dst"
OpName %17 "src"
OpName %18 "entry"
OpName %20 "call"
OpName %22 "call1"
OpName %24 "call2"
OpName %25 "mul"
OpName %26 "add"
OpName %29 "vecinit"
OpName %30 "vecinit6"
OpName %34 "TempSampledImage"
OpName %35 "call7.old"
OpName %38 "arrayidx"
OpDecorate %17 NonWritable
OpDecorate %39 Constant
%39 = OpDecorationGroup
OpDecorate %8 BuiltIn GlobalInvocationId
OpDecorate %9 BuiltIn GlobalSize
OpDecorate %16 FuncParamAttr NoCapture
OpDecorate %5 LinkageAttributes "sampler" Export
OpDecorate %9 LinkageAttributes "__spirv_BuiltInGlobalSize" Import
OpDecorate %8 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
OpDecorate %5 Alignment 4
OpGroupDecorate %39 %5 %8 %9
%2 = OpTypeInt 32 0
%3 = OpConstant %2 16
%4 = OpTypePointer UniformConstant %2
%6 = OpTypeVector %2 3
%7 = OpTypePointer UniformConstant %6
%10 = OpTypeVoid
%11 = OpTypeVector %2 4
%12 = OpTypePointer CrossWorkgroup %11
%13 = OpTypeImage %10 2D 0 0 0 0 Unknown
%14 = OpTypeFunction %10 %12 %13
%27 = OpTypeVector %2 2
%31 = OpTypeSampler
%33 = OpTypeSampledImage %13
%36 = OpTypeFloat 32
%32 = OpConstantSampler %31 None 0 Nearest
%37 = OpConstant %36 0
%5 = OpVariable %4 UniformConstant %3
%8 = OpVariable %7 UniformConstant
%9 = OpVariable %7 UniformConstant
%15 = OpFunction %10 None %14
%16 = OpFunctionParameter %12
%17 = OpFunctionParameter %13
%18 = OpLabel
%28 = OpUndef %27
%19 = OpLoad %6 %8 Aligned 0
%20 = OpCompositeExtract %2 %19 0
%21 = OpLoad %6 %8 Aligned 0
%22 = OpCompositeExtract %2 %21 1
%23 = OpLoad %6 %9 Aligned 0
%24 = OpCompositeExtract %2 %23 0
%25 = OpIMul %2 %24 %22
%26 = OpIAdd %2 %25 %20
%29 = OpCompositeInsert %27 %22 %28 0
%30 = OpCompositeInsert %27 %20 %29 1
%34 = OpSampledImage %33 %17 %32
%35 = OpImageSampleExplicitLod %11 %34 %30 Lod %37
%38 = OpInBoundsPtrAccessChain %12 %16 %26
OpStore %38 %35 Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,88 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpCapability ImageBasic
OpCapability LiteralSampler
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %16 "decorate_nonwritable"
OpName %5 "sampler"
OpName %9 "__spirv_BuiltInGlobalInvocationId"
OpName %10 "__spirv_BuiltInGlobalSize"
OpName %17 "dst"
OpName %18 "src"
OpName %19 "entry"
OpName %21 "call"
OpName %22 "conv"
OpName %24 "call1"
OpName %25 "conv2"
OpName %26 "conv3"
OpName %28 "call4"
OpName %29 "mul"
OpName %30 "add"
OpName %33 "vecinit"
OpName %34 "vecinit10"
OpName %38 "TempSampledImage"
OpName %39 "call11.old"
OpName %43 "sext"
OpName %44 "idxprom"
OpName %45 "arrayidx"
OpDecorate %18 NonWritable
OpDecorate %46 Constant
%46 = OpDecorationGroup
OpDecorate %9 BuiltIn GlobalInvocationId
OpDecorate %10 BuiltIn GlobalSize
OpDecorate %17 FuncParamAttr NoCapture
OpDecorate %5 LinkageAttributes "sampler" Export
OpDecorate %10 LinkageAttributes "__spirv_BuiltInGlobalSize" Import
OpDecorate %9 LinkageAttributes "__spirv_BuiltInGlobalInvocationId" Import
OpDecorate %5 Alignment 4
OpGroupDecorate %46 %5 %9 %10
%2 = OpTypeInt 32 0
%6 = OpTypeInt 64 0
%3 = OpConstant %2 16
%42 = OpConstant %6 32
%4 = OpTypePointer UniformConstant %2
%7 = OpTypeVector %6 3
%8 = OpTypePointer UniformConstant %7
%11 = OpTypeVoid
%12 = OpTypeVector %2 4
%13 = OpTypePointer CrossWorkgroup %12
%14 = OpTypeImage %11 2D 0 0 0 0 Unknown
%15 = OpTypeFunction %11 %13 %14
%31 = OpTypeVector %2 2
%35 = OpTypeSampler
%37 = OpTypeSampledImage %14
%40 = OpTypeFloat 32
%36 = OpConstantSampler %35 None 0 Nearest
%41 = OpConstant %40 0
%5 = OpVariable %4 UniformConstant %3
%9 = OpVariable %8 UniformConstant
%10 = OpVariable %8 UniformConstant
%16 = OpFunction %11 None %15
%17 = OpFunctionParameter %13
%18 = OpFunctionParameter %14
%19 = OpLabel
%32 = OpUndef %31
%20 = OpLoad %7 %9 Aligned 0
%21 = OpCompositeExtract %6 %20 0
%22 = OpUConvert %2 %21
%23 = OpLoad %7 %9 Aligned 0
%24 = OpCompositeExtract %6 %23 1
%25 = OpUConvert %2 %24
%26 = OpSConvert %6 %25
%27 = OpLoad %7 %10 Aligned 0
%28 = OpCompositeExtract %6 %27 0
%29 = OpIMul %6 %26 %28
%30 = OpIAdd %6 %29 %21
%33 = OpCompositeInsert %31 %25 %32 0
%34 = OpCompositeInsert %31 %22 %33 1
%38 = OpSampledImage %37 %18 %36
%39 = OpImageSampleExplicitLod %12 %38 %34 Lod %41
%43 = OpShiftLeftLogical %6 %30 %42
%44 = OpShiftRightArithmetic %6 %43 %42
%45 = OpInBoundsPtrAccessChain %13 %17 %44
OpStore %45 %39 Aligned 16
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,39 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %func "decorate_restrict"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Restrict
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 32 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx = OpCompositeExtract %idx_t %idx3 0
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

View File

@@ -0,0 +1,43 @@
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
OpCapability Int64
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %func "decorate_restrict"
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %dec_group Restrict
%dec_group = OpDecorationGroup
OpDecorate %global_id BuiltIn GlobalInvocationId
OpDecorate %global_id Constant
OpDecorate %global_id LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %dec_group %res %lhs %rhs
%idx_t = OpTypeInt 64 0
%idx3_t = OpTypeVector %idx_t 3
%idx3_ptr_t = OpTypePointer UniformConstant %idx3_t
%void_t = OpTypeVoid
%int_t = OpTypeInt 32 0
%int_ptr_t = OpTypePointer CrossWorkgroup %int_t
%func_t = OpTypeFunction %void_t %int_ptr_t %int_ptr_t %int_ptr_t
%shift_val = OpConstant %idx_t 32
%global_id = OpVariable %idx3_ptr_t UniformConstant
%func = OpFunction %void_t None %func_t
%res = OpFunctionParameter %int_ptr_t
%lhs = OpFunctionParameter %int_ptr_t
%rhs = OpFunctionParameter %int_ptr_t
%entry = OpLabel
%idx3 = OpLoad %idx3_t %global_id Aligned 0
%idx_tmp = OpCompositeExtract %idx_t %idx3 0
%idx_shift = OpShiftLeftLogical %idx_t %idx_tmp %shift_val
%idx = OpShiftRightArithmetic %idx_t %idx_shift %shift_val
%lhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %lhs %idx
%lhs_val = OpLoad %int_t %lhs_curr Aligned 4
%rhs_curr = OpInBoundsPtrAccessChain %int_ptr_t %rhs %idx
%rhs_val = OpLoad %int_t %rhs_curr Aligned 4
%res_val = OpIAdd %int_t %lhs_val %rhs_val
%res_curr = OpInBoundsPtrAccessChain %int_ptr_t %res %idx
OpStore %res_curr %res_val Aligned 4
OpReturn
OpFunctionEnd

Some files were not shown because too many files have changed in this diff Show More