Merge branch 'one_type_type2'

This commit is contained in:
Andrzej Janik 2021-06-25 01:20:38 +02:00
commit 8ef6c3d8b6
44 changed files with 2633 additions and 3020 deletions

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %34
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -39,9 +41,11 @@
%12 = OpLoad %uint %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_uint %22
%14 = OpLoad %uint %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_uint %15
%41 = OpBitcast %_ptr_Generic_uchar %24
%42 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %41 %ulong_4
%22 = OpBitcast %_ptr_Generic_uint %42
%14 = OpLoad %uint %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %uint %6
%18 = OpLoad %uint %7

View file

@ -24,6 +24,7 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%uint_1 = OpConstant %uint 1
%uint_0 = OpConstant %uint 0
@ -49,9 +50,11 @@
%13 = OpLoad %uint %29 Aligned 4
OpStore %7 %13
%16 = OpLoad %ulong %5
%26 = OpIAdd %ulong %16 %ulong_4
%30 = OpConvertUToPtr %_ptr_Generic_uint %26
%15 = OpLoad %uint %30 Aligned 4
%30 = OpConvertUToPtr %_ptr_Generic_uint %16
%51 = OpBitcast %_ptr_Generic_uchar %30
%52 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %51 %ulong_4
%26 = OpBitcast %_ptr_Generic_uint %52
%15 = OpLoad %uint %26 Aligned 4
OpStore %8 %15
%17 = OpLoad %uint %7
%31 = OpBitcast %_ptr_Workgroup_uint %4
@ -69,8 +72,10 @@
OpStore %34 %22 Aligned 4
%23 = OpLoad %ulong %6
%24 = OpLoad %uint %8
%28 = OpIAdd %ulong %23 %ulong_4_0
%35 = OpConvertUToPtr %_ptr_Generic_uint %28
OpStore %35 %24 Aligned 4
%35 = OpConvertUToPtr %_ptr_Generic_uint %23
%56 = OpBitcast %_ptr_Generic_uchar %35
%57 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %56 %ulong_4_0
%28 = OpBitcast %_ptr_Generic_uint %57
OpStore %28 %24 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -28,6 +28,7 @@
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_4_0 = OpConstant %ulong 4
%37 = OpFunction %float None %46
%39 = OpFunctionParameter %_ptr_Workgroup_float
@ -54,9 +55,11 @@
%13 = OpLoad %float %29 Aligned 4
OpStore %7 %13
%16 = OpLoad %ulong %5
%26 = OpIAdd %ulong %16 %ulong_4
%30 = OpConvertUToPtr %_ptr_Generic_float %26
%15 = OpLoad %float %30 Aligned 4
%30 = OpConvertUToPtr %_ptr_Generic_float %16
%58 = OpBitcast %_ptr_Generic_uchar %30
%59 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %58 %ulong_4
%26 = OpBitcast %_ptr_Generic_float %59
%15 = OpLoad %float %26 Aligned 4
OpStore %8 %15
%17 = OpLoad %float %7
%31 = OpBitcast %_ptr_Workgroup_float %4
@ -74,8 +77,10 @@
OpStore %34 %22 Aligned 4
%23 = OpLoad %ulong %6
%24 = OpLoad %float %8
%28 = OpIAdd %ulong %23 %ulong_4_0
%35 = OpConvertUToPtr %_ptr_Generic_float %28
OpStore %35 %24 Aligned 4
%35 = OpConvertUToPtr %_ptr_Generic_float %23
%60 = OpBitcast %_ptr_Generic_uchar %35
%61 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %60 %ulong_4_0
%28 = OpBitcast %_ptr_Generic_float %61
OpStore %28 %24 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%uint_100 = OpConstant %uint 100
%uint_1 = OpConstant %uint 1
%uint_0 = OpConstant %uint 0
@ -45,16 +47,20 @@
OpStore %6 %12
%15 = OpLoad %ulong %4
%16 = OpLoad %uint %6
%24 = OpIAdd %ulong %15 %ulong_4
%32 = OpConvertUToPtr %_ptr_Generic_uint %24
%31 = OpConvertUToPtr %_ptr_Generic_uint %15
%49 = OpBitcast %_ptr_Generic_uchar %31
%50 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %49 %ulong_4
%24 = OpBitcast %_ptr_Generic_uint %50
%33 = OpCopyObject %uint %16
%31 = OpAtomicCompareExchange %uint %32 %uint_1 %uint_0 %uint_0 %uint_100 %33
%14 = OpCopyObject %uint %31
%32 = OpAtomicCompareExchange %uint %24 %uint_1 %uint_0 %uint_0 %uint_100 %33
%14 = OpCopyObject %uint %32
OpStore %6 %14
%18 = OpLoad %ulong %4
%27 = OpIAdd %ulong %18 %ulong_4_0
%34 = OpConvertUToPtr %_ptr_Generic_uint %27
%17 = OpLoad %uint %34 Aligned 4
%34 = OpConvertUToPtr %_ptr_Generic_uint %18
%53 = OpBitcast %_ptr_Generic_uchar %34
%54 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %53 %ulong_4_0
%27 = OpBitcast %_ptr_Generic_uint %54
%17 = OpLoad %uint %27 Aligned 4
OpStore %7 %17
%19 = OpLoad %ulong %5
%20 = OpLoad %uint %6
@ -62,8 +68,10 @@
OpStore %35 %20 Aligned 4
%21 = OpLoad %ulong %5
%22 = OpLoad %uint %7
%29 = OpIAdd %ulong %21 %ulong_4_1
%36 = OpConvertUToPtr %_ptr_Generic_uint %29
OpStore %36 %22 Aligned 4
%36 = OpConvertUToPtr %_ptr_Generic_uint %21
%55 = OpBitcast %_ptr_Generic_uchar %36
%56 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %55 %ulong_4_1
%29 = OpBitcast %_ptr_Generic_uint %56
OpStore %29 %22 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -10,14 +10,14 @@
%47 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "atom_inc"
OpDecorate %42 LinkageAttributes "__zluda_ptx_impl__atom_relaxed_gpu_global_inc" Import
OpDecorate %38 LinkageAttributes "__zluda_ptx_impl__atom_relaxed_gpu_generic_inc" Import
OpDecorate %42 LinkageAttributes "__zluda_ptx_impl__atom_relaxed_gpu_global_inc" Import
%void = OpTypeVoid
%uint = OpTypeInt 32 0
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%51 = OpTypeFunction %uint %_ptr_CrossWorkgroup_uint %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%53 = OpTypeFunction %uint %_ptr_Generic_uint %uint
%51 = OpTypeFunction %uint %_ptr_Generic_uint %uint
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%53 = OpTypeFunction %uint %_ptr_CrossWorkgroup_uint %uint
%ulong = OpTypeInt 64 0
%55 = OpTypeFunction %void %ulong %ulong
%_ptr_Function_ulong = OpTypePointer Function %ulong
@ -25,15 +25,17 @@
%uint_101 = OpConstant %uint 101
%uint_101_0 = OpConstant %uint 101
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_8 = OpConstant %ulong 8
%42 = OpFunction %uint None %51
%44 = OpFunctionParameter %_ptr_CrossWorkgroup_uint
%45 = OpFunctionParameter %uint
OpFunctionEnd
%38 = OpFunction %uint None %53
%38 = OpFunction %uint None %51
%40 = OpFunctionParameter %_ptr_Generic_uint
%41 = OpFunctionParameter %uint
OpFunctionEnd
%42 = OpFunction %uint None %53
%44 = OpFunctionParameter %_ptr_CrossWorkgroup_uint
%45 = OpFunctionParameter %uint
OpFunctionEnd
%1 = OpFunction %void None %55
%9 = OpFunctionParameter %ulong
%10 = OpFunctionParameter %ulong
@ -69,13 +71,17 @@
OpStore %34 %20 Aligned 4
%21 = OpLoad %ulong %5
%22 = OpLoad %uint %7
%28 = OpIAdd %ulong %21 %ulong_4
%35 = OpConvertUToPtr %_ptr_Generic_uint %28
OpStore %35 %22 Aligned 4
%35 = OpConvertUToPtr %_ptr_Generic_uint %21
%60 = OpBitcast %_ptr_Generic_uchar %35
%61 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %60 %ulong_4
%28 = OpBitcast %_ptr_Generic_uint %61
OpStore %28 %22 Aligned 4
%23 = OpLoad %ulong %5
%24 = OpLoad %uint %8
%30 = OpIAdd %ulong %23 %ulong_8
%36 = OpConvertUToPtr %_ptr_Generic_uint %30
OpStore %36 %24 Aligned 4
%36 = OpConvertUToPtr %_ptr_Generic_uint %23
%62 = OpBitcast %_ptr_Generic_uchar %36
%63 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %62 %ulong_8
%30 = OpBitcast %_ptr_Generic_uint %63
OpStore %30 %24 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -20,6 +20,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_8 = OpConstant %ulong 8
%34 = OpFunction %uint None %43
%36 = OpFunctionParameter %uint
@ -48,14 +50,18 @@
%13 = OpLoad %uint %29 Aligned 4
OpStore %6 %13
%16 = OpLoad %ulong %4
%26 = OpIAdd %ulong %16 %ulong_4
%30 = OpConvertUToPtr %_ptr_Generic_uint %26
%15 = OpLoad %uint %30 Aligned 4
%30 = OpConvertUToPtr %_ptr_Generic_uint %16
%51 = OpBitcast %_ptr_Generic_uchar %30
%52 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %51 %ulong_4
%26 = OpBitcast %_ptr_Generic_uint %52
%15 = OpLoad %uint %26 Aligned 4
OpStore %7 %15
%18 = OpLoad %ulong %4
%28 = OpIAdd %ulong %18 %ulong_8
%31 = OpConvertUToPtr %_ptr_Generic_uint %28
%17 = OpLoad %uint %31 Aligned 4
%31 = OpConvertUToPtr %_ptr_Generic_uint %18
%53 = OpBitcast %_ptr_Generic_uchar %31
%54 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %53 %ulong_8
%28 = OpBitcast %_ptr_Generic_uint %54
%17 = OpLoad %uint %28 Aligned 4
OpStore %8 %17
%20 = OpLoad %uint %6
%21 = OpLoad %uint %7

View file

