xref: /aosp_15_r20/external/skia/tests/sksl/shared/Overflow.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               OpName %_entrypoint_v "_entrypoint_v"
10               OpName %main "main"
11               OpName %hugeH "hugeH"
12               OpName %hugeF "hugeF"
13               OpName %hugeI "hugeI"
14               OpName %hugeU "hugeU"
15               OpName %hugeS "hugeS"
16               OpName %hugeUS "hugeUS"
17               OpName %hugeNI "hugeNI"
18               OpName %hugeNS "hugeNS"
19               OpName %hugeIvec "hugeIvec"
20               OpName %hugeUvec "hugeUvec"
21               OpName %hugeMxM "hugeMxM"
22               OpName %hugeMxV "hugeMxV"
23               OpName %hugeVxM "hugeVxM"
24               OpDecorate %sk_FragColor RelaxedPrecision
25               OpDecorate %sk_FragColor Location 0
26               OpDecorate %sk_FragColor Index 0
27               OpMemberDecorate %_UniformBuffer 0 Offset 0
28               OpMemberDecorate %_UniformBuffer 0 RelaxedPrecision
29               OpDecorate %_UniformBuffer Block
30               OpDecorate %7 Binding 0
31               OpDecorate %7 DescriptorSet 0
32               OpDecorate %hugeH RelaxedPrecision
33               OpDecorate %27 RelaxedPrecision
34               OpDecorate %28 RelaxedPrecision
35               OpDecorate %29 RelaxedPrecision
36               OpDecorate %30 RelaxedPrecision
37               OpDecorate %31 RelaxedPrecision
38               OpDecorate %32 RelaxedPrecision
39               OpDecorate %33 RelaxedPrecision
40               OpDecorate %34 RelaxedPrecision
41               OpDecorate %35 RelaxedPrecision
42               OpDecorate %36 RelaxedPrecision
43               OpDecorate %37 RelaxedPrecision
44               OpDecorate %hugeS RelaxedPrecision
45               OpDecorate %101 RelaxedPrecision
46               OpDecorate %102 RelaxedPrecision
47               OpDecorate %103 RelaxedPrecision
48               OpDecorate %104 RelaxedPrecision
49               OpDecorate %105 RelaxedPrecision
50               OpDecorate %106 RelaxedPrecision
51               OpDecorate %107 RelaxedPrecision
52               OpDecorate %108 RelaxedPrecision
53               OpDecorate %109 RelaxedPrecision
54               OpDecorate %110 RelaxedPrecision
55               OpDecorate %111 RelaxedPrecision
56               OpDecorate %112 RelaxedPrecision
57               OpDecorate %113 RelaxedPrecision
58               OpDecorate %114 RelaxedPrecision
59               OpDecorate %115 RelaxedPrecision
60               OpDecorate %116 RelaxedPrecision
61               OpDecorate %117 RelaxedPrecision
62               OpDecorate %hugeUS RelaxedPrecision
63               OpDecorate %120 RelaxedPrecision
64               OpDecorate %121 RelaxedPrecision
65               OpDecorate %122 RelaxedPrecision
66               OpDecorate %123 RelaxedPrecision
67               OpDecorate %124 RelaxedPrecision
68               OpDecorate %125 RelaxedPrecision
69               OpDecorate %126 RelaxedPrecision
70               OpDecorate %127 RelaxedPrecision
71               OpDecorate %128 RelaxedPrecision
72               OpDecorate %129 RelaxedPrecision
73               OpDecorate %130 RelaxedPrecision
74               OpDecorate %131 RelaxedPrecision
75               OpDecorate %132 RelaxedPrecision
76               OpDecorate %133 RelaxedPrecision
77               OpDecorate %134 RelaxedPrecision
78               OpDecorate %135 RelaxedPrecision
79               OpDecorate %hugeNS RelaxedPrecision
80               OpDecorate %159 RelaxedPrecision
81               OpDecorate %160 RelaxedPrecision
82               OpDecorate %161 RelaxedPrecision
83               OpDecorate %162 RelaxedPrecision
84               OpDecorate %163 RelaxedPrecision
85               OpDecorate %164 RelaxedPrecision
86               OpDecorate %165 RelaxedPrecision
87               OpDecorate %166 RelaxedPrecision
88               OpDecorate %167 RelaxedPrecision
89               OpDecorate %168 RelaxedPrecision
90               OpDecorate %169 RelaxedPrecision
91               OpDecorate %170 RelaxedPrecision
92               OpDecorate %171 RelaxedPrecision
93               OpDecorate %172 RelaxedPrecision
94               OpDecorate %173 RelaxedPrecision
95               OpDecorate %174 RelaxedPrecision
96               OpDecorate %229 RelaxedPrecision
97               OpDecorate %232 RelaxedPrecision
98               OpDecorate %234 RelaxedPrecision
99               OpDecorate %236 RelaxedPrecision
100               OpDecorate %237 RelaxedPrecision
101               OpDecorate %239 RelaxedPrecision
102               OpDecorate %240 RelaxedPrecision
103               OpDecorate %242 RelaxedPrecision
104               OpDecorate %243 RelaxedPrecision
105               OpDecorate %245 RelaxedPrecision
106               OpDecorate %246 RelaxedPrecision
107               OpDecorate %248 RelaxedPrecision
108               OpDecorate %249 RelaxedPrecision
109               OpDecorate %251 RelaxedPrecision
110               OpDecorate %252 RelaxedPrecision
111               OpDecorate %255 RelaxedPrecision
112               OpDecorate %257 RelaxedPrecision
113               OpDecorate %259 RelaxedPrecision
114               OpDecorate %261 RelaxedPrecision
115               OpDecorate %262 RelaxedPrecision
116               OpDecorate %265 RelaxedPrecision
117               OpDecorate %268 RelaxedPrecision
118               OpDecorate %270 RelaxedPrecision
119               OpDecorate %272 RelaxedPrecision
120               OpDecorate %274 RelaxedPrecision
121               OpDecorate %275 RelaxedPrecision
122               OpDecorate %276 RelaxedPrecision
123               OpDecorate %280 RelaxedPrecision
124               OpDecorate %282 RelaxedPrecision
125               OpDecorate %284 RelaxedPrecision
126      %float = OpTypeFloat 32
127    %v4float = OpTypeVector %float 4
128%_ptr_Output_v4float = OpTypePointer Output %v4float
129%sk_FragColor = OpVariable %_ptr_Output_v4float Output
130%_UniformBuffer = OpTypeStruct %v4float
131%_ptr_Uniform__UniformBuffer = OpTypePointer Uniform %_UniformBuffer
132          %7 = OpVariable %_ptr_Uniform__UniformBuffer Uniform
133       %void = OpTypeVoid
134         %12 = OpTypeFunction %void
135    %float_0 = OpConstant %float 0
136    %v2float = OpTypeVector %float 2
137         %16 = OpConstantComposite %v2float %float_0 %float_0
138%_ptr_Function_v2float = OpTypePointer Function %v2float
139         %20 = OpTypeFunction %v4float %_ptr_Function_v2float
140%_ptr_Function_float = OpTypePointer Function %float
141%float_9_99999962e_35 = OpConstant %float 9.99999962e+35
142%float_1e_09 = OpConstant %float 1e+09
143        %int = OpTypeInt 32 1
144%_ptr_Function_int = OpTypePointer Function %int
145%int_1073741824 = OpConstant %int 1073741824
146      %int_2 = OpConstant %int 2
147       %uint = OpTypeInt 32 0
148%_ptr_Function_uint = OpTypePointer Function %uint
149%uint_2147483648 = OpConstant %uint 2147483648
150     %uint_2 = OpConstant %uint 2
151  %int_16384 = OpConstant %int 16384
152 %uint_32768 = OpConstant %uint 32768
153%int_n2147483648 = OpConstant %int -2147483648
154 %int_n32768 = OpConstant %int -32768
155      %v4int = OpTypeVector %int 4
156%_ptr_Function_v4int = OpTypePointer Function %v4int
157        %178 = OpConstantComposite %v4int %int_1073741824 %int_1073741824 %int_1073741824 %int_1073741824
158        %179 = OpConstantComposite %v4int %int_2 %int_2 %int_2 %int_2
159     %v4uint = OpTypeVector %uint 4
160%_ptr_Function_v4uint = OpTypePointer Function %v4uint
161        %198 = OpConstantComposite %v4uint %uint_2147483648 %uint_2147483648 %uint_2147483648 %uint_2147483648
162        %199 = OpConstantComposite %v4uint %uint_2 %uint_2 %uint_2 %uint_2
163%mat4v4float = OpTypeMatrix %v4float 4
164%_ptr_Function_mat4v4float = OpTypePointer Function %mat4v4float
165%float_1_00000002e_20 = OpConstant %float 1.00000002e+20
166        %218 = OpConstantComposite %v4float %float_1_00000002e_20 %float_1_00000002e_20 %float_1_00000002e_20 %float_1_00000002e_20
167        %219 = OpConstantComposite %mat4v4float %218 %218 %218 %218
168%_ptr_Function_v4float = OpTypePointer Function %v4float
169%_ptr_Uniform_v4float = OpTypePointer Uniform %v4float
170      %int_0 = OpConstant %int 0
171    %float_1 = OpConstant %float 1
172        %263 = OpConstantComposite %v4float %float_0 %float_0 %float_0 %float_0
173        %264 = OpConstantComposite %v4float %float_1 %float_1 %float_1 %float_1
174%_entrypoint_v = OpFunction %void None %12
175         %13 = OpLabel
176         %17 = OpVariable %_ptr_Function_v2float Function
177               OpStore %17 %16
178         %19 = OpFunctionCall %v4float %main %17
179               OpStore %sk_FragColor %19
180               OpReturn
181               OpFunctionEnd
182       %main = OpFunction %v4float None %20
183         %21 = OpFunctionParameter %_ptr_Function_v2float
184         %22 = OpLabel
185      %hugeH = OpVariable %_ptr_Function_float Function
186      %hugeF = OpVariable %_ptr_Function_float Function
187      %hugeI = OpVariable %_ptr_Function_int Function
188      %hugeU = OpVariable %_ptr_Function_uint Function
189      %hugeS = OpVariable %_ptr_Function_int Function
190     %hugeUS = OpVariable %_ptr_Function_uint Function
191     %hugeNI = OpVariable %_ptr_Function_int Function
192     %hugeNS = OpVariable %_ptr_Function_int Function
193   %hugeIvec = OpVariable %_ptr_Function_v4int Function
194   %hugeUvec = OpVariable %_ptr_Function_v4uint Function
195    %hugeMxM = OpVariable %_ptr_Function_mat4v4float Function
196    %hugeMxV = OpVariable %_ptr_Function_v4float Function
197    %hugeVxM = OpVariable %_ptr_Function_v4float Function
198         %27 = OpFMul %float %float_9_99999962e_35 %float_1e_09
199         %28 = OpFMul %float %27 %float_1e_09
200         %29 = OpFMul %float %28 %float_1e_09
201         %30 = OpFMul %float %29 %float_1e_09
202         %31 = OpFMul %float %30 %float_1e_09
203         %32 = OpFMul %float %31 %float_1e_09
204         %33 = OpFMul %float %32 %float_1e_09
205         %34 = OpFMul %float %33 %float_1e_09
206         %35 = OpFMul %float %34 %float_1e_09
207         %36 = OpFMul %float %35 %float_1e_09
208         %37 = OpFMul %float %36 %float_1e_09
209               OpStore %hugeH %37
210         %39 = OpFMul %float %float_9_99999962e_35 %float_1e_09
211         %40 = OpFMul %float %39 %float_1e_09
212         %41 = OpFMul %float %40 %float_1e_09
213         %42 = OpFMul %float %41 %float_1e_09
214         %43 = OpFMul %float %42 %float_1e_09
215         %44 = OpFMul %float %43 %float_1e_09
216         %45 = OpFMul %float %44 %float_1e_09
217         %46 = OpFMul %float %45 %float_1e_09
218         %47 = OpFMul %float %46 %float_1e_09
219         %48 = OpFMul %float %47 %float_1e_09
220         %49 = OpFMul %float %48 %float_1e_09
221               OpStore %hugeF %49
222         %55 = OpIMul %int %int_1073741824 %int_2
223         %56 = OpIMul %int %55 %int_2
224         %57 = OpIMul %int %56 %int_2
225         %58 = OpIMul %int %57 %int_2
226         %59 = OpIMul %int %58 %int_2
227         %60 = OpIMul %int %59 %int_2
228         %61 = OpIMul %int %60 %int_2
229         %62 = OpIMul %int %61 %int_2
230         %63 = OpIMul %int %62 %int_2
231         %64 = OpIMul %int %63 %int_2
232         %65 = OpIMul %int %64 %int_2
233         %66 = OpIMul %int %65 %int_2
234         %67 = OpIMul %int %66 %int_2
235         %68 = OpIMul %int %67 %int_2
236         %69 = OpIMul %int %68 %int_2
237         %70 = OpIMul %int %69 %int_2
238         %71 = OpIMul %int %70 %int_2
239         %72 = OpIMul %int %71 %int_2
240         %73 = OpIMul %int %72 %int_2
241         %74 = OpIMul %int %73 %int_2
242               OpStore %hugeI %74
243         %80 = OpIMul %uint %uint_2147483648 %uint_2
244         %81 = OpIMul %uint %80 %uint_2
245         %82 = OpIMul %uint %81 %uint_2
246         %83 = OpIMul %uint %82 %uint_2
247         %84 = OpIMul %uint %83 %uint_2
248         %85 = OpIMul %uint %84 %uint_2
249         %86 = OpIMul %uint %85 %uint_2
250         %87 = OpIMul %uint %86 %uint_2
251         %88 = OpIMul %uint %87 %uint_2
252         %89 = OpIMul %uint %88 %uint_2
253         %90 = OpIMul %uint %89 %uint_2
254         %91 = OpIMul %uint %90 %uint_2
255         %92 = OpIMul %uint %91 %uint_2
256         %93 = OpIMul %uint %92 %uint_2
257         %94 = OpIMul %uint %93 %uint_2
258         %95 = OpIMul %uint %94 %uint_2
259         %96 = OpIMul %uint %95 %uint_2
260         %97 = OpIMul %uint %96 %uint_2
261         %98 = OpIMul %uint %97 %uint_2
262               OpStore %hugeU %98
263        %101 = OpIMul %int %int_16384 %int_2
264        %102 = OpIMul %int %101 %int_2
265        %103 = OpIMul %int %102 %int_2
266        %104 = OpIMul %int %103 %int_2
267        %105 = OpIMul %int %104 %int_2
268        %106 = OpIMul %int %105 %int_2
269        %107 = OpIMul %int %106 %int_2
270        %108 = OpIMul %int %107 %int_2
271        %109 = OpIMul %int %108 %int_2
272        %110 = OpIMul %int %109 %int_2
273        %111 = OpIMul %int %110 %int_2
274        %112 = OpIMul %int %111 %int_2
275        %113 = OpIMul %int %112 %int_2
276        %114 = OpIMul %int %113 %int_2
277        %115 = OpIMul %int %114 %int_2
278        %116 = OpIMul %int %115 %int_2
279        %117 = OpIMul %int %116 %int_2
280               OpStore %hugeS %117
281        %120 = OpIMul %uint %uint_32768 %uint_2
282        %121 = OpIMul %uint %120 %uint_2
283        %122 = OpIMul %uint %121 %uint_2
284        %123 = OpIMul %uint %122 %uint_2
285        %124 = OpIMul %uint %123 %uint_2
286        %125 = OpIMul %uint %124 %uint_2
287        %126 = OpIMul %uint %125 %uint_2
288        %127 = OpIMul %uint %126 %uint_2
289        %128 = OpIMul %uint %127 %uint_2
290        %129 = OpIMul %uint %128 %uint_2
291        %130 = OpIMul %uint %129 %uint_2
292        %131 = OpIMul %uint %130 %uint_2
293        %132 = OpIMul %uint %131 %uint_2
294        %133 = OpIMul %uint %132 %uint_2
295        %134 = OpIMul %uint %133 %uint_2
296        %135 = OpIMul %uint %134 %uint_2
297               OpStore %hugeUS %135
298        %138 = OpIMul %int %int_n2147483648 %int_2
299        %139 = OpIMul %int %138 %int_2
300        %140 = OpIMul %int %139 %int_2
301        %141 = OpIMul %int %140 %int_2
302        %142 = OpIMul %int %141 %int_2
303        %143 = OpIMul %int %142 %int_2
304        %144 = OpIMul %int %143 %int_2
305        %145 = OpIMul %int %144 %int_2
306        %146 = OpIMul %int %145 %int_2
307        %147 = OpIMul %int %146 %int_2
308        %148 = OpIMul %int %147 %int_2
309        %149 = OpIMul %int %148 %int_2
310        %150 = OpIMul %int %149 %int_2
311        %151 = OpIMul %int %150 %int_2
312        %152 = OpIMul %int %151 %int_2
313        %153 = OpIMul %int %152 %int_2
314        %154 = OpIMul %int %153 %int_2
315        %155 = OpIMul %int %154 %int_2
316        %156 = OpIMul %int %155 %int_2
317               OpStore %hugeNI %156
318        %159 = OpIMul %int %int_n32768 %int_2
319        %160 = OpIMul %int %159 %int_2
320        %161 = OpIMul %int %160 %int_2
321        %162 = OpIMul %int %161 %int_2
322        %163 = OpIMul %int %162 %int_2
323        %164 = OpIMul %int %163 %int_2
324        %165 = OpIMul %int %164 %int_2
325        %166 = OpIMul %int %165 %int_2
326        %167 = OpIMul %int %166 %int_2
327        %168 = OpIMul %int %167 %int_2
328        %169 = OpIMul %int %168 %int_2
329        %170 = OpIMul %int %169 %int_2
330        %171 = OpIMul %int %170 %int_2
331        %172 = OpIMul %int %171 %int_2
332        %173 = OpIMul %int %172 %int_2
333        %174 = OpIMul %int %173 %int_2
334               OpStore %hugeNS %174
335        %180 = OpIMul %v4int %178 %179
336        %181 = OpIMul %v4int %180 %179
337        %182 = OpIMul %v4int %181 %179
338        %183 = OpIMul %v4int %182 %179
339        %184 = OpIMul %v4int %183 %179
340        %185 = OpIMul %v4int %184 %179
341        %186 = OpIMul %v4int %185 %179
342        %187 = OpIMul %v4int %186 %179
343        %188 = OpIMul %v4int %187 %179
344        %189 = OpIMul %v4int %188 %179
345        %190 = OpIMul %v4int %189 %179
346        %191 = OpIMul %v4int %190 %179
347        %192 = OpIMul %v4int %191 %179
348        %193 = OpIMul %v4int %192 %179
349        %194 = OpIMul %v4int %193 %179
350               OpStore %hugeIvec %194
351        %200 = OpIMul %v4uint %198 %199
352        %201 = OpIMul %v4uint %200 %199
353        %202 = OpIMul %v4uint %201 %199
354        %203 = OpIMul %v4uint %202 %199
355        %204 = OpIMul %v4uint %203 %199
356        %205 = OpIMul %v4uint %204 %199
357        %206 = OpIMul %v4uint %205 %199
358        %207 = OpIMul %v4uint %206 %199
359        %208 = OpIMul %v4uint %207 %199
360        %209 = OpIMul %v4uint %208 %199
361        %210 = OpIMul %v4uint %209 %199
362        %211 = OpIMul %v4uint %210 %199
363        %212 = OpIMul %v4uint %211 %199
364        %213 = OpIMul %v4uint %212 %199
365               OpStore %hugeUvec %213
366        %220 = OpMatrixTimesMatrix %mat4v4float %219 %219
367               OpStore %hugeMxM %220
368        %223 = OpMatrixTimesVector %v4float %219 %218
369               OpStore %hugeMxV %223
370        %225 = OpVectorTimesMatrix %v4float %218 %219
371               OpStore %hugeVxM %225
372        %226 = OpAccessChain %_ptr_Uniform_v4float %7 %int_0
373        %229 = OpLoad %v4float %226
374        %230 = OpExtInst %float %1 FClamp %37 %float_0 %float_1
375        %232 = OpVectorTimesScalar %v4float %229 %230
376        %233 = OpExtInst %float %1 FClamp %49 %float_0 %float_1
377        %234 = OpVectorTimesScalar %v4float %232 %233
378        %236 = OpConvertSToF %float %74
379        %235 = OpExtInst %float %1 FClamp %236 %float_0 %float_1
380        %237 = OpVectorTimesScalar %v4float %234 %235
381        %239 = OpConvertUToF %float %98
382        %238 = OpExtInst %float %1 FClamp %239 %float_0 %float_1
383        %240 = OpVectorTimesScalar %v4float %237 %238
384        %242 = OpConvertSToF %float %117
385        %241 = OpExtInst %float %1 FClamp %242 %float_0 %float_1
386        %243 = OpVectorTimesScalar %v4float %240 %241
387        %245 = OpConvertUToF %float %135
388        %244 = OpExtInst %float %1 FClamp %245 %float_0 %float_1
389        %246 = OpVectorTimesScalar %v4float %243 %244
390        %248 = OpConvertSToF %float %156
391        %247 = OpExtInst %float %1 FClamp %248 %float_0 %float_1
392        %249 = OpVectorTimesScalar %v4float %246 %247
393        %251 = OpConvertSToF %float %174
394        %250 = OpExtInst %float %1 FClamp %251 %float_0 %float_1
395        %252 = OpVectorTimesScalar %v4float %249 %250
396        %254 = OpCompositeExtract %int %194 0
397        %255 = OpConvertSToF %float %254
398        %256 = OpCompositeExtract %int %194 1
399        %257 = OpConvertSToF %float %256
400        %258 = OpCompositeExtract %int %194 2
401        %259 = OpConvertSToF %float %258
402        %260 = OpCompositeExtract %int %194 3
403        %261 = OpConvertSToF %float %260
404        %262 = OpCompositeConstruct %v4float %255 %257 %259 %261
405        %253 = OpExtInst %v4float %1 FClamp %262 %263 %264
406        %265 = OpFMul %v4float %252 %253
407        %267 = OpCompositeExtract %uint %213 0
408        %268 = OpConvertUToF %float %267
409        %269 = OpCompositeExtract %uint %213 1
410        %270 = OpConvertUToF %float %269
411        %271 = OpCompositeExtract %uint %213 2
412        %272 = OpConvertUToF %float %271
413        %273 = OpCompositeExtract %uint %213 3
414        %274 = OpConvertUToF %float %273
415        %275 = OpCompositeConstruct %v4float %268 %270 %272 %274
416        %266 = OpExtInst %v4float %1 FClamp %275 %263 %264
417        %276 = OpFMul %v4float %265 %266
418        %278 = OpAccessChain %_ptr_Function_v4float %hugeMxM %int_0
419        %279 = OpLoad %v4float %278
420        %277 = OpExtInst %v4float %1 FClamp %279 %263 %264
421        %280 = OpFMul %v4float %276 %277
422        %281 = OpExtInst %v4float %1 FClamp %223 %263 %264
423        %282 = OpFMul %v4float %280 %281
424        %283 = OpExtInst %v4float %1 FClamp %225 %263 %264
425        %284 = OpFMul %v4float %282 %283
426               OpReturnValue %284
427               OpFunctionEnd
428