blob: 091fb086aff8ba9bacad8fc7ad6330dd295cf904 [file] [log] [blame]
; SPIR-V
; Version: 1.0
; Generator: Khronos SPIR-V Tools Assembler; 0
; Bound: 24
; Schema: 0
OpCapability Float64
OpCapability Addresses
OpCapability Linkage
OpCapability Kernel
%1 = OpExtInstImport "OpenCL.std"
OpMemoryModel Physical32 OpenCL
OpEntryPoint Kernel %2 "fmath_spv" %gl_GlobalInvocationID
OpName %res "res"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %entry "entry"
OpDecorate %7 FuncParamAttr NoCapture
%7 = OpDecorationGroup
OpDecorate %gl_GlobalInvocationID BuiltIn GlobalInvocationId
OpDecorate %gl_GlobalInvocationID Constant
OpDecorate %gl_GlobalInvocationID LinkageAttributes "__spirv_GlobalInvocationId" Import
OpGroupDecorate %7 %res %lhs %rhs
%uint = OpTypeInt 32 0
%v3uint = OpTypeVector %uint 3
%_ptr_Input_v3uint = OpTypePointer Input %v3uint
%void = OpTypeVoid
%double = OpTypeFloat 64
%_ptr_CrossWorkgroup_double = OpTypePointer CrossWorkgroup %double
%15 = OpTypeFunction %void %_ptr_CrossWorkgroup_double %_ptr_CrossWorkgroup_double %_ptr_CrossWorkgroup_double
%gl_GlobalInvocationID = OpVariable %_ptr_Input_v3uint Input
%2 = OpFunction %void None %15
%res = OpFunctionParameter %_ptr_CrossWorkgroup_double
%lhs = OpFunctionParameter %_ptr_CrossWorkgroup_double
%rhs = OpFunctionParameter %_ptr_CrossWorkgroup_double
%entry = OpLabel
%16 = OpLoad %v3uint %gl_GlobalInvocationID Aligned 0
%17 = OpCompositeExtract %uint %16 0
%18 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_double %lhs %17
%19 = OpLoad %double %18 Aligned 8
%20 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_double %rhs %17
%21 = OpLoad %double %20 Aligned 8
%22 = OpFRem %double %19 %21
%23 = OpInBoundsPtrAccessChain %_ptr_CrossWorkgroup_double %res %17
OpStore %23 %22 Aligned 8
OpReturn
OpFunctionEnd