@ -20,6 +20,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_8 = OpConstant %ulong 8
%ulong_12 = OpConstant %ulong 12
%44 = OpFunction %uint None %54
@ -51,19 +53,25 @@
%14 = OpLoad %uint %35 Aligned 4
OpStore %6 %14
%17 = OpLoad %ulong %4
%30 = OpIAdd %ulong %17 %ulong_4
%36 = OpConvertUToPtr %_ptr_Generic_uint %30
%16 = OpLoad %uint %36 Aligned 4
%36 = OpConvertUToPtr %_ptr_Generic_uint %17
%62 = OpBitcast %_ptr_Generic_uchar %36
%63 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %62 %ulong_4
%30 = OpBitcast %_ptr_Generic_uint %63
%16 = OpLoad %uint %30 Aligned 4
OpStore %7 %16
%19 = OpLoad %ulong %4
%32 = OpIAdd %ulong %19 %ulong_8
%37 = OpConvertUToPtr %_ptr_Generic_uint %32
%18 = OpLoad %uint %37 Aligned 4
%37 = OpConvertUToPtr %_ptr_Generic_uint %19
%64 = OpBitcast %_ptr_Generic_uchar %37
%65 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %64 %ulong_8
%32 = OpBitcast %_ptr_Generic_uint %65
%18 = OpLoad %uint %32 Aligned 4
OpStore %8 %18
%21 = OpLoad %ulong %4
%34 = OpIAdd %ulong %21 %ulong_12
%38 = OpConvertUToPtr %_ptr_Generic_uint %34
%20 = OpLoad %uint %38 Aligned 4
%38 = OpConvertUToPtr %_ptr_Generic_uint %21
%66 = OpBitcast %_ptr_Generic_uchar %38
%67 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %66 %ulong_12
%34 = OpBitcast %_ptr_Generic_uint %67
%20 = OpLoad %uint %34 Aligned 4
OpStore %9 %20
%23 = OpLoad %uint %6
%24 = OpLoad %uint %7
@ -71,7 +79,7 @@
%26 = OpLoad %uint %9
%40 = OpCopyObject %uint %23
%41 = OpCopyObject %uint %24
%39 = OpFunctionCall %uint %44 %41 %40 %25 %26
%39 = OpFunctionCall %uint %44 %40 %41 %25 %26
%22 = OpCopyObject %uint %39
OpStore %6 %22
%27 = OpLoad %ulong %5

View file

@ -42,7 +42,7 @@
%23 = OpBitcast %_ptr_Function_ulong %10
%24 = OpCopyObject %ulong %18
OpStore %23 %24 Aligned 8
%43 = OpFunctionCall %void %1 %11 %10
%43 = OpFunctionCall %void %1 %10 %11
%19 = OpLoad %ulong %11 Aligned 8
OpStore %9 %19
%20 = OpLoad %ulong %8
@ -52,8 +52,8 @@
OpReturn
OpFunctionEnd
%1 = OpFunction %void None %44
%27 = OpFunctionParameter %_ptr_Function_ulong
%28 = OpFunctionParameter %_ptr_Function_ulong
%27 = OpFunctionParameter %_ptr_Function_ulong
%35 = OpLabel
%29 = OpVariable %_ptr_Function_ulong Function
%30 = OpLoad %ulong %28 Aligned 8

View file

@ -18,6 +18,8 @@
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_4_0 = OpConstant %ulong 4
%1 = OpFunction %void None %37
%8 = OpFunctionParameter %ulong
@ -40,9 +42,11 @@
%12 = OpLoad %float %28 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%25 = OpIAdd %ulong %15 %ulong_4
%29 = OpConvertUToPtr %_ptr_Generic_float %25
%14 = OpLoad %float %29 Aligned 4
%29 = OpConvertUToPtr %_ptr_Generic_float %15
%44 = OpBitcast %_ptr_Generic_uchar %29
%45 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %44 %ulong_4
%25 = OpBitcast %_ptr_Generic_float %45
%14 = OpLoad %float %25 Aligned 4
OpStore %7 %14
%17 = OpLoad %float %6
%16 = OpExtInst %float %34 rint %17
@ -56,8 +60,10 @@
OpStore %30 %21 Aligned 4
%22 = OpLoad %ulong %5
%23 = OpLoad %float %7
%27 = OpIAdd %ulong %22 %ulong_4_0
%31 = OpConvertUToPtr %_ptr_Generic_float %27
OpStore %31 %23 Aligned 4
%31 = OpConvertUToPtr %_ptr_Generic_float %22
%46 = OpBitcast %_ptr_Generic_uchar %31
%47 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %46 %ulong_4_0
%27 = OpBitcast %_ptr_Generic_float %47
OpStore %27 %23 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -18,6 +18,8 @@
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_4_0 = OpConstant %ulong 4
%1 = OpFunction %void None %37
%8 = OpFunctionParameter %ulong
@ -40,9 +42,11 @@
%12 = OpLoad %float %28 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%25 = OpIAdd %ulong %15 %ulong_4
%29 = OpConvertUToPtr %_ptr_Generic_float %25
%14 = OpLoad %float %29 Aligned 4
%29 = OpConvertUToPtr %_ptr_Generic_float %15
%44 = OpBitcast %_ptr_Generic_uchar %29
%45 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %44 %ulong_4
%25 = OpBitcast %_ptr_Generic_float %45
%14 = OpLoad %float %25 Aligned 4
OpStore %7 %14
%17 = OpLoad %float %6
%16 = OpExtInst %float %34 trunc %17
@ -56,8 +60,10 @@
OpStore %30 %21 Aligned 4
%22 = OpLoad %ulong %5
%23 = OpLoad %float %7
%27 = OpIAdd %ulong %22 %ulong_4_0
%31 = OpConvertUToPtr %_ptr_Generic_float %27
OpStore %31 %23 Aligned 4
%31 = OpConvertUToPtr %_ptr_Generic_float %22
%46 = OpBitcast %_ptr_Generic_uchar %31
%47 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %46 %ulong_4_0
%27 = OpBitcast %_ptr_Generic_float %47
OpStore %27 %23 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -21,8 +21,11 @@
%float = OpTypeFloat 32
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%ulong_4_0 = OpConstant %ulong 4
%_ptr_CrossWorkgroup_uchar = OpTypePointer CrossWorkgroup %uchar
%1 = OpFunction %void None %45
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -45,10 +48,12 @@
%12 = OpBitcast %uint %28
OpStore %6 %12
%15 = OpLoad %ulong %4
%25 = OpIAdd %ulong %15 %ulong_4
%31 = OpConvertUToPtr %_ptr_Generic_float %25
%30 = OpLoad %float %31 Aligned 4
%14 = OpBitcast %uint %30
%30 = OpConvertUToPtr %_ptr_Generic_float %15
%53 = OpBitcast %_ptr_Generic_uchar %30
%54 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %53 %ulong_4
%25 = OpBitcast %_ptr_Generic_float %54
%31 = OpLoad %float %25 Aligned 4
%14 = OpBitcast %uint %31
OpStore %7 %14
%17 = OpLoad %uint %6
%33 = OpBitcast %float %17
@ -67,9 +72,11 @@
OpStore %36 %37 Aligned 4
%22 = OpLoad %ulong %5
%23 = OpLoad %uint %7
%27 = OpIAdd %ulong %22 %ulong_4_0
%38 = OpConvertUToPtr %_ptr_CrossWorkgroup_uint %27
%38 = OpConvertUToPtr %_ptr_CrossWorkgroup_uint %22
%57 = OpBitcast %_ptr_CrossWorkgroup_uchar %38
%58 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %57 %ulong_4_0
%27 = OpBitcast %_ptr_CrossWorkgroup_uint %58
%39 = OpCopyObject %uint %23
OpStore %38 %39 Aligned 4
OpStore %27 %39 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -19,6 +19,8 @@
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %31
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -40,9 +42,11 @@
%12 = OpLoad %float %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_float %22
%14 = OpLoad %float %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_float %15
%38 = OpBitcast %_ptr_Generic_uchar %24
%39 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %38 %ulong_4
%22 = OpBitcast %_ptr_Generic_float %39
%14 = OpLoad %float %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %float %6
%18 = OpLoad %float %7

View file

@ -7,37 +7,30 @@
OpCapability Int64
OpCapability Float16
OpCapability Float64
%30 = OpExtInstImport "OpenCL.std"
%27 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %2 "extern_shared" %1
%void = OpTypeVoid
%uint = OpTypeInt 32 0
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%_ptr_Workgroup__ptr_Workgroup_uint = OpTypePointer Workgroup %_ptr_Workgroup_uint
%1 = OpVariable %_ptr_Workgroup__ptr_Workgroup_uint Workgroup
%1 = OpVariable %_ptr_Workgroup_uint Workgroup
%ulong = OpTypeInt 64 0
%uchar = OpTypeInt 8 0
%_ptr_Workgroup_uchar = OpTypePointer Workgroup %uchar
%38 = OpTypeFunction %void %ulong %ulong %_ptr_Workgroup_uchar
%_ptr_Function__ptr_Workgroup_uchar = OpTypePointer Function %_ptr_Workgroup_uchar
%34 = OpTypeFunction %void %ulong %ulong %_ptr_Workgroup_uchar
%_ptr_Function_ulong = OpTypePointer Function %ulong
%_ptr_CrossWorkgroup_ulong = OpTypePointer CrossWorkgroup %ulong
%_ptr_Function__ptr_Workgroup_uint = OpTypePointer Function %_ptr_Workgroup_uint
%_ptr_Workgroup_ulong = OpTypePointer Workgroup %ulong
%2 = OpFunction %void None %38
%2 = OpFunction %void None %34
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
%26 = OpFunctionParameter %_ptr_Workgroup_uchar
%39 = OpLabel
%27 = OpVariable %_ptr_Function__ptr_Workgroup_uchar Function
%24 = OpFunctionParameter %_ptr_Workgroup_uchar
%22 = OpLabel
%3 = OpVariable %_ptr_Function_ulong Function
%4 = OpVariable %_ptr_Function_ulong Function
%5 = OpVariable %_ptr_Function_ulong Function
%6 = OpVariable %_ptr_Function_ulong Function
%7 = OpVariable %_ptr_Function_ulong Function
OpStore %27 %26
OpBranch %24
%24 = OpLabel
OpStore %3 %8
OpStore %4 %9
%10 = OpLoad %ulong %3 Aligned 8
@ -45,22 +38,20 @@
%11 = OpLoad %ulong %4 Aligned 8
OpStore %6 %11
%13 = OpLoad %ulong %5
%20 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %13
%12 = OpLoad %ulong %20 Aligned 8
%18 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %13
%12 = OpLoad %ulong %18 Aligned 8
OpStore %7 %12
%28 = OpBitcast %_ptr_Function__ptr_Workgroup_uint %27
%14 = OpLoad %_ptr_Workgroup_uint %28
%15 = OpLoad %ulong %7
%21 = OpBitcast %_ptr_Workgroup_ulong %14
OpStore %21 %15 Aligned 8
%29 = OpBitcast %_ptr_Function__ptr_Workgroup_uint %27
%17 = OpLoad %_ptr_Workgroup_uint %29
%22 = OpBitcast %_ptr_Workgroup_ulong %17
%16 = OpLoad %ulong %22 Aligned 8
OpStore %7 %16
%18 = OpLoad %ulong %6
%19 = OpLoad %ulong %7
%23 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %18
OpStore %23 %19 Aligned 8
%14 = OpLoad %ulong %7
%25 = OpBitcast %_ptr_Workgroup_uint %24
%19 = OpBitcast %_ptr_Workgroup_ulong %25
OpStore %19 %14 Aligned 8
%26 = OpBitcast %_ptr_Workgroup_uint %24
%20 = OpBitcast %_ptr_Workgroup_ulong %26
%15 = OpLoad %ulong %20 Aligned 8
OpStore %7 %15
%16 = OpLoad %ulong %6
%17 = OpLoad %ulong %7
%21 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %16
OpStore %21 %17 Aligned 8
OpReturn
OpFunctionEnd

