dawn-cmake/test/tint/statements/compound_assign/scalar/modulo.wgsl.expected.spvasm

68 lines
2.5 KiB
Plaintext

; SPIR-V
; Version: 1.3
; Generator: Google Tint Compiler; 0
; Bound: 37
; Schema: 0
OpCapability Shader
OpMemoryModel Logical GLSL450
OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
OpExecutionMode %unused_entry_point LocalSize 1 1 1
OpName %v_block "v_block"
OpMemberName %v_block 0 "inner"
OpName %S "S"
OpMemberName %S 0 "a"
OpName %v "v"
OpName %unused_entry_point "unused_entry_point"
OpName %tint_mod "tint_mod"
OpName %lhs "lhs"
OpName %rhs "rhs"
OpName %foo "foo"
OpDecorate %v_block Block
OpMemberDecorate %v_block 0 Offset 0
OpMemberDecorate %S 0 Offset 0
OpDecorate %v DescriptorSet 0
OpDecorate %v Binding 0
%int = OpTypeInt 32 1
%S = OpTypeStruct %int
%v_block = OpTypeStruct %S
%_ptr_StorageBuffer_v_block = OpTypePointer StorageBuffer %v_block
%v = OpVariable %_ptr_StorageBuffer_v_block StorageBuffer
%void = OpTypeVoid
%6 = OpTypeFunction %void
%10 = OpTypeFunction %int %int %int
%16 = OpConstantNull %int
%bool = OpTypeBool
%int_n2147483648 = OpConstant %int -2147483648
%int_n1 = OpConstant %int -1
%int_1 = OpConstant %int 1
%uint = OpTypeInt 32 0
%uint_0 = OpConstant %uint 0
%_ptr_StorageBuffer_int = OpTypePointer StorageBuffer %int
%int_2 = OpConstant %int 2
%unused_entry_point = OpFunction %void None %6
%9 = OpLabel
OpReturn
OpFunctionEnd
%tint_mod = OpFunction %int None %10
%lhs = OpFunctionParameter %int
%rhs = OpFunctionParameter %int
%14 = OpLabel
%17 = OpIEqual %bool %rhs %16
%20 = OpIEqual %bool %lhs %int_n2147483648
%22 = OpIEqual %bool %rhs %int_n1
%23 = OpLogicalAnd %bool %20 %22
%24 = OpLogicalOr %bool %17 %23
%15 = OpSelect %int %24 %int_1 %rhs
%26 = OpSMod %int %lhs %15
OpReturnValue %26
OpFunctionEnd
%foo = OpFunction %void None %6
%28 = OpLabel
%33 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0 %uint_0
%34 = OpLoad %int %33
%29 = OpFunctionCall %int %tint_mod %34 %int_2
%36 = OpAccessChain %_ptr_StorageBuffer_int %v %uint_0 %uint_0
OpStore %36 %29
OpReturn
OpFunctionEnd