blob: 18be5445a17f4e869b4847efbd0db65b665b8fde [file] [log] [blame]
James Price16eeff32022-03-31 22:30:10 +00001; SPIR-V
2; Version: 1.3
3; Generator: Google Tint Compiler; 0
Ben Clayton46ee6392022-11-09 22:04:11 +00004; Bound: 45
James Price16eeff32022-03-31 22:30:10 +00005; Schema: 0
6 OpCapability Shader
7 OpMemoryModel Logical GLSL450
8 OpEntryPoint GLCompute %unused_entry_point "unused_entry_point"
9 OpExecutionMode %unused_entry_point LocalSize 1 1 1
10 OpName %a "a"
11 OpName %b "b"
12 OpName %c "c"
13 OpName %unused_entry_point "unused_entry_point"
Ben Clayton46ee6392022-11-09 22:04:11 +000014 OpName %tint_div "tint_div"
15 OpName %lhs "lhs"
16 OpName %rhs "rhs"
James Price16eeff32022-03-31 22:30:10 +000017 OpName %foo "foo"
18 %int = OpTypeInt 32 1
19%_ptr_Workgroup_int = OpTypePointer Workgroup %int
20 %a = OpVariable %_ptr_Workgroup_int Workgroup
21 %float = OpTypeFloat 32
22 %v4float = OpTypeVector %float 4
23%_ptr_Workgroup_v4float = OpTypePointer Workgroup %v4float
24 %b = OpVariable %_ptr_Workgroup_v4float Workgroup
25 %v2float = OpTypeVector %float 2
26%mat2v2float = OpTypeMatrix %v2float 2
27%_ptr_Workgroup_mat2v2float = OpTypePointer Workgroup %mat2v2float
28 %c = OpVariable %_ptr_Workgroup_mat2v2float Workgroup
29 %void = OpTypeVoid
30 %12 = OpTypeFunction %void
Ben Clayton46ee6392022-11-09 22:04:11 +000031 %16 = OpTypeFunction %int %int %int
32 %22 = OpConstantNull %int
33 %bool = OpTypeBool
34%int_n2147483648 = OpConstant %int -2147483648
35 %int_n1 = OpConstant %int -1
36 %int_1 = OpConstant %int 1
James Price16eeff32022-03-31 22:30:10 +000037 %int_2 = OpConstant %int 2
38%mat4v4float = OpTypeMatrix %v4float 4
Ben Clayton46ee6392022-11-09 22:04:11 +000039 %40 = OpConstantNull %mat4v4float
James Price16eeff32022-03-31 22:30:10 +000040 %float_2 = OpConstant %float 2
41%unused_entry_point = OpFunction %void None %12
42 %15 = OpLabel
43 OpReturn
44 OpFunctionEnd
Ben Clayton46ee6392022-11-09 22:04:11 +000045 %tint_div = OpFunction %int None %16
46 %lhs = OpFunctionParameter %int
47 %rhs = OpFunctionParameter %int
48 %20 = OpLabel
49 %23 = OpIEqual %bool %rhs %22
50 %26 = OpIEqual %bool %lhs %int_n2147483648
51 %28 = OpIEqual %bool %rhs %int_n1
52 %29 = OpLogicalAnd %bool %26 %28
53 %30 = OpLogicalOr %bool %23 %29
54 %21 = OpSelect %int %30 %int_1 %rhs
55 %32 = OpSDiv %int %lhs %21
56 OpReturnValue %32
57 OpFunctionEnd
James Price16eeff32022-03-31 22:30:10 +000058 %foo = OpFunction %void None %12
Ben Clayton46ee6392022-11-09 22:04:11 +000059 %34 = OpLabel
60 %36 = OpLoad %int %a
61 %35 = OpFunctionCall %int %tint_div %36 %int_2
62 OpStore %a %35
63 %38 = OpLoad %v4float %b
64 %41 = OpVectorTimesMatrix %v4float %38 %40
65 OpStore %b %41
66 %42 = OpLoad %mat2v2float %c
67 %44 = OpMatrixTimesScalar %mat2v2float %42 %float_2
68 OpStore %c %44
James Price16eeff32022-03-31 22:30:10 +000069 OpReturn
70 OpFunctionEnd