View file

@ -7,87 +7,72 @@
OpCapability Int64
OpCapability Float16
OpCapability Float64
%46 = OpExtInstImport "OpenCL.std"
%40 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %14 "extern_shared_call" %1
OpEntryPoint Kernel %12 "extern_shared_call" %1
OpDecorate %1 Alignment 4
%void = OpTypeVoid
%uint = OpTypeInt 32 0
%_ptr_Workgroup_uint = OpTypePointer Workgroup %uint
%_ptr_Workgroup__ptr_Workgroup_uint = OpTypePointer Workgroup %_ptr_Workgroup_uint
%1 = OpVariable %_ptr_Workgroup__ptr_Workgroup_uint Workgroup
%1 = OpVariable %_ptr_Workgroup_uint Workgroup
%uchar = OpTypeInt 8 0
%_ptr_Workgroup_uchar = OpTypePointer Workgroup %uchar
%53 = OpTypeFunction %void %_ptr_Workgroup_uchar
%_ptr_Function__ptr_Workgroup_uchar = OpTypePointer Function %_ptr_Workgroup_uchar
%46 = OpTypeFunction %void %_ptr_Workgroup_uchar
%ulong = OpTypeInt 64 0
%_ptr_Function_ulong = OpTypePointer Function %ulong
%_ptr_Function__ptr_Workgroup_uint = OpTypePointer Function %_ptr_Workgroup_uint
%_ptr_Workgroup_ulong = OpTypePointer Workgroup %ulong
%ulong_2 = OpConstant %ulong 2
%60 = OpTypeFunction %void %ulong %ulong %_ptr_Workgroup_uchar
%50 = OpTypeFunction %void %ulong %ulong %_ptr_Workgroup_uchar
%_ptr_CrossWorkgroup_ulong = OpTypePointer CrossWorkgroup %ulong
%2 = OpFunction %void None %53
%38 = OpFunctionParameter %_ptr_Workgroup_uchar
%54 = OpLabel
%39 = OpVariable %_ptr_Function__ptr_Workgroup_uchar Function
%2 = OpFunction %void None %46
%34 = OpFunctionParameter %_ptr_Workgroup_uchar
%11 = OpLabel
%3 = OpVariable %_ptr_Function_ulong Function
OpStore %39 %38
OpBranch %13
%13 = OpLabel
%40 = OpBitcast %_ptr_Function__ptr_Workgroup_uint %39
%5 = OpLoad %_ptr_Workgroup_uint %40
%11 = OpBitcast %_ptr_Workgroup_ulong %5
%4 = OpLoad %ulong %11 Aligned 8
%35 = OpBitcast %_ptr_Workgroup_uint %34
%9 = OpBitcast %_ptr_Workgroup_ulong %35
%4 = OpLoad %ulong %9 Aligned 8
OpStore %3 %4
%6 = OpLoad %ulong %3
%5 = OpIAdd %ulong %6 %ulong_2
OpStore %3 %5
%7 = OpLoad %ulong %3
%6 = OpIAdd %ulong %7 %ulong_2
OpStore %3 %6
%41 = OpBitcast %_ptr_Function__ptr_Workgroup_uint %39
%8 = OpLoad %_ptr_Workgroup_uint %41
%9 = OpLoad %ulong %3
%12 = OpBitcast %_ptr_Workgroup_ulong %8
OpStore %12 %9 Aligned 8
%36 = OpBitcast %_ptr_Workgroup_uint %34
%10 = OpBitcast %_ptr_Workgroup_ulong %36
OpStore %10 %7 Aligned 8
OpReturn
OpFunctionEnd
%14 = OpFunction %void None %60
%20 = OpFunctionParameter %ulong
%21 = OpFunctionParameter %ulong
%42 = OpFunctionParameter %_ptr_Workgroup_uchar
%61 = OpLabel
%43 = OpVariable %_ptr_Function__ptr_Workgroup_uchar Function
%12 = OpFunction %void None %50
%18 = OpFunctionParameter %ulong
%19 = OpFunctionParameter %ulong
%37 = OpFunctionParameter %_ptr_Workgroup_uchar
%32 = OpLabel
%13 = OpVariable %_ptr_Function_ulong Function
%14 = OpVariable %_ptr_Function_ulong Function
%15 = OpVariable %_ptr_Function_ulong Function
%16 = OpVariable %_ptr_Function_ulong Function
%17 = OpVariable %_ptr_Function_ulong Function
%18 = OpVariable %_ptr_Function_ulong Function
%19 = OpVariable %_ptr_Function_ulong Function
OpStore %43 %42
OpBranch %36
%36 = OpLabel
OpStore %13 %18
OpStore %14 %19
%20 = OpLoad %ulong %13 Aligned 8
OpStore %15 %20
%21 = OpLoad %ulong %14 Aligned 8
OpStore %16 %21
%22 = OpLoad %ulong %15 Aligned 8
%23 = OpLoad %ulong %15
%28 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %23
%22 = OpLoad %ulong %28 Aligned 8
OpStore %17 %22
%23 = OpLoad %ulong %16 Aligned 8
OpStore %18 %23
%25 = OpLoad %ulong %17
%32 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %25
%24 = OpLoad %ulong %32 Aligned 8
OpStore %19 %24
%44 = OpBitcast %_ptr_Function__ptr_Workgroup_uint %43
%26 = OpLoad %_ptr_Workgroup_uint %44
%27 = OpLoad %ulong %19
%33 = OpBitcast %_ptr_Workgroup_ulong %26
OpStore %33 %27 Aligned 8
%63 = OpFunctionCall %void %2 %42
%45 = OpBitcast %_ptr_Function__ptr_Workgroup_uint %43
%29 = OpLoad %_ptr_Workgroup_uint %45
%34 = OpBitcast %_ptr_Workgroup_ulong %29
%28 = OpLoad %ulong %34 Aligned 8
OpStore %19 %28
%30 = OpLoad %ulong %18
%31 = OpLoad %ulong %19
%35 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %30
OpStore %35 %31 Aligned 8
%24 = OpLoad %ulong %17
%38 = OpBitcast %_ptr_Workgroup_uint %37
%29 = OpBitcast %_ptr_Workgroup_ulong %38
OpStore %29 %24 Aligned 8
%52 = OpFunctionCall %void %2 %37
%39 = OpBitcast %_ptr_Workgroup_uint %37
%30 = OpBitcast %_ptr_Workgroup_ulong %39
%25 = OpLoad %ulong %30 Aligned 8
OpStore %17 %25
%26 = OpLoad %ulong %16
%27 = OpLoad %ulong %17
%31 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %26
OpStore %31 %27 Aligned 8
OpReturn
OpFunctionEnd

View file

