xref: /aosp_15_r20/external/skia/tests/sksl/shared/ForLoopMultipleInitES3.asm.frag (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
1               OpCapability Shader
2          %1 = OpExtInstImport "GLSL.std.450"
3               OpMemoryModel Logical GLSL450
4               OpEntryPoint Fragment %_entrypoint_v "_entrypoint" %sk_FragColor
5               OpExecutionMode %_entrypoint_v OriginUpperLeft
6               OpName %sk_FragColor "sk_FragColor"
7               OpName %_UniformBuffer "_UniformBuffer"
8               OpMemberName %_UniformBuffer 0 "colorGreen"
9               OpMemberName %_UniformBuffer 1 "colorRed"
10               OpName %_entrypoint_v "_entrypoint_v"
11               OpName %main "main"
12               OpName %sumA "sumA"
13               OpName %sumB "sumB"
14               OpName %a "a"
15               OpName %b "b"
16               OpName %sumC "sumC"
17               OpName %c "c"
18               OpName %sumE "sumE"
19               OpName %d "d"
20               OpName %e "e"
21               OpDecorate %sk_FragColor RelaxedPrecision
22               OpDecorate %sk_FragColor Location 0
23               OpDecorate %sk_FragColor Index 0
24               OpMemberDecorate %_UniformBuffer 0 Offset 0
25               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
26               OpMemberDecorate %_UniformBuffer 1 Offset 16
27               OpMemberDecorate %_UniformBuffer 1 RelaxedPrecision
28               OpDecorate %_UniformBuffer Block
29               OpDecorate %7 Binding 0
30               OpDecorate %7 DescriptorSet 0
31               OpDecorate %sumA RelaxedPrecision
32               OpDecorate %sumB RelaxedPrecision
33               OpDecorate %a RelaxedPrecision
34               OpDecorate %b RelaxedPrecision
35               OpDecorate %36 RelaxedPrecision
36               OpDecorate %40 RelaxedPrecision
37               OpDecorate %43 RelaxedPrecision
38               OpDecorate %44 RelaxedPrecision
39               OpDecorate %45 RelaxedPrecision
40               OpDecorate %46 RelaxedPrecision
41               OpDecorate %47 RelaxedPrecision
42               OpDecorate %48 RelaxedPrecision
43               OpDecorate %50 RelaxedPrecision
44               OpDecorate %51 RelaxedPrecision
45               OpDecorate %52 RelaxedPrecision
46               OpDecorate %53 RelaxedPrecision
47               OpDecorate %55 RelaxedPrecision
48               OpDecorate %60 RelaxedPrecision
49               OpDecorate %70 RelaxedPrecision
50               OpDecorate %94 RelaxedPrecision
51               OpDecorate %_arr_float_int_2 ArrayStride 16
52               OpDecorate %_arr_float_int_4 ArrayStride 16
53               OpDecorate %131 RelaxedPrecision
54               OpDecorate %143 RelaxedPrecision
55      %float = OpTypeFloat 32
56    %v4float = OpTypeVector %float 4
57%_ptr_Output_v4float = OpTypePointer Output %v4float
58%sk_FragColor = OpVariable %_ptr_Output_v4float Output
59%_UniformBuffer = OpTypeStruct %v4float %v4float
60%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
61          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
62       %void = OpTypeVoid
63         %12 = OpTypeFunction %void
64    %float_0 = OpConstant %float 0
65    %v2float = OpTypeVector %float 2
66         %16 = OpConstantComposite %v2float %float_0 %float_0
67%_ptr_Function_v2float = OpTypePointer Function %v2float
68         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
69%_ptr_Function_float = OpTypePointer Function %float
70   %float_10 = OpConstant %float 10
71       %bool = OpTypeBool
72      %false = OpConstantFalse %bool
73    %float_1 = OpConstant %float 1
74       %true = OpConstantTrue %bool
75   %float_45 = OpConstant %float 45
76   %float_55 = OpConstant %float 55
77%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
78        %int = OpTypeInt 32 1
79      %int_1 = OpConstant %int 1
80%_ptr_Function_int = OpTypePointer Function %int
81      %int_0 = OpConstant %int 0
82     %int_10 = OpConstant %int 10
83     %int_45 = OpConstant %int 45
84      %int_2 = OpConstant %int 2
85%_arr_float_int_2 = OpTypeArray %float %int_2
86%_ptr_Function__arr_float_int_2 = OpTypePointer Function %_arr_float_int_2
87      %int_4 = OpConstant %int 4
88%_arr_float_int_4 = OpTypeArray %float %int_4
89%_ptr_Function__arr_float_int_4 = OpTypePointer Function %_arr_float_int_4
90    %float_2 = OpConstant %float 2
91    %float_3 = OpConstant %float 3
92    %float_4 = OpConstant %float 4
93%_entrypoint_v = OpFunction %void None %12
94         %13 = OpLabel
95         %17 = OpVariable %_ptr_Function_v2float Function
96               OpStore %17 %16
97         %19 = OpFunctionCall %v4float %main %17
98               OpStore %sk_FragColor %19
99               OpReturn
100               OpFunctionEnd
101       %main = OpFunction %v4float None %20
102         %21 = OpFunctionParameter %_ptr_Function_v2float
103         %22 = OpLabel
104       %sumA = OpVariable %_ptr_Function_float Function
105       %sumB = OpVariable %_ptr_Function_float Function
106          %a = OpVariable %_ptr_Function_float Function
107          %b = OpVariable %_ptr_Function_float Function
108       %sumC = OpVariable %_ptr_Function_int Function
109          %c = OpVariable %_ptr_Function_int Function
110       %sumE = OpVariable %_ptr_Function_float Function
111          %d = OpVariable %_ptr_Function__arr_float_int_2 Function
112          %e = OpVariable %_ptr_Function__arr_float_int_4 Function
113               OpStore %sumA %float_0
114               OpStore %sumB %float_0
115               OpStore %a %float_0
116               OpStore %b %float_10
117               OpBranch %29
118         %29 = OpLabel
119               OpLoopMerge %33 %32 None
120               OpBranch %30
121         %30 = OpLabel
122         %36 = OpLoad %float %a
123         %37 = OpFOrdLessThan %bool %36 %float_10
124               OpSelectionMerge %39 None
125               OpBranchConditional %37 %38 %39
126         %38 = OpLabel
127         %40 = OpLoad %float %b
128         %41 = OpFOrdGreaterThan %bool %40 %float_0
129               OpBranch %39
130         %39 = OpLabel
131         %42 = OpPhi %bool %false %30 %41 %38
132               OpBranchConditional %42 %31 %33
133         %31 = OpLabel
134         %43 = OpLoad %float %sumA
135         %44 = OpLoad %float %a
136         %45 = OpFAdd %float %43 %44
137               OpStore %sumA %45
138         %46 = OpLoad %float %sumB
139         %47 = OpLoad %float %b
140         %48 = OpFAdd %float %46 %47
141               OpStore %sumB %48
142               OpBranch %32
143         %32 = OpLabel
144         %50 = OpLoad %float %a
145         %51 = OpFAdd %float %50 %float_1
146               OpStore %a %51
147         %52 = OpLoad %float %b
148         %53 = OpFSub %float %52 %float_1
149               OpStore %b %53
150               OpBranch %29
151         %33 = OpLabel
152         %55 = OpLoad %float %sumA
153         %57 = OpFUnordNotEqual %bool %55 %float_45
154               OpSelectionMerge %59 None
155               OpBranchConditional %57 %59 %58
156         %58 = OpLabel
157         %60 = OpLoad %float %sumB
158         %62 = OpFUnordNotEqual %bool %60 %float_55
159               OpBranch %59
160         %59 = OpLabel
161         %63 = OpPhi %bool %true %33 %62 %58
162               OpSelectionMerge %65 None
163               OpBranchConditional %63 %64 %65
164         %64 = OpLabel
165         %66 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
166         %70 = OpLoad %v4float %66
167               OpReturnValue %70
168         %65 = OpLabel
169               OpStore %sumC %int_0
170               OpStore %c %int_0
171               OpBranch %75
172         %75 = OpLabel
173               OpLoopMerge %79 %78 None
174               OpBranch %76
175         %76 = OpLabel
176         %80 = OpLoad %int %c
177         %82 = OpSLessThan %bool %80 %int_10
178               OpBranchConditional %82 %77 %79
179         %77 = OpLabel
180         %83 = OpLoad %int %sumC
181         %84 = OpLoad %int %c
182         %85 = OpIAdd %int %83 %84
183               OpStore %sumC %85
184               OpBranch %78
185         %78 = OpLabel
186         %86 = OpLoad %int %c
187         %87 = OpIAdd %int %86 %int_1
188               OpStore %c %87
189               OpBranch %75
190         %79 = OpLabel
191         %88 = OpLoad %int %sumC
192         %90 = OpINotEqual %bool %88 %int_45
193               OpSelectionMerge %92 None
194               OpBranchConditional %90 %91 %92
195         %91 = OpLabel
196         %93 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
197         %94 = OpLoad %v4float %93
198               OpReturnValue %94
199         %92 = OpLabel
200               OpStore %sumE %float_0
201        %100 = OpCompositeConstruct %_arr_float_int_2 %float_0 %float_10
202               OpStore %d %100
203        %108 = OpCompositeConstruct %_arr_float_int_4 %float_1 %float_2 %float_3 %float_4
204               OpStore %e %108
205               OpBranch %109
206        %109 = OpLabel
207               OpLoopMerge %113 %112 None
208               OpBranch %110
209        %110 = OpLabel
210        %114 = OpAccessChain %_ptr_Function_float %d %int_0
211        %115 = OpLoad %float %114
212        %116 = OpAccessChain %_ptr_Function_float %d %int_1
213        %117 = OpLoad %float %116
214        %118 = OpFOrdLessThan %bool %115 %117
215               OpBranchConditional %118 %111 %113
216        %111 = OpLabel
217        %119 = OpLoad %float %sumE
218        %120 = OpAccessChain %_ptr_Function_float %e %int_0
219        %121 = OpLoad %float %120
220        %122 = OpFAdd %float %119 %121
221               OpStore %sumE %122
222               OpBranch %112
223        %112 = OpLabel
224        %123 = OpAccessChain %_ptr_Function_float %d %int_0
225        %124 = OpLoad %float %123
226        %125 = OpFAdd %float %124 %float_1
227               OpStore %123 %125
228               OpBranch %109
229        %113 = OpLabel
230        %126 = OpLoad %float %sumE
231        %127 = OpFUnordNotEqual %bool %126 %float_10
232               OpSelectionMerge %129 None
233               OpBranchConditional %127 %128 %129
234        %128 = OpLabel
235        %130 = OpAccessChain %_ptr_Uniform_v4float %7 %int_1
236        %131 = OpLoad %v4float %130
237               OpReturnValue %131
238        %129 = OpLabel
239               OpBranch %132
240        %132 = OpLabel
241               OpLoopMerge %136 %135 None
242               OpBranch %133
243        %133 = OpLabel
244               OpBranch %134
245        %134 = OpLabel
246               OpBranch %136
247        %135 = OpLabel
248               OpBranch %132
249        %136 = OpLabel
250               OpBranch %137
251        %137 = OpLabel
252               OpLoopMerge %141 %140 None
253               OpBranch %138
254        %138 = OpLabel
255               OpBranch %139
256        %139 = OpLabel
257        %142 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
258        %143 = OpLoad %v4float %142
259               OpReturnValue %143
260        %140 = OpLabel
261               OpBranch %137
262        %141 = OpLabel
263               OpUnreachable
264               OpFunctionEnd
265