@ -18,6 +18,8 @@
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_8 = OpConstant %ulong 8
%1 = OpFunction %void None %38
%9 = OpFunctionParameter %ulong
@ -41,14 +43,18 @@
%13 = OpLoad %float %29 Aligned 4
OpStore %6 %13
%16 = OpLoad %ulong %4
%26 = OpIAdd %ulong %16 %ulong_4
%30 = OpConvertUToPtr %_ptr_Generic_float %26
%15 = OpLoad %float %30 Aligned 4
%30 = OpConvertUToPtr %_ptr_Generic_float %16
%45 = OpBitcast %_ptr_Generic_uchar %30
%46 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %45 %ulong_4
%26 = OpBitcast %_ptr_Generic_float %46
%15 = OpLoad %float %26 Aligned 4
OpStore %7 %15
%18 = OpLoad %ulong %4
%28 = OpIAdd %ulong %18 %ulong_8
%31 = OpConvertUToPtr %_ptr_Generic_float %28
%17 = OpLoad %float %31 Aligned 4
%31 = OpConvertUToPtr %_ptr_Generic_float %18
%47 = OpBitcast %_ptr_Generic_uchar %31
%48 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %47 %ulong_8
%28 = OpBitcast %_ptr_Generic_float %48
%17 = OpLoad %float %28 Aligned 4
OpStore %8 %17
%20 = OpLoad %float %6
%21 = OpLoad %float %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_4_0 = OpConstant %ulong 4
%1 = OpFunction %void None %33
%8 = OpFunctionParameter %ulong
@ -40,9 +42,11 @@
%12 = OpLoad %uint %24 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%21 = OpIAdd %ulong %15 %ulong_4
%25 = OpConvertUToPtr %_ptr_Generic_uint %21
%14 = OpLoad %uint %25 Aligned 4
%25 = OpConvertUToPtr %_ptr_Generic_uint %15
%40 = OpBitcast %_ptr_Generic_uchar %25
%41 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %40 %ulong_4
%21 = OpBitcast %_ptr_Generic_uint %41
%14 = OpLoad %uint %21 Aligned 4
OpStore %7 %14
%16 = OpLoad %ulong %5
%17 = OpLoad %uint %7
@ -50,8 +54,10 @@
OpStore %26 %17 Aligned 4
%18 = OpLoad %ulong %5
%19 = OpLoad %uint %6
%23 = OpIAdd %ulong %18 %ulong_4_0
%27 = OpConvertUToPtr %_ptr_Generic_uint %23
OpStore %27 %19 Aligned 4
%27 = OpConvertUToPtr %_ptr_Generic_uint %18
%42 = OpBitcast %_ptr_Generic_uchar %27
%43 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %42 %ulong_4_0
%23 = OpBitcast %_ptr_Generic_uint %43
OpStore %23 %19 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_8 = OpConstant %ulong 8
%ulong_4_0 = OpConstant %ulong 4
%ulong_8_0 = OpConstant %ulong 8
@ -44,20 +46,24 @@
%14 = OpLoad %uint %38 Aligned 4
OpStore %7 %14
%17 = OpLoad %ulong %4
%31 = OpIAdd %ulong %17 %ulong_4
%39 = OpConvertUToPtr %_ptr_Generic_uint %31
%16 = OpLoad %uint %39 Aligned 4
%39 = OpConvertUToPtr %_ptr_Generic_uint %17
%56 = OpBitcast %_ptr_Generic_uchar %39
%57 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %56 %ulong_4
%31 = OpBitcast %_ptr_Generic_uint %57
%16 = OpLoad %uint %31 Aligned 4
OpStore %8 %16
%19 = OpLoad %ulong %4
%33 = OpIAdd %ulong %19 %ulong_8
%40 = OpConvertUToPtr %_ptr_Generic_uint %33
%18 = OpLoad %uint %40 Aligned 4
%40 = OpConvertUToPtr %_ptr_Generic_uint %19
%58 = OpBitcast %_ptr_Generic_uchar %40
%59 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %58 %ulong_8
%33 = OpBitcast %_ptr_Generic_uint %59
%18 = OpLoad %uint %33 Aligned 4
OpStore %9 %18
%21 = OpLoad %uint %7
%22 = OpLoad %uint %8
%23 = OpLoad %uint %9
%54 = OpIMul %uint %21 %22
%20 = OpIAdd %uint %23 %54
%60 = OpIMul %uint %21 %22
%20 = OpIAdd %uint %23 %60
OpStore %6 %20
%24 = OpLoad %ulong %5
%25 = OpLoad %uint %6
@ -65,13 +71,17 @@
OpStore %41 %25 Aligned 4
%26 = OpLoad %ulong %5
%27 = OpLoad %uint %6
%35 = OpIAdd %ulong %26 %ulong_4_0
%42 = OpConvertUToPtr %_ptr_Generic_uint %35
OpStore %42 %27 Aligned 4
%42 = OpConvertUToPtr %_ptr_Generic_uint %26
%61 = OpBitcast %_ptr_Generic_uchar %42
%62 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %61 %ulong_4_0
%35 = OpBitcast %_ptr_Generic_uint %62
OpStore %35 %27 Aligned 4
%28 = OpLoad %ulong %5
%29 = OpLoad %uint %6
%37 = OpIAdd %ulong %28 %ulong_8_0
%43 = OpConvertUToPtr %_ptr_Generic_uint %37
OpStore %43 %29 Aligned 4
%43 = OpConvertUToPtr %_ptr_Generic_uint %28
%63 = OpBitcast %_ptr_Generic_uchar %43
%64 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %63 %ulong_8_0
%37 = OpBitcast %_ptr_Generic_uint %64
OpStore %37 %29 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %31
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -39,9 +41,11 @@
%12 = OpLoad %uint %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_uint %22
%14 = OpLoad %uint %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_uint %15
%38 = OpBitcast %_ptr_Generic_uchar %24
%39 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %38 %ulong_4
%22 = OpBitcast %_ptr_Generic_uint %39
%14 = OpLoad %uint %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %uint %6
%18 = OpLoad %uint %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %31
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -39,9 +41,11 @@
%12 = OpLoad %uint %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_uint %22
%14 = OpLoad %uint %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_uint %15
%38 = OpBitcast %_ptr_Generic_uchar %24
%39 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %38 %ulong_4
%22 = OpBitcast %_ptr_Generic_uint %39
%14 = OpLoad %uint %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %uint %6
%18 = OpLoad %uint %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %31
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -39,9 +41,11 @@
%12 = OpLoad %float %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_float %22
%14 = OpLoad %float %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_float %15
%38 = OpBitcast %_ptr_Generic_uchar %24
%39 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %38 %ulong_4
%22 = OpBitcast %_ptr_Generic_float %39
%14 = OpLoad %float %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %float %6
%18 = OpLoad %float %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_float = OpTypePointer Function %float
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %31
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -39,9 +41,11 @@
%12 = OpLoad %float %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_float %22
%14 = OpLoad %float %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_float %15
%38 = OpBitcast %_ptr_Generic_uchar %24
%39 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %38 %ulong_4
%22 = OpBitcast %_ptr_Generic_float %39
%14 = OpLoad %float %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %float %6
%18 = OpLoad %float %7

View file

@ -18,7 +18,9 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_CrossWorkgroup_uint = OpTypePointer CrossWorkgroup %uint
%ulong_4 = OpConstant %ulong 4
%_struct_38 = OpTypeStruct %uint %uint
%uchar = OpTypeInt 8 0
%_ptr_CrossWorkgroup_uchar = OpTypePointer CrossWorkgroup %uchar
%_struct_42 = OpTypeStruct %uint %uint
%v2uint = OpTypeVector %uint 2
%_ptr_Generic_ulong = OpTypePointer Generic %ulong
%1 = OpFunction %void None %33
@ -43,17 +45,19 @@
%13 = OpLoad %uint %24 Aligned 4
OpStore %6 %13
%16 = OpLoad %ulong %4
%23 = OpIAdd %ulong %16 %ulong_4
%25 = OpConvertUToPtr %_ptr_CrossWorkgroup_uint %23
%15 = OpLoad %uint %25 Aligned 4
%25 = OpConvertUToPtr %_ptr_CrossWorkgroup_uint %16
%40 = OpBitcast %_ptr_CrossWorkgroup_uchar %25
%41 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %40 %ulong_4
%23 = OpBitcast %_ptr_CrossWorkgroup_uint %41
%15 = OpLoad %uint %23 Aligned 4
OpStore %7 %15
%18 = OpLoad %uint %6
%19 = OpLoad %uint %7
%39 = OpSMulExtended %_struct_38 %18 %19
%40 = OpCompositeExtract %uint %39 0
%41 = OpCompositeExtract %uint %39 1
%43 = OpCompositeConstruct %v2uint %40 %41
%17 = OpBitcast %ulong %43
%43 = OpSMulExtended %_struct_42 %18 %19
%44 = OpCompositeExtract %uint %43 0
%45 = OpCompositeExtract %uint %43 1
%47 = OpCompositeConstruct %v2uint %44 %45
%17 = OpBitcast %ulong %47
OpStore %8 %17
%20 = OpLoad %ulong %5
%21 = OpLoad %ulong %8

View file

@ -16,6 +16,8 @@
%_ptr_Function_ulong = OpTypePointer Function %ulong
%_ptr_Generic_ulong = OpTypePointer Generic %ulong
%ulong_8 = OpConstant %ulong 8
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %34
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -37,9 +39,11 @@
%12 = OpLoad %ulong %23 Aligned 8
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_8
%24 = OpConvertUToPtr %_ptr_Generic_ulong %22
%14 = OpLoad %ulong %24 Aligned 8
%24 = OpConvertUToPtr %_ptr_Generic_ulong %15
%39 = OpBitcast %_ptr_Generic_uchar %24
%40 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %39 %ulong_8
%22 = OpBitcast %_ptr_Generic_ulong %40
%14 = OpLoad %ulong %22 Aligned 8
OpStore %7 %14
%17 = OpLoad %ulong %6
%18 = OpLoad %ulong %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_bool = OpTypePointer Function %bool
%_ptr_Generic_ulong = OpTypePointer Generic %ulong
%ulong_8 = OpConstant %ulong 8
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%true = OpConstantTrue %bool
%false = OpConstantFalse %bool
%ulong_1 = OpConstant %ulong 1
@ -45,9 +47,11 @@
%18 = OpLoad %ulong %37 Aligned 8
OpStore %6 %18
%21 = OpLoad %ulong %4
%34 = OpIAdd %ulong %21 %ulong_8
%38 = OpConvertUToPtr %_ptr_Generic_ulong %34
%20 = OpLoad %ulong %38 Aligned 8
%38 = OpConvertUToPtr %_ptr_Generic_ulong %21
%52 = OpBitcast %_ptr_Generic_uchar %38
%53 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %52 %ulong_8
%34 = OpBitcast %_ptr_Generic_ulong %53
%20 = OpLoad %ulong %34 Aligned 8
OpStore %7 %20
%23 = OpLoad %ulong %6
%24 = OpLoad %ulong %7

View file

@ -26,6 +26,7 @@
%ulong_0 = OpConstant %ulong 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_0_0 = OpConstant %ulong 0
%_ptr_CrossWorkgroup_uchar = OpTypePointer CrossWorkgroup %uchar
%1 = OpFunction %void None %37
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -48,10 +49,10 @@
%12 = OpCopyObject %ulong %24
OpStore %7 %12
%14 = OpLoad %ulong %7
%26 = OpCopyObject %ulong %14
%19 = OpIAdd %ulong %26 %ulong_1
%27 = OpBitcast %_ptr_Generic_ulong %4
OpStore %27 %19 Aligned 8
%19 = OpIAdd %ulong %14 %ulong_1
%26 = OpBitcast %_ptr_Generic_ulong %4
%27 = OpCopyObject %ulong %19
OpStore %26 %27 Aligned 8
%28 = OpBitcast %_ptr_Generic_ulong %4
%47 = OpBitcast %_ptr_Generic_uchar %28
%48 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %47 %ulong_0
@ -61,9 +62,11 @@
OpStore %7 %15
%16 = OpLoad %ulong %6
%17 = OpLoad %ulong %7
%23 = OpIAdd %ulong %16 %ulong_0_0
%30 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %23
%30 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %16
%50 = OpBitcast %_ptr_CrossWorkgroup_uchar %30
%51 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %50 %ulong_0_0
%23 = OpBitcast %_ptr_CrossWorkgroup_ulong %51
%31 = OpCopyObject %ulong %17
OpStore %30 %31 Aligned 8
OpStore %23 %31 Aligned 8
OpReturn
OpFunctionEnd

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %31
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -39,9 +41,11 @@
%12 = OpLoad %uint %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_uint %22
%14 = OpLoad %uint %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_uint %15
%38 = OpBitcast %_ptr_Generic_uchar %24
%39 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %38 %ulong_4
%22 = OpBitcast %_ptr_Generic_uint %39
%14 = OpLoad %uint %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %uint %6
%18 = OpLoad %uint %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_ushort = OpTypePointer Function %ushort
%_ptr_Generic_ushort = OpTypePointer Generic %ushort
%ulong_2 = OpConstant %ulong 2
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%bool = OpTypeBool
%false = OpConstantFalse %bool
%1 = OpFunction %void None %32
@ -41,9 +43,11 @@
%12 = OpLoad %ushort %24 Aligned 2
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_2
%25 = OpConvertUToPtr %_ptr_Generic_ushort %22
%14 = OpLoad %ushort %25 Aligned 2
%25 = OpConvertUToPtr %_ptr_Generic_ushort %15
%39 = OpBitcast %_ptr_Generic_uchar %25
%40 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %39 %ulong_2
%22 = OpBitcast %_ptr_Generic_ushort %40
%14 = OpLoad %ushort %22 Aligned 2
OpStore %7 %14
%17 = OpLoad %ushort %6
%18 = OpLoad %ushort %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_ushort = OpTypePointer Function %ushort
%_ptr_Generic_ushort = OpTypePointer Generic %ushort
%ulong_2 = OpConstant %ulong 2
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%bool = OpTypeBool
%true = OpConstantTrue %bool
%1 = OpFunction %void None %32
@ -41,9 +43,11 @@
%12 = OpLoad %ushort %24 Aligned 2
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_2
%25 = OpConvertUToPtr %_ptr_Generic_ushort %22
%14 = OpLoad %ushort %25 Aligned 2
%25 = OpConvertUToPtr %_ptr_Generic_ushort %15
%39 = OpBitcast %_ptr_Generic_uchar %25
%40 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %39 %ulong_2
%22 = OpBitcast %_ptr_Generic_ushort %40
%14 = OpLoad %ushort %22 Aligned 2
OpStore %7 %14
%17 = OpLoad %ushort %6
%18 = OpLoad %ushort %7

View file

@ -18,6 +18,8 @@
%_ptr_Function_bool = OpTypePointer Function %bool
%_ptr_Generic_ulong = OpTypePointer Generic %ulong
%ulong_8 = OpConstant %ulong 8
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_1 = OpConstant %ulong 1
%ulong_2 = OpConstant %ulong 2
%1 = OpFunction %void None %43
@ -43,9 +45,11 @@
%18 = OpLoad %ulong %35 Aligned 8
OpStore %6 %18
%21 = OpLoad %ulong %4
%32 = OpIAdd %ulong %21 %ulong_8
%36 = OpConvertUToPtr %_ptr_Generic_ulong %32
%20 = OpLoad %ulong %36 Aligned 8
%36 = OpConvertUToPtr %_ptr_Generic_ulong %21
%50 = OpBitcast %_ptr_Generic_uchar %36
%51 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %50 %ulong_8
%32 = OpBitcast %_ptr_Generic_ulong %51
%20 = OpLoad %ulong %32 Aligned 8
OpStore %7 %20
%23 = OpLoad %ulong %6
%24 = OpLoad %ulong %7

View file

@ -20,6 +20,8 @@
%_ptr_Function_bool = OpTypePointer Function %bool
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %43
%14 = OpFunctionParameter %ulong
%15 = OpFunctionParameter %ulong
@ -43,9 +45,11 @@
%18 = OpLoad %float %35 Aligned 4
OpStore %6 %18
%21 = OpLoad %ulong %4
%34 = OpIAdd %ulong %21 %ulong_4
%36 = OpConvertUToPtr %_ptr_Generic_float %34
%20 = OpLoad %float %36 Aligned 4
%36 = OpConvertUToPtr %_ptr_Generic_float %21
%52 = OpBitcast %_ptr_Generic_uchar %36
%53 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %52 %ulong_4
%34 = OpBitcast %_ptr_Generic_float %53
%20 = OpLoad %float %34 Aligned 4
OpStore %7 %20
%23 = OpLoad %float %6
%24 = OpLoad %float %7

View file

@ -20,6 +20,8 @@
%_ptr_Function_bool = OpTypePointer Function %bool
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %43
%14 = OpFunctionParameter %ulong
%15 = OpFunctionParameter %ulong
@ -43,9 +45,11 @@
%18 = OpLoad %float %35 Aligned 4
OpStore %6 %18
%21 = OpLoad %ulong %4
%34 = OpIAdd %ulong %21 %ulong_4
%36 = OpConvertUToPtr %_ptr_Generic_float %34
%20 = OpLoad %float %36 Aligned 4
%36 = OpConvertUToPtr %_ptr_Generic_float %21
%52 = OpBitcast %_ptr_Generic_uchar %36
%53 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %52 %ulong_4
%34 = OpBitcast %_ptr_Generic_float %53
%20 = OpLoad %float %34 Aligned 4
OpStore %7 %20
%23 = OpLoad %float %6
%24 = OpLoad %float %7

View file

@ -22,6 +22,8 @@
%_ptr_Function_bool = OpTypePointer Function %bool
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_8 = OpConstant %ulong 8
%ulong_12 = OpConstant %ulong 12
%ulong_16 = OpConstant %ulong 16
@ -69,45 +71,59 @@
%36 = OpLoad %float %116 Aligned 4
OpStore %6 %36
%39 = OpLoad %ulong %4
%89 = OpIAdd %ulong %39 %ulong_4
%117 = OpConvertUToPtr %_ptr_Generic_float %89
%38 = OpLoad %float %117 Aligned 4
%117 = OpConvertUToPtr %_ptr_Generic_float %39
%144 = OpBitcast %_ptr_Generic_uchar %117
%145 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %144 %ulong_4
%89 = OpBitcast %_ptr_Generic_float %145
%38 = OpLoad %float %89 Aligned 4
OpStore %7 %38
%41 = OpLoad %ulong %4
%91 = OpIAdd %ulong %41 %ulong_8
%118 = OpConvertUToPtr %_ptr_Generic_float %91
%40 = OpLoad %float %118 Aligned 4
%118 = OpConvertUToPtr %_ptr_Generic_float %41
%146 = OpBitcast %_ptr_Generic_uchar %118
%147 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %146 %ulong_8
%91 = OpBitcast %_ptr_Generic_float %147
%40 = OpLoad %float %91 Aligned 4
OpStore %8 %40
%43 = OpLoad %ulong %4
%93 = OpIAdd %ulong %43 %ulong_12
%119 = OpConvertUToPtr %_ptr_Generic_float %93
%42 = OpLoad %float %119 Aligned 4
%119 = OpConvertUToPtr %_ptr_Generic_float %43
%148 = OpBitcast %_ptr_Generic_uchar %119
%149 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %148 %ulong_12
%93 = OpBitcast %_ptr_Generic_float %149
%42 = OpLoad %float %93 Aligned 4
OpStore %9 %42
%45 = OpLoad %ulong %4
%95 = OpIAdd %ulong %45 %ulong_16
%120 = OpConvertUToPtr %_ptr_Generic_float %95
%44 = OpLoad %float %120 Aligned 4
%120 = OpConvertUToPtr %_ptr_Generic_float %45
%150 = OpBitcast %_ptr_Generic_uchar %120
%151 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %150 %ulong_16
%95 = OpBitcast %_ptr_Generic_float %151
%44 = OpLoad %float %95 Aligned 4
OpStore %10 %44
%47 = OpLoad %ulong %4
%97 = OpIAdd %ulong %47 %ulong_20
%121 = OpConvertUToPtr %_ptr_Generic_float %97
%46 = OpLoad %float %121 Aligned 4
%121 = OpConvertUToPtr %_ptr_Generic_float %47
%152 = OpBitcast %_ptr_Generic_uchar %121
%153 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %152 %ulong_20
%97 = OpBitcast %_ptr_Generic_float %153
%46 = OpLoad %float %97 Aligned 4
OpStore %11 %46
%49 = OpLoad %ulong %4
%99 = OpIAdd %ulong %49 %ulong_24
%122 = OpConvertUToPtr %_ptr_Generic_float %99
%48 = OpLoad %float %122 Aligned 4
%122 = OpConvertUToPtr %_ptr_Generic_float %49
%154 = OpBitcast %_ptr_Generic_uchar %122
%155 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %154 %ulong_24
%99 = OpBitcast %_ptr_Generic_float %155
%48 = OpLoad %float %99 Aligned 4
OpStore %12 %48
%51 = OpLoad %ulong %4
%101 = OpIAdd %ulong %51 %ulong_28
%123 = OpConvertUToPtr %_ptr_Generic_float %101
%50 = OpLoad %float %123 Aligned 4
%123 = OpConvertUToPtr %_ptr_Generic_float %51
%156 = OpBitcast %_ptr_Generic_uchar %123
%157 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %156 %ulong_28
%101 = OpBitcast %_ptr_Generic_float %157
%50 = OpLoad %float %101 Aligned 4
OpStore %13 %50
%53 = OpLoad %float %6
%54 = OpLoad %float %7
%142 = OpIsNan %bool %53
%143 = OpIsNan %bool %54
%52 = OpLogicalOr %bool %142 %143
%158 = OpIsNan %bool %53
%159 = OpIsNan %bool %54
%52 = OpLogicalOr %bool %158 %159
OpStore %15 %52
%55 = OpLoad %bool %15
OpBranchConditional %55 %16 %17
@ -129,9 +145,9 @@
OpStore %124 %60 Aligned 4
%62 = OpLoad %float %8
%63 = OpLoad %float %9
%145 = OpIsNan %bool %62
%146 = OpIsNan %bool %63
%61 = OpLogicalOr %bool %145 %146
%161 = OpIsNan %bool %62
%162 = OpIsNan %bool %63
%61 = OpLogicalOr %bool %161 %162
OpStore %15 %61
%64 = OpLoad %bool %15
OpBranchConditional %64 %20 %21
@ -149,14 +165,16 @@
%23 = OpLabel
%68 = OpLoad %ulong %5
%69 = OpLoad %uint %14
%107 = OpIAdd %ulong %68 %ulong_4_0
%125 = OpConvertUToPtr %_ptr_Generic_uint %107
OpStore %125 %69 Aligned 4
%125 = OpConvertUToPtr %_ptr_Generic_uint %68
%163 = OpBitcast %_ptr_Generic_uchar %125
%164 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %163 %ulong_4_0
%107 = OpBitcast %_ptr_Generic_uint %164
OpStore %107 %69 Aligned 4
%71 = OpLoad %float %10
%72 = OpLoad %float %11
%147 = OpIsNan %bool %71
%148 = OpIsNan %bool %72
%70 = OpLogicalOr %bool %147 %148
%165 = OpIsNan %bool %71
%166 = OpIsNan %bool %72
%70 = OpLogicalOr %bool %165 %166
OpStore %15 %70
%73 = OpLoad %bool %15
OpBranchConditional %73 %24 %25
@ -174,14 +192,16 @@
%27 = OpLabel
%77 = OpLoad %ulong %5
%78 = OpLoad %uint %14
%111 = OpIAdd %ulong %77 %ulong_8_0
%126 = OpConvertUToPtr %_ptr_Generic_uint %111
OpStore %126 %78 Aligned 4
%126 = OpConvertUToPtr %_ptr_Generic_uint %77
%167 = OpBitcast %_ptr_Generic_uchar %126
%168 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %167 %ulong_8_0
%111 = OpBitcast %_ptr_Generic_uint %168
OpStore %111 %78 Aligned 4
%80 = OpLoad %float %12
%81 = OpLoad %float %13
%149 = OpIsNan %bool %80
%150 = OpIsNan %bool %81
%79 = OpLogicalOr %bool %149 %150
%169 = OpIsNan %bool %80
%170 = OpIsNan %bool %81
%79 = OpLogicalOr %bool %169 %170
OpStore %15 %79
%82 = OpLoad %bool %15
OpBranchConditional %82 %28 %29
@ -199,8 +219,10 @@
%31 = OpLabel
%86 = OpLoad %ulong %5
%87 = OpLoad %uint %14
%115 = OpIAdd %ulong %86 %ulong_12_0
%127 = OpConvertUToPtr %_ptr_Generic_uint %115
OpStore %127 %87 Aligned 4
%127 = OpConvertUToPtr %_ptr_Generic_uint %86
%171 = OpBitcast %_ptr_Generic_uchar %127
%172 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %171 %ulong_12_0
%115 = OpBitcast %_ptr_Generic_uint %172
OpStore %115 %87 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -22,6 +22,8 @@
%_ptr_Function_bool = OpTypePointer Function %bool
%_ptr_Generic_float = OpTypePointer Generic %float
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%ulong_8 = OpConstant %ulong 8
%ulong_12 = OpConstant %ulong 12
%ulong_16 = OpConstant %ulong 16
@ -77,46 +79,60 @@
%36 = OpLoad %float %116 Aligned 4
OpStore %6 %36
%39 = OpLoad %ulong %4
%89 = OpIAdd %ulong %39 %ulong_4
%117 = OpConvertUToPtr %_ptr_Generic_float %89
%38 = OpLoad %float %117 Aligned 4
%117 = OpConvertUToPtr %_ptr_Generic_float %39
%144 = OpBitcast %_ptr_Generic_uchar %117
%145 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %144 %ulong_4
%89 = OpBitcast %_ptr_Generic_float %145
%38 = OpLoad %float %89 Aligned 4
OpStore %7 %38
%41 = OpLoad %ulong %4
%91 = OpIAdd %ulong %41 %ulong_8
%118 = OpConvertUToPtr %_ptr_Generic_float %91
%40 = OpLoad %float %118 Aligned 4
%118 = OpConvertUToPtr %_ptr_Generic_float %41
%146 = OpBitcast %_ptr_Generic_uchar %118
%147 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %146 %ulong_8
%91 = OpBitcast %_ptr_Generic_float %147
%40 = OpLoad %float %91 Aligned 4
OpStore %8 %40
%43 = OpLoad %ulong %4
%93 = OpIAdd %ulong %43 %ulong_12
%119 = OpConvertUToPtr %_ptr_Generic_float %93
%42 = OpLoad %float %119 Aligned 4
%119 = OpConvertUToPtr %_ptr_Generic_float %43
%148 = OpBitcast %_ptr_Generic_uchar %119
%149 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %148 %ulong_12
%93 = OpBitcast %_ptr_Generic_float %149
%42 = OpLoad %float %93 Aligned 4
OpStore %9 %42
%45 = OpLoad %ulong %4
%95 = OpIAdd %ulong %45 %ulong_16
%120 = OpConvertUToPtr %_ptr_Generic_float %95
%44 = OpLoad %float %120 Aligned 4
%120 = OpConvertUToPtr %_ptr_Generic_float %45
%150 = OpBitcast %_ptr_Generic_uchar %120
%151 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %150 %ulong_16
%95 = OpBitcast %_ptr_Generic_float %151
%44 = OpLoad %float %95 Aligned 4
OpStore %10 %44
%47 = OpLoad %ulong %4
%97 = OpIAdd %ulong %47 %ulong_20
%121 = OpConvertUToPtr %_ptr_Generic_float %97
%46 = OpLoad %float %121 Aligned 4
%121 = OpConvertUToPtr %_ptr_Generic_float %47
%152 = OpBitcast %_ptr_Generic_uchar %121
%153 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %152 %ulong_20
%97 = OpBitcast %_ptr_Generic_float %153
%46 = OpLoad %float %97 Aligned 4
OpStore %11 %46
%49 = OpLoad %ulong %4
%99 = OpIAdd %ulong %49 %ulong_24
%122 = OpConvertUToPtr %_ptr_Generic_float %99
%48 = OpLoad %float %122 Aligned 4
%122 = OpConvertUToPtr %_ptr_Generic_float %49
%154 = OpBitcast %_ptr_Generic_uchar %122
%155 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %154 %ulong_24
%99 = OpBitcast %_ptr_Generic_float %155
%48 = OpLoad %float %99 Aligned 4
OpStore %12 %48
%51 = OpLoad %ulong %4
%101 = OpIAdd %ulong %51 %ulong_28
%123 = OpConvertUToPtr %_ptr_Generic_float %101
%50 = OpLoad %float %123 Aligned 4
%123 = OpConvertUToPtr %_ptr_Generic_float %51
%156 = OpBitcast %_ptr_Generic_uchar %123
%157 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %156 %ulong_28
%101 = OpBitcast %_ptr_Generic_float %157
%50 = OpLoad %float %101 Aligned 4
OpStore %13 %50
%53 = OpLoad %float %6
%54 = OpLoad %float %7
%142 = OpIsNan %bool %53
%143 = OpIsNan %bool %54
%144 = OpLogicalOr %bool %142 %143
%52 = OpSelect %bool %144 %false %true
%158 = OpIsNan %bool %53
%159 = OpIsNan %bool %54
%160 = OpLogicalOr %bool %158 %159
%52 = OpSelect %bool %160 %false %true
OpStore %15 %52
%55 = OpLoad %bool %15
OpBranchConditional %55 %16 %17
@ -138,10 +154,10 @@
OpStore %124 %60 Aligned 4
%62 = OpLoad %float %8
%63 = OpLoad %float %9
%148 = OpIsNan %bool %62
%149 = OpIsNan %bool %63
%150 = OpLogicalOr %bool %148 %149
%61 = OpSelect %bool %150 %false_0 %true_0
%164 = OpIsNan %bool %62
%165 = OpIsNan %bool %63
%166 = OpLogicalOr %bool %164 %165
%61 = OpSelect %bool %166 %false_0 %true_0
OpStore %15 %61
%64 = OpLoad %bool %15
OpBranchConditional %64 %20 %21
@ -159,15 +175,17 @@
%23 = OpLabel
%68 = OpLoad %ulong %5
%69 = OpLoad %uint %14
%107 = OpIAdd %ulong %68 %ulong_4_0
%125 = OpConvertUToPtr %_ptr_Generic_uint %107
OpStore %125 %69 Aligned 4
%125 = OpConvertUToPtr %_ptr_Generic_uint %68
%169 = OpBitcast %_ptr_Generic_uchar %125
%170 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %169 %ulong_4_0
%107 = OpBitcast %_ptr_Generic_uint %170
OpStore %107 %69 Aligned 4
%71 = OpLoad %float %10
%72 = OpLoad %float %11
%153 = OpIsNan %bool %71
%154 = OpIsNan %bool %72
%155 = OpLogicalOr %bool %153 %154
%70 = OpSelect %bool %155 %false_1 %true_1
%171 = OpIsNan %bool %71
%172 = OpIsNan %bool %72
%173 = OpLogicalOr %bool %171 %172
%70 = OpSelect %bool %173 %false_1 %true_1
OpStore %15 %70
%73 = OpLoad %bool %15
OpBranchConditional %73 %24 %25
@ -185,15 +203,17 @@
%27 = OpLabel
%77 = OpLoad %ulong %5
%78 = OpLoad %uint %14
%111 = OpIAdd %ulong %77 %ulong_8_0
%126 = OpConvertUToPtr %_ptr_Generic_uint %111
OpStore %126 %78 Aligned 4
%126 = OpConvertUToPtr %_ptr_Generic_uint %77
%176 = OpBitcast %_ptr_Generic_uchar %126
%177 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %176 %ulong_8_0
%111 = OpBitcast %_ptr_Generic_uint %177
OpStore %111 %78 Aligned 4
%80 = OpLoad %float %12
%81 = OpLoad %float %13
%158 = OpIsNan %bool %80
%159 = OpIsNan %bool %81
%160 = OpLogicalOr %bool %158 %159
%79 = OpSelect %bool %160 %false_2 %true_2
%178 = OpIsNan %bool %80
%179 = OpIsNan %bool %81
%180 = OpLogicalOr %bool %178 %179
%79 = OpSelect %bool %180 %false_2 %true_2
OpStore %15 %79
%82 = OpLoad %bool %15
OpBranchConditional %82 %28 %29
@ -211,8 +231,10 @@
%31 = OpLabel
%86 = OpLoad %ulong %5
%87 = OpLoad %uint %14
%115 = OpIAdd %ulong %86 %ulong_12_0
%127 = OpConvertUToPtr %_ptr_Generic_uint %115
OpStore %127 %87 Aligned 4
%127 = OpConvertUToPtr %_ptr_Generic_uint %86
%183 = OpBitcast %_ptr_Generic_uchar %127
%184 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %183 %ulong_12_0
%115 = OpBitcast %_ptr_Generic_uint %184
OpStore %115 %87 Aligned 4
OpReturn
OpFunctionEnd

View file

@ -24,7 +24,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_CrossWorkgroup_ulong = OpTypePointer CrossWorkgroup %ulong
%_ptr_Workgroup_ulong = OpTypePointer Workgroup %ulong
%uint_0 = OpConstant %uint 0
%ulong_0 = OpConstant %ulong 0
%_ptr_Workgroup_uchar = OpTypePointer Workgroup %uchar
%1 = OpFunction %void None %40
%10 = OpFunctionParameter %ulong
%11 = OpFunctionParameter %ulong
@ -54,9 +55,11 @@
%27 = OpConvertUToPtr %_ptr_Workgroup_ulong %17
OpStore %27 %18 Aligned 8
%20 = OpLoad %uint %7
%24 = OpIAdd %uint %20 %uint_0
%28 = OpConvertUToPtr %_ptr_Workgroup_ulong %24
%19 = OpLoad %ulong %28 Aligned 8
%28 = OpConvertUToPtr %_ptr_Workgroup_ulong %20
%46 = OpBitcast %_ptr_Workgroup_uchar %28
%47 = OpInBoundsPtrAccessChain %_ptr_Workgroup_uchar %46 %ulong_0
%24 = OpBitcast %_ptr_Workgroup_ulong %47
%19 = OpLoad %ulong %24 Aligned 8
OpStore %9 %19
%21 = OpLoad %ulong %6
%22 = OpLoad %ulong %9

View file

@ -7,27 +7,24 @@
OpCapability Int64
OpCapability Float16
OpCapability Float64
%33 = OpExtInstImport "OpenCL.std"
%31 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %2 "shared_ptr_take_address" %1
OpDecorate %1 Alignment 4
%void = OpTypeVoid
%uchar = OpTypeInt 8 0
%_ptr_Workgroup_uchar = OpTypePointer Workgroup %uchar
%_ptr_Workgroup__ptr_Workgroup_uchar = OpTypePointer Workgroup %_ptr_Workgroup_uchar
%1 = OpVariable %_ptr_Workgroup__ptr_Workgroup_uchar Workgroup
%1 = OpVariable %_ptr_Workgroup_uchar Workgroup
%ulong = OpTypeInt 64 0
%39 = OpTypeFunction %void %ulong %ulong %_ptr_Workgroup_uchar
%_ptr_Function__ptr_Workgroup_uchar = OpTypePointer Function %_ptr_Workgroup_uchar
%36 = OpTypeFunction %void %ulong %ulong %_ptr_Workgroup_uchar
%_ptr_Function_ulong = OpTypePointer Function %ulong
%_ptr_CrossWorkgroup_ulong = OpTypePointer CrossWorkgroup %ulong
%_ptr_Workgroup_ulong = OpTypePointer Workgroup %ulong
%2 = OpFunction %void None %39
%2 = OpFunction %void None %36
%10 = OpFunctionParameter %ulong
%11 = OpFunctionParameter %ulong
%31 = OpFunctionParameter %_ptr_Workgroup_uchar
%40 = OpLabel
%32 = OpVariable %_ptr_Function__ptr_Workgroup_uchar Function
%30 = OpFunctionParameter %_ptr_Workgroup_uchar
%28 = OpLabel
%3 = OpVariable %_ptr_Function_ulong Function
%4 = OpVariable %_ptr_Function_ulong Function
%5 = OpVariable %_ptr_Function_ulong Function
@ -35,34 +32,30 @@
%7 = OpVariable %_ptr_Function_ulong Function
%8 = OpVariable %_ptr_Function_ulong Function
%9 = OpVariable %_ptr_Function_ulong Function
OpStore %32 %31
OpBranch %29
%29 = OpLabel
OpStore %3 %10
OpStore %4 %11
%12 = OpLoad %ulong %3 Aligned 8
OpStore %5 %12
%13 = OpLoad %ulong %4 Aligned 8
OpStore %6 %13
%15 = OpLoad %_ptr_Workgroup_uchar %32
%24 = OpConvertPtrToU %ulong %15
%14 = OpCopyObject %ulong %24
%23 = OpConvertPtrToU %ulong %30
%14 = OpCopyObject %ulong %23
OpStore %7 %14
%17 = OpLoad %ulong %5
%25 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %17
%16 = OpLoad %ulong %25 Aligned 8
OpStore %8 %16
%18 = OpLoad %ulong %7
%19 = OpLoad %ulong %8
%26 = OpConvertUToPtr %_ptr_Workgroup_ulong %18
OpStore %26 %19 Aligned 8
%21 = OpLoad %ulong %7
%27 = OpConvertUToPtr %_ptr_Workgroup_ulong %21
%20 = OpLoad %ulong %27 Aligned 8
OpStore %9 %20
%22 = OpLoad %ulong %6
%23 = OpLoad %ulong %9
%28 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %22
OpStore %28 %23 Aligned 8
%16 = OpLoad %ulong %5
%24 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %16
%15 = OpLoad %ulong %24 Aligned 8
OpStore %8 %15
%17 = OpLoad %ulong %7
%18 = OpLoad %ulong %8
%25 = OpConvertUToPtr %_ptr_Workgroup_ulong %17
OpStore %25 %18 Aligned 8
%20 = OpLoad %ulong %7
%26 = OpConvertUToPtr %_ptr_Workgroup_ulong %20
%19 = OpLoad %ulong %26 Aligned 8
OpStore %9 %19
%21 = OpLoad %ulong %6
%22 = OpLoad %ulong %9
%27 = OpConvertUToPtr %_ptr_CrossWorkgroup_ulong %21
OpStore %27 %22 Aligned 8
OpReturn
OpFunctionEnd

View file

@ -7,7 +7,7 @@
OpCapability Int64
OpCapability Float16
OpCapability Float64
%50 = OpExtInstImport "OpenCL.std"
%54 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "stateful_ld_st_ntid" %gl_LocalInvocationID
OpDecorate %gl_LocalInvocationID BuiltIn LocalInvocationId
@ -18,34 +18,34 @@
%gl_LocalInvocationID = OpVariable %_ptr_Input_v3ulong Input
%uchar = OpTypeInt 8 0
%_ptr_CrossWorkgroup_uchar = OpTypePointer CrossWorkgroup %uchar
%57 = OpTypeFunction %void %_ptr_CrossWorkgroup_uchar %_ptr_CrossWorkgroup_uchar
%61 = OpTypeFunction %void %_ptr_CrossWorkgroup_uchar %_ptr_CrossWorkgroup_uchar
%_ptr_Function__ptr_CrossWorkgroup_uchar = OpTypePointer Function %_ptr_CrossWorkgroup_uchar
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Function_ulong = OpTypePointer Function %ulong
%_ptr_CrossWorkgroup_ulong = OpTypePointer CrossWorkgroup %ulong
%1 = OpFunction %void None %57
%1 = OpFunction %void None %61
%20 = OpFunctionParameter %_ptr_CrossWorkgroup_uchar
%21 = OpFunctionParameter %_ptr_CrossWorkgroup_uchar
%48 = OpLabel
%2 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%3 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%52 = OpLabel
%12 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%13 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%10 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%11 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%6 = OpVariable %_ptr_Function_uint Function
%7 = OpVariable %_ptr_Function_ulong Function
%8 = OpVariable %_ptr_Function_ulong Function
OpStore %2 %20
OpStore %3 %21
%13 = OpBitcast %_ptr_Function_ulong %2
%44 = OpLoad %ulong %13 Aligned 8
%12 = OpCopyObject %ulong %44
%22 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %12
OpStore %12 %20
OpStore %13 %21
%45 = OpBitcast %_ptr_Function_ulong %12
%44 = OpLoad %ulong %45 Aligned 8
%14 = OpCopyObject %ulong %44
%22 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %14
OpStore %10 %22
%15 = OpBitcast %_ptr_Function_ulong %3
%45 = OpLoad %ulong %15 Aligned 8
%14 = OpCopyObject %ulong %45
%23 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %14
%47 = OpBitcast %_ptr_Function_ulong %13
%46 = OpLoad %ulong %47 Aligned 8
%15 = OpCopyObject %ulong %46
%23 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %15
OpStore %11 %23
%24 = OpLoad %_ptr_CrossWorkgroup_uchar %10
%17 = OpConvertPtrToU %ulong %24
@ -57,35 +57,37 @@
%18 = OpCopyObject %ulong %19
%27 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %18
OpStore %11 %27
%62 = OpLoad %v3ulong %gl_LocalInvocationID
%43 = OpCompositeExtract %ulong %62 0
%63 = OpBitcast %ulong %43
%29 = OpUConvert %uint %63
%66 = OpLoad %v3ulong %gl_LocalInvocationID
%43 = OpCompositeExtract %ulong %66 0
%67 = OpBitcast %ulong %43
%29 = OpUConvert %uint %67
%28 = OpCopyObject %uint %29
OpStore %6 %28
%31 = OpLoad %uint %6
%64 = OpBitcast %uint %31
%30 = OpUConvert %ulong %64
%68 = OpBitcast %uint %31
%30 = OpUConvert %ulong %68
OpStore %7 %30
%33 = OpLoad %_ptr_CrossWorkgroup_uchar %10
%34 = OpLoad %ulong %7
%65 = OpBitcast %_ptr_CrossWorkgroup_uchar %33
%66 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %65 %34
%32 = OpBitcast %_ptr_CrossWorkgroup_uchar %66
%48 = OpCopyObject %ulong %34
%69 = OpBitcast %_ptr_CrossWorkgroup_uchar %33
%70 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %69 %48
%32 = OpBitcast %_ptr_CrossWorkgroup_uchar %70
OpStore %10 %32
%36 = OpLoad %_ptr_CrossWorkgroup_uchar %11
%37 = OpLoad %ulong %7
%67 = OpBitcast %_ptr_CrossWorkgroup_uchar %36
%68 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %67 %37
%35 = OpBitcast %_ptr_CrossWorkgroup_uchar %68
%49 = OpCopyObject %ulong %37
%71 = OpBitcast %_ptr_CrossWorkgroup_uchar %36
%72 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %71 %49
%35 = OpBitcast %_ptr_CrossWorkgroup_uchar %72
OpStore %11 %35
%39 = OpLoad %_ptr_CrossWorkgroup_uchar %10
%46 = OpBitcast %_ptr_CrossWorkgroup_ulong %39
%38 = OpLoad %ulong %46 Aligned 8
%50 = OpBitcast %_ptr_CrossWorkgroup_ulong %39
%38 = OpLoad %ulong %50 Aligned 8
OpStore %8 %38
%40 = OpLoad %_ptr_CrossWorkgroup_uchar %11
%41 = OpLoad %ulong %8
%47 = OpBitcast %_ptr_CrossWorkgroup_ulong %40
OpStore %47 %41 Aligned 8
%51 = OpBitcast %_ptr_CrossWorkgroup_ulong %40
OpStore %51 %41 Aligned 8
OpReturn
OpFunctionEnd

View file

@ -7,7 +7,7 @@
OpCapability Int64
OpCapability Float16
OpCapability Float64
%58 = OpExtInstImport "OpenCL.std"
%62 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical64 OpenCL
OpEntryPoint Kernel %1 "stateful_ld_st_ntid_chain" %gl_LocalInvocationID
OpDecorate %gl_LocalInvocationID BuiltIn LocalInvocationId
@ -18,18 +18,18 @@
%gl_LocalInvocationID = OpVariable %_ptr_Input_v3ulong Input
%uchar = OpTypeInt 8 0
%_ptr_CrossWorkgroup_uchar = OpTypePointer CrossWorkgroup %uchar
%65 = OpTypeFunction %void %_ptr_CrossWorkgroup_uchar %_ptr_CrossWorkgroup_uchar
%69 = OpTypeFunction %void %_ptr_CrossWorkgroup_uchar %_ptr_CrossWorkgroup_uchar
%_ptr_Function__ptr_CrossWorkgroup_uchar = OpTypePointer Function %_ptr_CrossWorkgroup_uchar
%uint = OpTypeInt 32 0
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Function_ulong = OpTypePointer Function %ulong
%_ptr_CrossWorkgroup_ulong = OpTypePointer CrossWorkgroup %ulong
%1 = OpFunction %void None %65
%1 = OpFunction %void None %69
%28 = OpFunctionParameter %_ptr_CrossWorkgroup_uchar
%29 = OpFunctionParameter %_ptr_CrossWorkgroup_uchar
%56 = OpLabel
%2 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%3 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%60 = OpLabel
%20 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%21 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%14 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%15 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
%16 = OpVariable %_ptr_Function__ptr_CrossWorkgroup_uchar Function
@ -39,17 +39,17 @@
%10 = OpVariable %_ptr_Function_uint Function
%11 = OpVariable %_ptr_Function_ulong Function
%12 = OpVariable %_ptr_Function_ulong Function
OpStore %2 %28
OpStore %3 %29
%21 = OpBitcast %_ptr_Function_ulong %2
%52 = OpLoad %ulong %21 Aligned 8
%20 = OpCopyObject %ulong %52
%30 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %20
OpStore %20 %28
OpStore %21 %29
%53 = OpBitcast %_ptr_Function_ulong %20
%52 = OpLoad %ulong %53 Aligned 8
%22 = OpCopyObject %ulong %52
%30 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %22
OpStore %14 %30
%23 = OpBitcast %_ptr_Function_ulong %3
%53 = OpLoad %ulong %23 Aligned 8
%22 = OpCopyObject %ulong %53
%31 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %22
%55 = OpBitcast %_ptr_Function_ulong %21
%54 = OpLoad %ulong %55 Aligned 8
%23 = OpCopyObject %ulong %54
%31 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %23
OpStore %17 %31
%32 = OpLoad %_ptr_CrossWorkgroup_uchar %14
%25 = OpConvertPtrToU %ulong %32
@ -61,35 +61,37 @@
%26 = OpCopyObject %ulong %27
%35 = OpConvertUToPtr %_ptr_CrossWorkgroup_uchar %26
OpStore %18 %35
%70 = OpLoad %v3ulong %gl_LocalInvocationID
%51 = OpCompositeExtract %ulong %70 0
%71 = OpBitcast %ulong %51
%37 = OpUConvert %uint %71
%74 = OpLoad %v3ulong %gl_LocalInvocationID
%51 = OpCompositeExtract %ulong %74 0
%75 = OpBitcast %ulong %51
%37 = OpUConvert %uint %75
%36 = OpCopyObject %uint %37
OpStore %10 %36
%39 = OpLoad %uint %10
%72 = OpBitcast %uint %39
%38 = OpUConvert %ulong %72
%76 = OpBitcast %uint %39
%38 = OpUConvert %ulong %76
OpStore %11 %38
%41 = OpLoad %_ptr_CrossWorkgroup_uchar %15
%42 = OpLoad %ulong %11
%73 = OpBitcast %_ptr_CrossWorkgroup_uchar %41
%74 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %73 %42
%40 = OpBitcast %_ptr_CrossWorkgroup_uchar %74
%56 = OpCopyObject %ulong %42
%77 = OpBitcast %_ptr_CrossWorkgroup_uchar %41
%78 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %77 %56
%40 = OpBitcast %_ptr_CrossWorkgroup_uchar %78
OpStore %16 %40
%44 = OpLoad %_ptr_CrossWorkgroup_uchar %18
%45 = OpLoad %ulong %11
%75 = OpBitcast %_ptr_CrossWorkgroup_uchar %44
%76 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %75 %45
%43 = OpBitcast %_ptr_CrossWorkgroup_uchar %76
%57 = OpCopyObject %ulong %45
%79 = OpBitcast %_ptr_CrossWorkgroup_uchar %44
%80 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_uchar %79 %57
%43 = OpBitcast %_ptr_CrossWorkgroup_uchar %80
OpStore %19 %43
%47 = OpLoad %_ptr_CrossWorkgroup_uchar %16
%54 = OpBitcast %_ptr_CrossWorkgroup_ulong %47
%46 = OpLoad %ulong %54 Aligned 8
%58 = OpBitcast %_ptr_CrossWorkgroup_ulong %47
%46 = OpLoad %ulong %58 Aligned 8
OpStore %12 %46
%48 = OpLoad %_ptr_CrossWorkgroup_uchar %19
%49 = OpLoad %ulong %12
%55 = OpBitcast %_ptr_CrossWorkgroup_ulong %48
OpStore %55 %49 Aligned 8
%59 = OpBitcast %_ptr_CrossWorkgroup_ulong %48
OpStore %59 %49 Aligned 8
OpReturn
OpFunctionEnd

View file

@ -25,8 +25,8 @@
%1 = OpFunction %v2uint None %55
%7 = OpFunctionParameter %v2uint
%24 = OpLabel
%2 = OpVariable %_ptr_Function_v2uint Function
%3 = OpVariable %_ptr_Function_v2uint Function
%2 = OpVariable %_ptr_Function_v2uint Function
%4 = OpVariable %_ptr_Function_v2uint Function
%5 = OpVariable %_ptr_Function_uint Function
%6 = OpVariable %_ptr_Function_uint Function

View file

@ -0,0 +1,21 @@
import os, sys, subprocess
def main(path):
dirs = os.listdir(path)
for file in dirs:
if not file.endswith(".spvtxt"):
continue
full_file = os.path.join(path, file)
print(file)
spv_file = f"/tmp/{file}.spv"
# We nominally emit spv1.3, but use spv1.4 feature (OpEntryPoint interface changes in 1.4)
proc1 = subprocess.run(["spirv-as", "--target-env", "spv1.4", full_file, "-o", spv_file])
proc2 = subprocess.run(["spirv-dis", spv_file, "-o", f"{spv_file}.dis.txt"])
proc3 = subprocess.run(["spirv-val", spv_file ])
if proc1.returncode != 0 or proc2.returncode != 0 or proc3.returncode != 0:
print(proc1.returncode)
print(proc2.returncode)
print(proc3.returncode)
if __name__ == "__main__":
main(sys.argv[1])

View file

@ -18,6 +18,8 @@
%_ptr_Function_uint = OpTypePointer Function %uint
%_ptr_Generic_uint = OpTypePointer Generic %uint
%ulong_4 = OpConstant %ulong 4
%uchar = OpTypeInt 8 0
%_ptr_Generic_uchar = OpTypePointer Generic %uchar
%1 = OpFunction %void None %31
%8 = OpFunctionParameter %ulong
%9 = OpFunctionParameter %ulong
@ -39,9 +41,11 @@
%12 = OpLoad %uint %23 Aligned 4
OpStore %6 %12
%15 = OpLoad %ulong %4
%22 = OpIAdd %ulong %15 %ulong_4
%24 = OpConvertUToPtr %_ptr_Generic_uint %22
%14 = OpLoad %uint %24 Aligned 4
%24 = OpConvertUToPtr %_ptr_Generic_uint %15
%38 = OpBitcast %_ptr_Generic_uchar %24
%39 = OpInBoundsPtrAccessChain %_ptr_Generic_uchar %38 %ulong_4
%22 = OpBitcast %_ptr_Generic_uint %39
%14 = OpLoad %uint %22 Aligned 4
OpStore %7 %14
%17 = OpLoad %uint %6
%18 = OpLoad %uint %7

File diff suppressed because it is too large Load diff

View file

@ -219,11 +219,19 @@ unsafe fn to_str<T>(image: *const T) -> Option<&'static str> {
fn directive_to_kernel(dir: &ast::Directive<ast::ParsedArgParams>) -> Option<(String, Vec<usize>)> {
match dir {
ast::Directive::Method(ast::Function {
func_directive: ast::MethodDecl::Kernel { name, in_args },
..
}) => {
let arg_sizes = in_args
ast::Directive::Method(
_,
ast::Function {
func_directive:
ast::MethodDeclaration {
name: ast::MethodName::Kernel(name),
input_arguments,
..
},
..
},
) => {
let arg_sizes = input_arguments
.iter()
.map(|arg| ast::Type::from(arg.v_type.clone()).size_of())
.collect();