• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 
2 #include "nir.h"
3 #include "nir_search.h"
4 #include "nir_search_helpers.h"
5 
6 #ifndef NIR_OPT_ALGEBRAIC_STRUCT_DEFS
7 #define NIR_OPT_ALGEBRAIC_STRUCT_DEFS
8 
9 struct transform {
10    const nir_search_expression *search;
11    const nir_search_value *replace;
12    unsigned condition_offset;
13 };
14 
15 #endif
16 
17 
18 static const nir_search_variable search124_0 = {
19    { nir_search_value_variable, 32 },
20    0, /* a */
21    false,
22    nir_type_bool32,
23    NULL,
24 };
25 
26 static const nir_search_constant search124_1 = {
27    { nir_search_value_constant, 0 },
28    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
29 };
30 static const nir_search_expression search124 = {
31    { nir_search_value_expression, 0 },
32    false,
33    nir_op_iand,
34    { &search124_0.value, &search124_1.value },
35    NULL,
36 };
37 
38 static const nir_search_variable replace124_0 = {
39    { nir_search_value_variable, 0 },
40    0, /* a */
41    false,
42    nir_type_invalid,
43    NULL,
44 };
45 static const nir_search_expression replace124 = {
46    { nir_search_value_expression, 0 },
47    false,
48    nir_op_b2f,
49    { &replace124_0.value },
50    NULL,
51 };
52 
53 static const nir_search_variable search135_0 = {
54    { nir_search_value_variable, 0 },
55    0, /* a */
56    false,
57    nir_type_invalid,
58    NULL,
59 };
60 
61 static const nir_search_variable search135_1 = {
62    { nir_search_value_variable, 0 },
63    0, /* a */
64    false,
65    nir_type_invalid,
66    NULL,
67 };
68 static const nir_search_expression search135 = {
69    { nir_search_value_expression, 0 },
70    false,
71    nir_op_iand,
72    { &search135_0.value, &search135_1.value },
73    NULL,
74 };
75 
76 static const nir_search_variable replace135 = {
77    { nir_search_value_variable, 0 },
78    0, /* a */
79    false,
80    nir_type_invalid,
81    NULL,
82 };
83 
84 static const nir_search_variable search136_0 = {
85    { nir_search_value_variable, 0 },
86    0, /* a */
87    false,
88    nir_type_invalid,
89    NULL,
90 };
91 
92 static const nir_search_constant search136_1 = {
93    { nir_search_value_constant, 0 },
94    nir_type_int, { -0x1 /* -1 */ },
95 };
96 static const nir_search_expression search136 = {
97    { nir_search_value_expression, 0 },
98    false,
99    nir_op_iand,
100    { &search136_0.value, &search136_1.value },
101    NULL,
102 };
103 
104 static const nir_search_variable replace136 = {
105    { nir_search_value_variable, 0 },
106    0, /* a */
107    false,
108    nir_type_invalid,
109    NULL,
110 };
111 
112 static const nir_search_variable search137_0 = {
113    { nir_search_value_variable, 0 },
114    0, /* a */
115    false,
116    nir_type_invalid,
117    NULL,
118 };
119 
120 static const nir_search_constant search137_1 = {
121    { nir_search_value_constant, 0 },
122    nir_type_int, { 0x0 /* 0 */ },
123 };
124 static const nir_search_expression search137 = {
125    { nir_search_value_expression, 0 },
126    false,
127    nir_op_iand,
128    { &search137_0.value, &search137_1.value },
129    NULL,
130 };
131 
132 static const nir_search_constant replace137 = {
133    { nir_search_value_constant, 0 },
134    nir_type_int, { 0x0 /* 0 */ },
135 };
136 
137 static const nir_search_variable search145_0_0 = {
138    { nir_search_value_variable, 0 },
139    0, /* a */
140    false,
141    nir_type_invalid,
142    NULL,
143 };
144 static const nir_search_expression search145_0 = {
145    { nir_search_value_expression, 0 },
146    false,
147    nir_op_inot,
148    { &search145_0_0.value },
149    NULL,
150 };
151 
152 static const nir_search_variable search145_1_0 = {
153    { nir_search_value_variable, 0 },
154    1, /* b */
155    false,
156    nir_type_invalid,
157    NULL,
158 };
159 static const nir_search_expression search145_1 = {
160    { nir_search_value_expression, 0 },
161    false,
162    nir_op_inot,
163    { &search145_1_0.value },
164    NULL,
165 };
166 static const nir_search_expression search145 = {
167    { nir_search_value_expression, 0 },
168    false,
169    nir_op_iand,
170    { &search145_0.value, &search145_1.value },
171    NULL,
172 };
173 
174 static const nir_search_variable replace145_0_0 = {
175    { nir_search_value_variable, 0 },
176    0, /* a */
177    false,
178    nir_type_invalid,
179    NULL,
180 };
181 
182 static const nir_search_variable replace145_0_1 = {
183    { nir_search_value_variable, 0 },
184    1, /* b */
185    false,
186    nir_type_invalid,
187    NULL,
188 };
189 static const nir_search_expression replace145_0 = {
190    { nir_search_value_expression, 0 },
191    false,
192    nir_op_ior,
193    { &replace145_0_0.value, &replace145_0_1.value },
194    NULL,
195 };
196 static const nir_search_expression replace145 = {
197    { nir_search_value_expression, 0 },
198    false,
199    nir_op_inot,
200    { &replace145_0.value },
201    NULL,
202 };
203 
204 static const nir_search_constant search153_0 = {
205    { nir_search_value_constant, 0 },
206    nir_type_int, { 0xff /* 255 */ },
207 };
208 
209 static const nir_search_variable search153_1_0 = {
210    { nir_search_value_variable, 0 },
211    0, /* a */
212    false,
213    nir_type_invalid,
214    NULL,
215 };
216 
217 static const nir_search_constant search153_1_1 = {
218    { nir_search_value_constant, 0 },
219    nir_type_int, { 0x18 /* 24 */ },
220 };
221 static const nir_search_expression search153_1 = {
222    { nir_search_value_expression, 32 },
223    false,
224    nir_op_ushr,
225    { &search153_1_0.value, &search153_1_1.value },
226    NULL,
227 };
228 static const nir_search_expression search153 = {
229    { nir_search_value_expression, 0 },
230    false,
231    nir_op_iand,
232    { &search153_0.value, &search153_1.value },
233    NULL,
234 };
235 
236 static const nir_search_variable replace153_0 = {
237    { nir_search_value_variable, 0 },
238    0, /* a */
239    false,
240    nir_type_invalid,
241    NULL,
242 };
243 
244 static const nir_search_constant replace153_1 = {
245    { nir_search_value_constant, 0 },
246    nir_type_int, { 0x18 /* 24 */ },
247 };
248 static const nir_search_expression replace153 = {
249    { nir_search_value_expression, 0 },
250    false,
251    nir_op_ushr,
252    { &replace153_0.value, &replace153_1.value },
253    NULL,
254 };
255 
256 static const nir_search_constant search154_0 = {
257    { nir_search_value_constant, 0 },
258    nir_type_int, { 0xffff /* 65535 */ },
259 };
260 
261 static const nir_search_variable search154_1_0 = {
262    { nir_search_value_variable, 0 },
263    0, /* a */
264    false,
265    nir_type_invalid,
266    NULL,
267 };
268 
269 static const nir_search_constant search154_1_1 = {
270    { nir_search_value_constant, 0 },
271    nir_type_int, { 0x10 /* 16 */ },
272 };
273 static const nir_search_expression search154_1 = {
274    { nir_search_value_expression, 32 },
275    false,
276    nir_op_ushr,
277    { &search154_1_0.value, &search154_1_1.value },
278    NULL,
279 };
280 static const nir_search_expression search154 = {
281    { nir_search_value_expression, 0 },
282    false,
283    nir_op_iand,
284    { &search154_0.value, &search154_1.value },
285    NULL,
286 };
287 
288 static const nir_search_variable replace154_0 = {
289    { nir_search_value_variable, 0 },
290    0, /* a */
291    false,
292    nir_type_invalid,
293    NULL,
294 };
295 
296 static const nir_search_constant replace154_1 = {
297    { nir_search_value_constant, 0 },
298    nir_type_int, { 0x10 /* 16 */ },
299 };
300 static const nir_search_expression replace154 = {
301    { nir_search_value_expression, 0 },
302    false,
303    nir_op_ushr,
304    { &replace154_0.value, &replace154_1.value },
305    NULL,
306 };
307 
308 static const nir_search_constant search206_0 = {
309    { nir_search_value_constant, 0 },
310    nir_type_int, { 0xff /* 255 */ },
311 };
312 
313 static const nir_search_variable search206_1_0 = {
314    { nir_search_value_variable, 0 },
315    0, /* a */
316    false,
317    nir_type_invalid,
318    NULL,
319 };
320 
321 static const nir_search_constant search206_1_1 = {
322    { nir_search_value_constant, 0 },
323    nir_type_int, { 0x10 /* 16 */ },
324 };
325 static const nir_search_expression search206_1 = {
326    { nir_search_value_expression, 0 },
327    false,
328    nir_op_ushr,
329    { &search206_1_0.value, &search206_1_1.value },
330    NULL,
331 };
332 static const nir_search_expression search206 = {
333    { nir_search_value_expression, 0 },
334    false,
335    nir_op_iand,
336    { &search206_0.value, &search206_1.value },
337    NULL,
338 };
339 
340 static const nir_search_variable replace206_0 = {
341    { nir_search_value_variable, 0 },
342    0, /* a */
343    false,
344    nir_type_invalid,
345    NULL,
346 };
347 
348 static const nir_search_constant replace206_1 = {
349    { nir_search_value_constant, 0 },
350    nir_type_int, { 0x2 /* 2 */ },
351 };
352 static const nir_search_expression replace206 = {
353    { nir_search_value_expression, 0 },
354    false,
355    nir_op_extract_u8,
356    { &replace206_0.value, &replace206_1.value },
357    NULL,
358 };
359 
360 static const nir_search_constant search207_0 = {
361    { nir_search_value_constant, 0 },
362    nir_type_int, { 0xff /* 255 */ },
363 };
364 
365 static const nir_search_variable search207_1_0 = {
366    { nir_search_value_variable, 0 },
367    0, /* a */
368    false,
369    nir_type_invalid,
370    NULL,
371 };
372 
373 static const nir_search_constant search207_1_1 = {
374    { nir_search_value_constant, 0 },
375    nir_type_int, { 0x8 /* 8 */ },
376 };
377 static const nir_search_expression search207_1 = {
378    { nir_search_value_expression, 0 },
379    false,
380    nir_op_ushr,
381    { &search207_1_0.value, &search207_1_1.value },
382    NULL,
383 };
384 static const nir_search_expression search207 = {
385    { nir_search_value_expression, 0 },
386    false,
387    nir_op_iand,
388    { &search207_0.value, &search207_1.value },
389    NULL,
390 };
391 
392 static const nir_search_variable replace207_0 = {
393    { nir_search_value_variable, 0 },
394    0, /* a */
395    false,
396    nir_type_invalid,
397    NULL,
398 };
399 
400 static const nir_search_constant replace207_1 = {
401    { nir_search_value_constant, 0 },
402    nir_type_int, { 0x1 /* 1 */ },
403 };
404 static const nir_search_expression replace207 = {
405    { nir_search_value_expression, 0 },
406    false,
407    nir_op_extract_u8,
408    { &replace207_0.value, &replace207_1.value },
409    NULL,
410 };
411 
412 static const nir_search_constant search208_0 = {
413    { nir_search_value_constant, 0 },
414    nir_type_int, { 0xff /* 255 */ },
415 };
416 
417 static const nir_search_variable search208_1 = {
418    { nir_search_value_variable, 0 },
419    0, /* a */
420    false,
421    nir_type_invalid,
422    NULL,
423 };
424 static const nir_search_expression search208 = {
425    { nir_search_value_expression, 0 },
426    false,
427    nir_op_iand,
428    { &search208_0.value, &search208_1.value },
429    NULL,
430 };
431 
432 static const nir_search_variable replace208_0 = {
433    { nir_search_value_variable, 0 },
434    0, /* a */
435    false,
436    nir_type_invalid,
437    NULL,
438 };
439 
440 static const nir_search_constant replace208_1 = {
441    { nir_search_value_constant, 0 },
442    nir_type_int, { 0x0 /* 0 */ },
443 };
444 static const nir_search_expression replace208 = {
445    { nir_search_value_expression, 0 },
446    false,
447    nir_op_extract_u8,
448    { &replace208_0.value, &replace208_1.value },
449    NULL,
450 };
451 
452 static const nir_search_constant search210_0 = {
453    { nir_search_value_constant, 0 },
454    nir_type_int, { 0xffff /* 65535 */ },
455 };
456 
457 static const nir_search_variable search210_1 = {
458    { nir_search_value_variable, 0 },
459    0, /* a */
460    false,
461    nir_type_invalid,
462    NULL,
463 };
464 static const nir_search_expression search210 = {
465    { nir_search_value_expression, 0 },
466    false,
467    nir_op_iand,
468    { &search210_0.value, &search210_1.value },
469    NULL,
470 };
471 
472 static const nir_search_variable replace210_0 = {
473    { nir_search_value_variable, 0 },
474    0, /* a */
475    false,
476    nir_type_invalid,
477    NULL,
478 };
479 
480 static const nir_search_constant replace210_1 = {
481    { nir_search_value_constant, 0 },
482    nir_type_int, { 0x0 /* 0 */ },
483 };
484 static const nir_search_expression replace210 = {
485    { nir_search_value_expression, 0 },
486    false,
487    nir_op_extract_u16,
488    { &replace210_0.value, &replace210_1.value },
489    NULL,
490 };
491 
492 static const nir_search_variable search263_0_0 = {
493    { nir_search_value_variable, 0 },
494    0, /* a */
495    false,
496    nir_type_invalid,
497    NULL,
498 };
499 
500 static const nir_search_variable search263_0_1 = {
501    { nir_search_value_variable, 0 },
502    0, /* a */
503    false,
504    nir_type_invalid,
505    NULL,
506 };
507 static const nir_search_expression search263_0 = {
508    { nir_search_value_expression, 0 },
509    false,
510    nir_op_feq,
511    { &search263_0_0.value, &search263_0_1.value },
512    NULL,
513 };
514 
515 static const nir_search_variable search263_1_0 = {
516    { nir_search_value_variable, 0 },
517    0, /* a */
518    false,
519    nir_type_invalid,
520    NULL,
521 };
522 
523 static const nir_search_variable search263_1_1 = {
524    { nir_search_value_variable, 0 },
525    1, /* b */
526    false,
527    nir_type_invalid,
528    NULL,
529 };
530 static const nir_search_expression search263_1 = {
531    { nir_search_value_expression, 0 },
532    false,
533    nir_op_flt,
534    { &search263_1_0.value, &search263_1_1.value },
535    NULL,
536 };
537 static const nir_search_expression search263 = {
538    { nir_search_value_expression, 0 },
539    false,
540    nir_op_iand,
541    { &search263_0.value, &search263_1.value },
542    NULL,
543 };
544 
545 static const nir_search_variable replace263_0 = {
546    { nir_search_value_variable, 0 },
547    0, /* a */
548    false,
549    nir_type_invalid,
550    NULL,
551 };
552 
553 static const nir_search_variable replace263_1 = {
554    { nir_search_value_variable, 0 },
555    1, /* b */
556    false,
557    nir_type_invalid,
558    NULL,
559 };
560 static const nir_search_expression replace263 = {
561    { nir_search_value_expression, 0 },
562    false,
563    nir_op_flt,
564    { &replace263_0.value, &replace263_1.value },
565    NULL,
566 };
567 
568 static const nir_search_variable search264_0_0 = {
569    { nir_search_value_variable, 0 },
570    0, /* a */
571    false,
572    nir_type_invalid,
573    NULL,
574 };
575 
576 static const nir_search_variable search264_0_1 = {
577    { nir_search_value_variable, 0 },
578    0, /* a */
579    false,
580    nir_type_invalid,
581    NULL,
582 };
583 static const nir_search_expression search264_0 = {
584    { nir_search_value_expression, 0 },
585    false,
586    nir_op_feq,
587    { &search264_0_0.value, &search264_0_1.value },
588    NULL,
589 };
590 
591 static const nir_search_variable search264_1_0 = {
592    { nir_search_value_variable, 0 },
593    1, /* b */
594    false,
595    nir_type_invalid,
596    NULL,
597 };
598 
599 static const nir_search_variable search264_1_1 = {
600    { nir_search_value_variable, 0 },
601    0, /* a */
602    false,
603    nir_type_invalid,
604    NULL,
605 };
606 static const nir_search_expression search264_1 = {
607    { nir_search_value_expression, 0 },
608    false,
609    nir_op_flt,
610    { &search264_1_0.value, &search264_1_1.value },
611    NULL,
612 };
613 static const nir_search_expression search264 = {
614    { nir_search_value_expression, 0 },
615    false,
616    nir_op_iand,
617    { &search264_0.value, &search264_1.value },
618    NULL,
619 };
620 
621 static const nir_search_variable replace264_0 = {
622    { nir_search_value_variable, 0 },
623    1, /* b */
624    false,
625    nir_type_invalid,
626    NULL,
627 };
628 
629 static const nir_search_variable replace264_1 = {
630    { nir_search_value_variable, 0 },
631    0, /* a */
632    false,
633    nir_type_invalid,
634    NULL,
635 };
636 static const nir_search_expression replace264 = {
637    { nir_search_value_expression, 0 },
638    false,
639    nir_op_flt,
640    { &replace264_0.value, &replace264_1.value },
641    NULL,
642 };
643 
644 static const nir_search_variable search265_0_0 = {
645    { nir_search_value_variable, 0 },
646    0, /* a */
647    false,
648    nir_type_invalid,
649    NULL,
650 };
651 
652 static const nir_search_variable search265_0_1 = {
653    { nir_search_value_variable, 0 },
654    0, /* a */
655    false,
656    nir_type_invalid,
657    NULL,
658 };
659 static const nir_search_expression search265_0 = {
660    { nir_search_value_expression, 0 },
661    false,
662    nir_op_feq,
663    { &search265_0_0.value, &search265_0_1.value },
664    NULL,
665 };
666 
667 static const nir_search_variable search265_1_0 = {
668    { nir_search_value_variable, 0 },
669    0, /* a */
670    false,
671    nir_type_invalid,
672    NULL,
673 };
674 
675 static const nir_search_variable search265_1_1 = {
676    { nir_search_value_variable, 0 },
677    1, /* b */
678    false,
679    nir_type_invalid,
680    NULL,
681 };
682 static const nir_search_expression search265_1 = {
683    { nir_search_value_expression, 0 },
684    false,
685    nir_op_fge,
686    { &search265_1_0.value, &search265_1_1.value },
687    NULL,
688 };
689 static const nir_search_expression search265 = {
690    { nir_search_value_expression, 0 },
691    false,
692    nir_op_iand,
693    { &search265_0.value, &search265_1.value },
694    NULL,
695 };
696 
697 static const nir_search_variable replace265_0 = {
698    { nir_search_value_variable, 0 },
699    0, /* a */
700    false,
701    nir_type_invalid,
702    NULL,
703 };
704 
705 static const nir_search_variable replace265_1 = {
706    { nir_search_value_variable, 0 },
707    1, /* b */
708    false,
709    nir_type_invalid,
710    NULL,
711 };
712 static const nir_search_expression replace265 = {
713    { nir_search_value_expression, 0 },
714    false,
715    nir_op_fge,
716    { &replace265_0.value, &replace265_1.value },
717    NULL,
718 };
719 
720 static const nir_search_variable search266_0_0 = {
721    { nir_search_value_variable, 0 },
722    0, /* a */
723    false,
724    nir_type_invalid,
725    NULL,
726 };
727 
728 static const nir_search_variable search266_0_1 = {
729    { nir_search_value_variable, 0 },
730    0, /* a */
731    false,
732    nir_type_invalid,
733    NULL,
734 };
735 static const nir_search_expression search266_0 = {
736    { nir_search_value_expression, 0 },
737    false,
738    nir_op_feq,
739    { &search266_0_0.value, &search266_0_1.value },
740    NULL,
741 };
742 
743 static const nir_search_variable search266_1_0 = {
744    { nir_search_value_variable, 0 },
745    1, /* b */
746    false,
747    nir_type_invalid,
748    NULL,
749 };
750 
751 static const nir_search_variable search266_1_1 = {
752    { nir_search_value_variable, 0 },
753    0, /* a */
754    false,
755    nir_type_invalid,
756    NULL,
757 };
758 static const nir_search_expression search266_1 = {
759    { nir_search_value_expression, 0 },
760    false,
761    nir_op_fge,
762    { &search266_1_0.value, &search266_1_1.value },
763    NULL,
764 };
765 static const nir_search_expression search266 = {
766    { nir_search_value_expression, 0 },
767    false,
768    nir_op_iand,
769    { &search266_0.value, &search266_1.value },
770    NULL,
771 };
772 
773 static const nir_search_variable replace266_0 = {
774    { nir_search_value_variable, 0 },
775    1, /* b */
776    false,
777    nir_type_invalid,
778    NULL,
779 };
780 
781 static const nir_search_variable replace266_1 = {
782    { nir_search_value_variable, 0 },
783    0, /* a */
784    false,
785    nir_type_invalid,
786    NULL,
787 };
788 static const nir_search_expression replace266 = {
789    { nir_search_value_expression, 0 },
790    false,
791    nir_op_fge,
792    { &replace266_0.value, &replace266_1.value },
793    NULL,
794 };
795 
796 static const nir_search_variable search267_0_0 = {
797    { nir_search_value_variable, 0 },
798    0, /* a */
799    false,
800    nir_type_invalid,
801    NULL,
802 };
803 
804 static const nir_search_variable search267_0_1 = {
805    { nir_search_value_variable, 0 },
806    0, /* a */
807    false,
808    nir_type_invalid,
809    NULL,
810 };
811 static const nir_search_expression search267_0 = {
812    { nir_search_value_expression, 0 },
813    false,
814    nir_op_feq,
815    { &search267_0_0.value, &search267_0_1.value },
816    NULL,
817 };
818 
819 static const nir_search_variable search267_1_0 = {
820    { nir_search_value_variable, 0 },
821    0, /* a */
822    false,
823    nir_type_invalid,
824    NULL,
825 };
826 
827 static const nir_search_variable search267_1_1 = {
828    { nir_search_value_variable, 0 },
829    1, /* b */
830    false,
831    nir_type_invalid,
832    NULL,
833 };
834 static const nir_search_expression search267_1 = {
835    { nir_search_value_expression, 0 },
836    false,
837    nir_op_feq,
838    { &search267_1_0.value, &search267_1_1.value },
839    NULL,
840 };
841 static const nir_search_expression search267 = {
842    { nir_search_value_expression, 0 },
843    false,
844    nir_op_iand,
845    { &search267_0.value, &search267_1.value },
846    NULL,
847 };
848 
849 static const nir_search_variable replace267_0 = {
850    { nir_search_value_variable, 0 },
851    0, /* a */
852    false,
853    nir_type_invalid,
854    NULL,
855 };
856 
857 static const nir_search_variable replace267_1 = {
858    { nir_search_value_variable, 0 },
859    1, /* b */
860    false,
861    nir_type_invalid,
862    NULL,
863 };
864 static const nir_search_expression replace267 = {
865    { nir_search_value_expression, 0 },
866    false,
867    nir_op_feq,
868    { &replace267_0.value, &replace267_1.value },
869    NULL,
870 };
871 
872 static const nir_search_variable search268_0_0 = {
873    { nir_search_value_variable, 0 },
874    0, /* a */
875    false,
876    nir_type_invalid,
877    NULL,
878 };
879 
880 static const nir_search_variable search268_0_1 = {
881    { nir_search_value_variable, 0 },
882    0, /* a */
883    false,
884    nir_type_invalid,
885    NULL,
886 };
887 static const nir_search_expression search268_0 = {
888    { nir_search_value_expression, 0 },
889    false,
890    nir_op_feq,
891    { &search268_0_0.value, &search268_0_1.value },
892    NULL,
893 };
894 
895 static const nir_search_variable search268_1_0 = {
896    { nir_search_value_variable, 0 },
897    1, /* b */
898    false,
899    nir_type_invalid,
900    NULL,
901 };
902 
903 static const nir_search_variable search268_1_1 = {
904    { nir_search_value_variable, 0 },
905    0, /* a */
906    false,
907    nir_type_invalid,
908    NULL,
909 };
910 static const nir_search_expression search268_1 = {
911    { nir_search_value_expression, 0 },
912    false,
913    nir_op_feq,
914    { &search268_1_0.value, &search268_1_1.value },
915    NULL,
916 };
917 static const nir_search_expression search268 = {
918    { nir_search_value_expression, 0 },
919    false,
920    nir_op_iand,
921    { &search268_0.value, &search268_1.value },
922    NULL,
923 };
924 
925 static const nir_search_variable replace268_0 = {
926    { nir_search_value_variable, 0 },
927    1, /* b */
928    false,
929    nir_type_invalid,
930    NULL,
931 };
932 
933 static const nir_search_variable replace268_1 = {
934    { nir_search_value_variable, 0 },
935    0, /* a */
936    false,
937    nir_type_invalid,
938    NULL,
939 };
940 static const nir_search_expression replace268 = {
941    { nir_search_value_expression, 0 },
942    false,
943    nir_op_feq,
944    { &replace268_0.value, &replace268_1.value },
945    NULL,
946 };
947 
948 static const struct transform nir_opt_algebraic_iand_xforms[] = {
949    { &search124, &replace124.value, 0 },
950    { &search135, &replace135.value, 0 },
951    { &search136, &replace136.value, 0 },
952    { &search137, &replace137.value, 0 },
953    { &search145, &replace145.value, 0 },
954    { &search153, &replace153.value, 0 },
955    { &search154, &replace154.value, 0 },
956    { &search206, &replace206.value, 17 },
957    { &search207, &replace207.value, 17 },
958    { &search208, &replace208.value, 17 },
959    { &search210, &replace210.value, 18 },
960    { &search263, &replace263.value, 0 },
961    { &search264, &replace264.value, 0 },
962    { &search265, &replace265.value, 0 },
963    { &search266, &replace266.value, 0 },
964    { &search267, &replace267.value, 0 },
965    { &search268, &replace268.value, 0 },
966 };
967 
968 static const nir_search_variable search195_0_0 = {
969    { nir_search_value_variable, 0 },
970    0, /* a */
971    false,
972    nir_type_invalid,
973    NULL,
974 };
975 static const nir_search_expression search195_0 = {
976    { nir_search_value_expression, 0 },
977    false,
978    nir_op_b2i,
979    { &search195_0_0.value },
980    NULL,
981 };
982 static const nir_search_expression search195 = {
983    { nir_search_value_expression, 0 },
984    false,
985    nir_op_i2b,
986    { &search195_0.value },
987    NULL,
988 };
989 
990 static const nir_search_variable replace195 = {
991    { nir_search_value_variable, 0 },
992    0, /* a */
993    false,
994    nir_type_invalid,
995    NULL,
996 };
997 
998 static const nir_search_variable search198_0_0 = {
999    { nir_search_value_variable, 0 },
1000    0, /* a */
1001    false,
1002    nir_type_invalid,
1003    NULL,
1004 };
1005 static const nir_search_expression search198_0 = {
1006    { nir_search_value_expression, 0 },
1007    false,
1008    nir_op_ineg,
1009    { &search198_0_0.value },
1010    NULL,
1011 };
1012 static const nir_search_expression search198 = {
1013    { nir_search_value_expression, 0 },
1014    false,
1015    nir_op_i2b,
1016    { &search198_0.value },
1017    NULL,
1018 };
1019 
1020 static const nir_search_variable replace198_0 = {
1021    { nir_search_value_variable, 0 },
1022    0, /* a */
1023    false,
1024    nir_type_invalid,
1025    NULL,
1026 };
1027 static const nir_search_expression replace198 = {
1028    { nir_search_value_expression, 0 },
1029    false,
1030    nir_op_i2b,
1031    { &replace198_0.value },
1032    NULL,
1033 };
1034 
1035 static const nir_search_variable search199_0_0 = {
1036    { nir_search_value_variable, 0 },
1037    0, /* a */
1038    false,
1039    nir_type_invalid,
1040    NULL,
1041 };
1042 static const nir_search_expression search199_0 = {
1043    { nir_search_value_expression, 0 },
1044    false,
1045    nir_op_iabs,
1046    { &search199_0_0.value },
1047    NULL,
1048 };
1049 static const nir_search_expression search199 = {
1050    { nir_search_value_expression, 0 },
1051    false,
1052    nir_op_i2b,
1053    { &search199_0.value },
1054    NULL,
1055 };
1056 
1057 static const nir_search_variable replace199_0 = {
1058    { nir_search_value_variable, 0 },
1059    0, /* a */
1060    false,
1061    nir_type_invalid,
1062    NULL,
1063 };
1064 static const nir_search_expression replace199 = {
1065    { nir_search_value_expression, 0 },
1066    false,
1067    nir_op_i2b,
1068    { &replace199_0.value },
1069    NULL,
1070 };
1071 
1072 static const struct transform nir_opt_algebraic_i2b_xforms[] = {
1073    { &search195, &replace195.value, 0 },
1074    { &search198, &replace198.value, 0 },
1075    { &search199, &replace199.value, 0 },
1076 };
1077 
1078 static const nir_search_variable search142_0 = {
1079    { nir_search_value_variable, 0 },
1080    0, /* a */
1081    false,
1082    nir_type_invalid,
1083    NULL,
1084 };
1085 
1086 static const nir_search_variable search142_1 = {
1087    { nir_search_value_variable, 0 },
1088    0, /* a */
1089    false,
1090    nir_type_invalid,
1091    NULL,
1092 };
1093 static const nir_search_expression search142 = {
1094    { nir_search_value_expression, 0 },
1095    false,
1096    nir_op_ixor,
1097    { &search142_0.value, &search142_1.value },
1098    NULL,
1099 };
1100 
1101 static const nir_search_constant replace142 = {
1102    { nir_search_value_constant, 0 },
1103    nir_type_int, { 0x0 /* 0 */ },
1104 };
1105 
1106 static const nir_search_variable search143_0 = {
1107    { nir_search_value_variable, 0 },
1108    0, /* a */
1109    false,
1110    nir_type_invalid,
1111    NULL,
1112 };
1113 
1114 static const nir_search_constant search143_1 = {
1115    { nir_search_value_constant, 0 },
1116    nir_type_int, { 0x0 /* 0 */ },
1117 };
1118 static const nir_search_expression search143 = {
1119    { nir_search_value_expression, 0 },
1120    false,
1121    nir_op_ixor,
1122    { &search143_0.value, &search143_1.value },
1123    NULL,
1124 };
1125 
1126 static const nir_search_variable replace143 = {
1127    { nir_search_value_variable, 0 },
1128    0, /* a */
1129    false,
1130    nir_type_invalid,
1131    NULL,
1132 };
1133 
1134 static const struct transform nir_opt_algebraic_ixor_xforms[] = {
1135    { &search142, &replace142.value, 0 },
1136    { &search143, &replace143.value, 0 },
1137 };
1138 
1139 static const nir_search_variable search117_0 = {
1140    { nir_search_value_variable, 0 },
1141    0, /* a */
1142    false,
1143    nir_type_invalid,
1144    NULL,
1145 };
1146 
1147 static const nir_search_variable search117_1 = {
1148    { nir_search_value_variable, 0 },
1149    1, /* b */
1150    false,
1151    nir_type_invalid,
1152    NULL,
1153 };
1154 static const nir_search_expression search117 = {
1155    { nir_search_value_expression, 0 },
1156    false,
1157    nir_op_seq,
1158    { &search117_0.value, &search117_1.value },
1159    NULL,
1160 };
1161 
1162 static const nir_search_variable replace117_0_0 = {
1163    { nir_search_value_variable, 0 },
1164    0, /* a */
1165    false,
1166    nir_type_invalid,
1167    NULL,
1168 };
1169 
1170 static const nir_search_variable replace117_0_1 = {
1171    { nir_search_value_variable, 0 },
1172    1, /* b */
1173    false,
1174    nir_type_invalid,
1175    NULL,
1176 };
1177 static const nir_search_expression replace117_0 = {
1178    { nir_search_value_expression, 0 },
1179    false,
1180    nir_op_feq,
1181    { &replace117_0_0.value, &replace117_0_1.value },
1182    NULL,
1183 };
1184 static const nir_search_expression replace117 = {
1185    { nir_search_value_expression, 0 },
1186    false,
1187    nir_op_b2f,
1188    { &replace117_0.value },
1189    NULL,
1190 };
1191 
1192 static const struct transform nir_opt_algebraic_seq_xforms[] = {
1193    { &search117, &replace117.value, 11 },
1194 };
1195 
1196 static const nir_search_variable search128_0 = {
1197    { nir_search_value_variable, 0 },
1198    0, /* a */
1199    false,
1200    nir_type_invalid,
1201    NULL,
1202 };
1203 
1204 static const nir_search_variable search128_1 = {
1205    { nir_search_value_variable, 0 },
1206    0, /* a */
1207    false,
1208    nir_type_invalid,
1209    NULL,
1210 };
1211 static const nir_search_expression search128 = {
1212    { nir_search_value_expression, 0 },
1213    false,
1214    nir_op_ilt,
1215    { &search128_0.value, &search128_1.value },
1216    NULL,
1217 };
1218 
1219 static const nir_search_constant replace128 = {
1220    { nir_search_value_constant, 32 },
1221    nir_type_bool32, { NIR_FALSE /* False */ },
1222 };
1223 
1224 static const nir_search_variable search277_0_0 = {
1225    { nir_search_value_variable, 0 },
1226    0, /* a */
1227    false,
1228    nir_type_invalid,
1229    NULL,
1230 };
1231 
1232 static const nir_search_variable search277_0_1 = {
1233    { nir_search_value_variable, 0 },
1234    1, /* b */
1235    true,
1236    nir_type_invalid,
1237    NULL,
1238 };
1239 
1240 static const nir_search_variable search277_0_2 = {
1241    { nir_search_value_variable, 0 },
1242    2, /* c */
1243    true,
1244    nir_type_invalid,
1245    NULL,
1246 };
1247 static const nir_search_expression search277_0 = {
1248    { nir_search_value_expression, 0 },
1249    false,
1250    nir_op_bcsel,
1251    { &search277_0_0.value, &search277_0_1.value, &search277_0_2.value },
1252    NULL,
1253 };
1254 
1255 static const nir_search_variable search277_1 = {
1256    { nir_search_value_variable, 0 },
1257    3, /* d */
1258    true,
1259    nir_type_invalid,
1260    NULL,
1261 };
1262 static const nir_search_expression search277 = {
1263    { nir_search_value_expression, 0 },
1264    false,
1265    nir_op_ilt,
1266    { &search277_0.value, &search277_1.value },
1267    NULL,
1268 };
1269 
1270 static const nir_search_variable replace277_0 = {
1271    { nir_search_value_variable, 0 },
1272    0, /* a */
1273    false,
1274    nir_type_invalid,
1275    NULL,
1276 };
1277 
1278 static const nir_search_variable replace277_1_0 = {
1279    { nir_search_value_variable, 0 },
1280    1, /* b */
1281    false,
1282    nir_type_invalid,
1283    NULL,
1284 };
1285 
1286 static const nir_search_variable replace277_1_1 = {
1287    { nir_search_value_variable, 0 },
1288    3, /* d */
1289    false,
1290    nir_type_invalid,
1291    NULL,
1292 };
1293 static const nir_search_expression replace277_1 = {
1294    { nir_search_value_expression, 0 },
1295    false,
1296    nir_op_ilt,
1297    { &replace277_1_0.value, &replace277_1_1.value },
1298    NULL,
1299 };
1300 
1301 static const nir_search_variable replace277_2_0 = {
1302    { nir_search_value_variable, 0 },
1303    2, /* c */
1304    false,
1305    nir_type_invalid,
1306    NULL,
1307 };
1308 
1309 static const nir_search_variable replace277_2_1 = {
1310    { nir_search_value_variable, 0 },
1311    3, /* d */
1312    false,
1313    nir_type_invalid,
1314    NULL,
1315 };
1316 static const nir_search_expression replace277_2 = {
1317    { nir_search_value_expression, 0 },
1318    false,
1319    nir_op_ilt,
1320    { &replace277_2_0.value, &replace277_2_1.value },
1321    NULL,
1322 };
1323 static const nir_search_expression replace277 = {
1324    { nir_search_value_expression, 0 },
1325    false,
1326    nir_op_bcsel,
1327    { &replace277_0.value, &replace277_1.value, &replace277_2.value },
1328    NULL,
1329 };
1330 
1331 static const nir_search_variable search278_0 = {
1332    { nir_search_value_variable, 0 },
1333    0, /* d */
1334    true,
1335    nir_type_invalid,
1336    NULL,
1337 };
1338 
1339 static const nir_search_variable search278_1_0 = {
1340    { nir_search_value_variable, 0 },
1341    1, /* a */
1342    false,
1343    nir_type_invalid,
1344    NULL,
1345 };
1346 
1347 static const nir_search_variable search278_1_1 = {
1348    { nir_search_value_variable, 0 },
1349    2, /* b */
1350    true,
1351    nir_type_invalid,
1352    NULL,
1353 };
1354 
1355 static const nir_search_variable search278_1_2 = {
1356    { nir_search_value_variable, 0 },
1357    3, /* c */
1358    true,
1359    nir_type_invalid,
1360    NULL,
1361 };
1362 static const nir_search_expression search278_1 = {
1363    { nir_search_value_expression, 0 },
1364    false,
1365    nir_op_bcsel,
1366    { &search278_1_0.value, &search278_1_1.value, &search278_1_2.value },
1367    NULL,
1368 };
1369 static const nir_search_expression search278 = {
1370    { nir_search_value_expression, 0 },
1371    false,
1372    nir_op_ilt,
1373    { &search278_0.value, &search278_1.value },
1374    NULL,
1375 };
1376 
1377 static const nir_search_variable replace278_0 = {
1378    { nir_search_value_variable, 0 },
1379    1, /* a */
1380    false,
1381    nir_type_invalid,
1382    NULL,
1383 };
1384 
1385 static const nir_search_variable replace278_1_0 = {
1386    { nir_search_value_variable, 0 },
1387    0, /* d */
1388    false,
1389    nir_type_invalid,
1390    NULL,
1391 };
1392 
1393 static const nir_search_variable replace278_1_1 = {
1394    { nir_search_value_variable, 0 },
1395    2, /* b */
1396    false,
1397    nir_type_invalid,
1398    NULL,
1399 };
1400 static const nir_search_expression replace278_1 = {
1401    { nir_search_value_expression, 0 },
1402    false,
1403    nir_op_ilt,
1404    { &replace278_1_0.value, &replace278_1_1.value },
1405    NULL,
1406 };
1407 
1408 static const nir_search_variable replace278_2_0 = {
1409    { nir_search_value_variable, 0 },
1410    0, /* d */
1411    false,
1412    nir_type_invalid,
1413    NULL,
1414 };
1415 
1416 static const nir_search_variable replace278_2_1 = {
1417    { nir_search_value_variable, 0 },
1418    3, /* c */
1419    false,
1420    nir_type_invalid,
1421    NULL,
1422 };
1423 static const nir_search_expression replace278_2 = {
1424    { nir_search_value_expression, 0 },
1425    false,
1426    nir_op_ilt,
1427    { &replace278_2_0.value, &replace278_2_1.value },
1428    NULL,
1429 };
1430 static const nir_search_expression replace278 = {
1431    { nir_search_value_expression, 0 },
1432    false,
1433    nir_op_bcsel,
1434    { &replace278_0.value, &replace278_1.value, &replace278_2.value },
1435    NULL,
1436 };
1437 
1438 static const struct transform nir_opt_algebraic_ilt_xforms[] = {
1439    { &search128, &replace128.value, 0 },
1440    { &search277, &replace277.value, 0 },
1441    { &search278, &replace278.value, 0 },
1442 };
1443 
1444 static const nir_search_variable search4_0 = {
1445    { nir_search_value_variable, 0 },
1446    0, /* a */
1447    false,
1448    nir_type_invalid,
1449    NULL,
1450 };
1451 
1452 static const nir_search_constant search4_1 = {
1453    { nir_search_value_constant, 0 },
1454    nir_type_int, { 0x1 /* 1 */ },
1455 };
1456 static const nir_search_expression search4 = {
1457    { nir_search_value_expression, 0 },
1458    false,
1459    nir_op_umod,
1460    { &search4_0.value, &search4_1.value },
1461    NULL,
1462 };
1463 
1464 static const nir_search_constant replace4 = {
1465    { nir_search_value_constant, 0 },
1466    nir_type_int, { 0x0 /* 0 */ },
1467 };
1468 
1469 static const nir_search_variable search9_0 = {
1470    { nir_search_value_variable, 0 },
1471    0, /* a */
1472    false,
1473    nir_type_invalid,
1474    NULL,
1475 };
1476 
1477 static const nir_search_variable search9_1 = {
1478    { nir_search_value_variable, 0 },
1479    1, /* b */
1480    true,
1481    nir_type_invalid,
1482    (is_pos_power_of_two),
1483 };
1484 static const nir_search_expression search9 = {
1485    { nir_search_value_expression, 0 },
1486    false,
1487    nir_op_umod,
1488    { &search9_0.value, &search9_1.value },
1489    NULL,
1490 };
1491 
1492 static const nir_search_variable replace9_0 = {
1493    { nir_search_value_variable, 0 },
1494    0, /* a */
1495    false,
1496    nir_type_invalid,
1497    NULL,
1498 };
1499 
1500 static const nir_search_variable replace9_1_0 = {
1501    { nir_search_value_variable, 0 },
1502    1, /* b */
1503    false,
1504    nir_type_invalid,
1505    NULL,
1506 };
1507 
1508 static const nir_search_constant replace9_1_1 = {
1509    { nir_search_value_constant, 0 },
1510    nir_type_int, { 0x1 /* 1 */ },
1511 };
1512 static const nir_search_expression replace9_1 = {
1513    { nir_search_value_expression, 0 },
1514    false,
1515    nir_op_isub,
1516    { &replace9_1_0.value, &replace9_1_1.value },
1517    NULL,
1518 };
1519 static const nir_search_expression replace9 = {
1520    { nir_search_value_expression, 0 },
1521    false,
1522    nir_op_iand,
1523    { &replace9_0.value, &replace9_1.value },
1524    NULL,
1525 };
1526 
1527 static const struct transform nir_opt_algebraic_umod_xforms[] = {
1528    { &search4, &replace4.value, 0 },
1529    { &search9, &replace9.value, 0 },
1530 };
1531 
1532 static const nir_search_variable search0_0 = {
1533    { nir_search_value_variable, 0 },
1534    0, /* a */
1535    false,
1536    nir_type_invalid,
1537    NULL,
1538 };
1539 
1540 static const nir_search_variable search0_1 = {
1541    { nir_search_value_variable, 32 },
1542    1, /* b */
1543    true,
1544    nir_type_invalid,
1545    (is_pos_power_of_two),
1546 };
1547 static const nir_search_expression search0 = {
1548    { nir_search_value_expression, 0 },
1549    false,
1550    nir_op_imul,
1551    { &search0_0.value, &search0_1.value },
1552    NULL,
1553 };
1554 
1555 static const nir_search_variable replace0_0 = {
1556    { nir_search_value_variable, 0 },
1557    0, /* a */
1558    false,
1559    nir_type_invalid,
1560    NULL,
1561 };
1562 
1563 static const nir_search_variable replace0_1_0 = {
1564    { nir_search_value_variable, 0 },
1565    1, /* b */
1566    false,
1567    nir_type_invalid,
1568    NULL,
1569 };
1570 static const nir_search_expression replace0_1 = {
1571    { nir_search_value_expression, 0 },
1572    false,
1573    nir_op_find_lsb,
1574    { &replace0_1_0.value },
1575    NULL,
1576 };
1577 static const nir_search_expression replace0 = {
1578    { nir_search_value_expression, 0 },
1579    false,
1580    nir_op_ishl,
1581    { &replace0_0.value, &replace0_1.value },
1582    NULL,
1583 };
1584 
1585 static const nir_search_variable search1_0 = {
1586    { nir_search_value_variable, 0 },
1587    0, /* a */
1588    false,
1589    nir_type_invalid,
1590    NULL,
1591 };
1592 
1593 static const nir_search_variable search1_1 = {
1594    { nir_search_value_variable, 32 },
1595    1, /* b */
1596    true,
1597    nir_type_invalid,
1598    (is_neg_power_of_two),
1599 };
1600 static const nir_search_expression search1 = {
1601    { nir_search_value_expression, 0 },
1602    false,
1603    nir_op_imul,
1604    { &search1_0.value, &search1_1.value },
1605    NULL,
1606 };
1607 
1608 static const nir_search_variable replace1_0_0 = {
1609    { nir_search_value_variable, 0 },
1610    0, /* a */
1611    false,
1612    nir_type_invalid,
1613    NULL,
1614 };
1615 
1616 static const nir_search_variable replace1_0_1_0_0 = {
1617    { nir_search_value_variable, 0 },
1618    1, /* b */
1619    false,
1620    nir_type_invalid,
1621    NULL,
1622 };
1623 static const nir_search_expression replace1_0_1_0 = {
1624    { nir_search_value_expression, 0 },
1625    false,
1626    nir_op_iabs,
1627    { &replace1_0_1_0_0.value },
1628    NULL,
1629 };
1630 static const nir_search_expression replace1_0_1 = {
1631    { nir_search_value_expression, 0 },
1632    false,
1633    nir_op_find_lsb,
1634    { &replace1_0_1_0.value },
1635    NULL,
1636 };
1637 static const nir_search_expression replace1_0 = {
1638    { nir_search_value_expression, 0 },
1639    false,
1640    nir_op_ishl,
1641    { &replace1_0_0.value, &replace1_0_1.value },
1642    NULL,
1643 };
1644 static const nir_search_expression replace1 = {
1645    { nir_search_value_expression, 0 },
1646    false,
1647    nir_op_ineg,
1648    { &replace1_0.value },
1649    NULL,
1650 };
1651 
1652 static const nir_search_variable search30_0 = {
1653    { nir_search_value_variable, 0 },
1654    0, /* a */
1655    false,
1656    nir_type_invalid,
1657    NULL,
1658 };
1659 
1660 static const nir_search_constant search30_1 = {
1661    { nir_search_value_constant, 0 },
1662    nir_type_int, { 0x0 /* 0 */ },
1663 };
1664 static const nir_search_expression search30 = {
1665    { nir_search_value_expression, 0 },
1666    false,
1667    nir_op_imul,
1668    { &search30_0.value, &search30_1.value },
1669    NULL,
1670 };
1671 
1672 static const nir_search_constant replace30 = {
1673    { nir_search_value_constant, 0 },
1674    nir_type_int, { 0x0 /* 0 */ },
1675 };
1676 
1677 static const nir_search_variable search34_0 = {
1678    { nir_search_value_variable, 0 },
1679    0, /* a */
1680    false,
1681    nir_type_invalid,
1682    NULL,
1683 };
1684 
1685 static const nir_search_constant search34_1 = {
1686    { nir_search_value_constant, 0 },
1687    nir_type_int, { 0x1 /* 1 */ },
1688 };
1689 static const nir_search_expression search34 = {
1690    { nir_search_value_expression, 0 },
1691    false,
1692    nir_op_imul,
1693    { &search34_0.value, &search34_1.value },
1694    NULL,
1695 };
1696 
1697 static const nir_search_variable replace34 = {
1698    { nir_search_value_variable, 0 },
1699    0, /* a */
1700    false,
1701    nir_type_invalid,
1702    NULL,
1703 };
1704 
1705 static const nir_search_variable search36_0 = {
1706    { nir_search_value_variable, 0 },
1707    0, /* a */
1708    false,
1709    nir_type_invalid,
1710    NULL,
1711 };
1712 
1713 static const nir_search_constant search36_1 = {
1714    { nir_search_value_constant, 0 },
1715    nir_type_int, { -0x1 /* -1 */ },
1716 };
1717 static const nir_search_expression search36 = {
1718    { nir_search_value_expression, 0 },
1719    false,
1720    nir_op_imul,
1721    { &search36_0.value, &search36_1.value },
1722    NULL,
1723 };
1724 
1725 static const nir_search_variable replace36_0 = {
1726    { nir_search_value_variable, 0 },
1727    0, /* a */
1728    false,
1729    nir_type_invalid,
1730    NULL,
1731 };
1732 static const nir_search_expression replace36 = {
1733    { nir_search_value_expression, 0 },
1734    false,
1735    nir_op_ineg,
1736    { &replace36_0.value },
1737    NULL,
1738 };
1739 
1740 static const nir_search_variable search121_0_0 = {
1741    { nir_search_value_variable, 0 },
1742    0, /* a */
1743    false,
1744    nir_type_invalid,
1745    NULL,
1746 };
1747 static const nir_search_expression search121_0 = {
1748    { nir_search_value_expression, 0 },
1749    false,
1750    nir_op_b2i,
1751    { &search121_0_0.value },
1752    NULL,
1753 };
1754 
1755 static const nir_search_variable search121_1_0 = {
1756    { nir_search_value_variable, 0 },
1757    1, /* b */
1758    false,
1759    nir_type_invalid,
1760    NULL,
1761 };
1762 static const nir_search_expression search121_1 = {
1763    { nir_search_value_expression, 0 },
1764    false,
1765    nir_op_b2i,
1766    { &search121_1_0.value },
1767    NULL,
1768 };
1769 static const nir_search_expression search121 = {
1770    { nir_search_value_expression, 0 },
1771    false,
1772    nir_op_imul,
1773    { &search121_0.value, &search121_1.value },
1774    NULL,
1775 };
1776 
1777 static const nir_search_variable replace121_0_0 = {
1778    { nir_search_value_variable, 0 },
1779    0, /* a */
1780    false,
1781    nir_type_invalid,
1782    NULL,
1783 };
1784 
1785 static const nir_search_variable replace121_0_1 = {
1786    { nir_search_value_variable, 0 },
1787    1, /* b */
1788    false,
1789    nir_type_invalid,
1790    NULL,
1791 };
1792 static const nir_search_expression replace121_0 = {
1793    { nir_search_value_expression, 0 },
1794    false,
1795    nir_op_iand,
1796    { &replace121_0_0.value, &replace121_0_1.value },
1797    NULL,
1798 };
1799 static const nir_search_expression replace121 = {
1800    { nir_search_value_expression, 0 },
1801    false,
1802    nir_op_b2i,
1803    { &replace121_0.value },
1804    NULL,
1805 };
1806 
1807 static const nir_search_variable search224_0_0 = {
1808    { nir_search_value_variable, 0 },
1809    0, /* a */
1810    false,
1811    nir_type_invalid,
1812    NULL,
1813 };
1814 static const nir_search_expression search224_0 = {
1815    { nir_search_value_expression, 0 },
1816    false,
1817    nir_op_ineg,
1818    { &search224_0_0.value },
1819    NULL,
1820 };
1821 
1822 static const nir_search_variable search224_1 = {
1823    { nir_search_value_variable, 0 },
1824    1, /* b */
1825    false,
1826    nir_type_invalid,
1827    NULL,
1828 };
1829 static const nir_search_expression search224 = {
1830    { nir_search_value_expression, 0 },
1831    false,
1832    nir_op_imul,
1833    { &search224_0.value, &search224_1.value },
1834    NULL,
1835 };
1836 
1837 static const nir_search_variable replace224_0_0 = {
1838    { nir_search_value_variable, 0 },
1839    0, /* a */
1840    false,
1841    nir_type_invalid,
1842    NULL,
1843 };
1844 
1845 static const nir_search_variable replace224_0_1 = {
1846    { nir_search_value_variable, 0 },
1847    1, /* b */
1848    false,
1849    nir_type_invalid,
1850    NULL,
1851 };
1852 static const nir_search_expression replace224_0 = {
1853    { nir_search_value_expression, 0 },
1854    false,
1855    nir_op_imul,
1856    { &replace224_0_0.value, &replace224_0_1.value },
1857    NULL,
1858 };
1859 static const nir_search_expression replace224 = {
1860    { nir_search_value_expression, 0 },
1861    false,
1862    nir_op_ineg,
1863    { &replace224_0.value },
1864    NULL,
1865 };
1866 
1867 static const nir_search_variable search226_0_0 = {
1868    { nir_search_value_variable, 0 },
1869    0, /* a */
1870    false,
1871    nir_type_invalid,
1872    (is_not_const),
1873 };
1874 
1875 static const nir_search_variable search226_0_1 = {
1876    { nir_search_value_variable, 0 },
1877    1, /* b */
1878    false,
1879    nir_type_invalid,
1880    (is_not_const),
1881 };
1882 static const nir_search_expression search226_0 = {
1883    { nir_search_value_expression, 0 },
1884    false,
1885    nir_op_imul,
1886    { &search226_0_0.value, &search226_0_1.value },
1887    (is_used_once),
1888 };
1889 
1890 static const nir_search_variable search226_1 = {
1891    { nir_search_value_variable, 0 },
1892    2, /* c */
1893    true,
1894    nir_type_invalid,
1895    NULL,
1896 };
1897 static const nir_search_expression search226 = {
1898    { nir_search_value_expression, 0 },
1899    false,
1900    nir_op_imul,
1901    { &search226_0.value, &search226_1.value },
1902    (is_used_once),
1903 };
1904 
1905 static const nir_search_variable replace226_0_0 = {
1906    { nir_search_value_variable, 0 },
1907    0, /* a */
1908    false,
1909    nir_type_invalid,
1910    NULL,
1911 };
1912 
1913 static const nir_search_variable replace226_0_1 = {
1914    { nir_search_value_variable, 0 },
1915    2, /* c */
1916    false,
1917    nir_type_invalid,
1918    NULL,
1919 };
1920 static const nir_search_expression replace226_0 = {
1921    { nir_search_value_expression, 0 },
1922    false,
1923    nir_op_imul,
1924    { &replace226_0_0.value, &replace226_0_1.value },
1925    NULL,
1926 };
1927 
1928 static const nir_search_variable replace226_1 = {
1929    { nir_search_value_variable, 0 },
1930    1, /* b */
1931    false,
1932    nir_type_invalid,
1933    NULL,
1934 };
1935 static const nir_search_expression replace226 = {
1936    { nir_search_value_expression, 0 },
1937    false,
1938    nir_op_imul,
1939    { &replace226_0.value, &replace226_1.value },
1940    NULL,
1941 };
1942 
1943 static const nir_search_variable search230_0 = {
1944    { nir_search_value_variable, 0 },
1945    0, /* a */
1946    true,
1947    nir_type_invalid,
1948    NULL,
1949 };
1950 
1951 static const nir_search_variable search230_1_0 = {
1952    { nir_search_value_variable, 0 },
1953    1, /* b */
1954    false,
1955    nir_type_invalid,
1956    NULL,
1957 };
1958 
1959 static const nir_search_variable search230_1_1 = {
1960    { nir_search_value_variable, 0 },
1961    2, /* c */
1962    true,
1963    nir_type_invalid,
1964    NULL,
1965 };
1966 static const nir_search_expression search230_1 = {
1967    { nir_search_value_expression, 0 },
1968    false,
1969    nir_op_imul,
1970    { &search230_1_0.value, &search230_1_1.value },
1971    NULL,
1972 };
1973 static const nir_search_expression search230 = {
1974    { nir_search_value_expression, 0 },
1975    false,
1976    nir_op_imul,
1977    { &search230_0.value, &search230_1.value },
1978    NULL,
1979 };
1980 
1981 static const nir_search_variable replace230_0_0 = {
1982    { nir_search_value_variable, 0 },
1983    0, /* a */
1984    false,
1985    nir_type_invalid,
1986    NULL,
1987 };
1988 
1989 static const nir_search_variable replace230_0_1 = {
1990    { nir_search_value_variable, 0 },
1991    2, /* c */
1992    false,
1993    nir_type_invalid,
1994    NULL,
1995 };
1996 static const nir_search_expression replace230_0 = {
1997    { nir_search_value_expression, 0 },
1998    false,
1999    nir_op_imul,
2000    { &replace230_0_0.value, &replace230_0_1.value },
2001    NULL,
2002 };
2003 
2004 static const nir_search_variable replace230_1 = {
2005    { nir_search_value_variable, 0 },
2006    1, /* b */
2007    false,
2008    nir_type_invalid,
2009    NULL,
2010 };
2011 static const nir_search_expression replace230 = {
2012    { nir_search_value_expression, 0 },
2013    false,
2014    nir_op_imul,
2015    { &replace230_0.value, &replace230_1.value },
2016    NULL,
2017 };
2018 
2019 static const struct transform nir_opt_algebraic_imul_xforms[] = {
2020    { &search0, &replace0.value, 0 },
2021    { &search1, &replace1.value, 0 },
2022    { &search30, &replace30.value, 0 },
2023    { &search34, &replace34.value, 0 },
2024    { &search36, &replace36.value, 0 },
2025    { &search121, &replace121.value, 0 },
2026    { &search224, &replace224.value, 0 },
2027    { &search226, &replace226.value, 0 },
2028    { &search230, &replace230.value, 0 },
2029 };
2030 
2031 static const nir_search_variable search133_0 = {
2032    { nir_search_value_variable, 0 },
2033    0, /* a */
2034    false,
2035    nir_type_invalid,
2036    NULL,
2037 };
2038 
2039 static const nir_search_variable search133_1 = {
2040    { nir_search_value_variable, 0 },
2041    0, /* a */
2042    false,
2043    nir_type_invalid,
2044    NULL,
2045 };
2046 static const nir_search_expression search133 = {
2047    { nir_search_value_expression, 0 },
2048    false,
2049    nir_op_uge,
2050    { &search133_0.value, &search133_1.value },
2051    NULL,
2052 };
2053 
2054 static const nir_search_constant replace133 = {
2055    { nir_search_value_constant, 32 },
2056    nir_type_bool32, { NIR_TRUE /* True */ },
2057 };
2058 
2059 static const nir_search_variable search287_0_0 = {
2060    { nir_search_value_variable, 0 },
2061    0, /* a */
2062    false,
2063    nir_type_invalid,
2064    NULL,
2065 };
2066 
2067 static const nir_search_variable search287_0_1 = {
2068    { nir_search_value_variable, 0 },
2069    1, /* b */
2070    true,
2071    nir_type_invalid,
2072    NULL,
2073 };
2074 
2075 static const nir_search_variable search287_0_2 = {
2076    { nir_search_value_variable, 0 },
2077    2, /* c */
2078    true,
2079    nir_type_invalid,
2080    NULL,
2081 };
2082 static const nir_search_expression search287_0 = {
2083    { nir_search_value_expression, 0 },
2084    false,
2085    nir_op_bcsel,
2086    { &search287_0_0.value, &search287_0_1.value, &search287_0_2.value },
2087    NULL,
2088 };
2089 
2090 static const nir_search_variable search287_1 = {
2091    { nir_search_value_variable, 0 },
2092    3, /* d */
2093    true,
2094    nir_type_invalid,
2095    NULL,
2096 };
2097 static const nir_search_expression search287 = {
2098    { nir_search_value_expression, 0 },
2099    false,
2100    nir_op_uge,
2101    { &search287_0.value, &search287_1.value },
2102    NULL,
2103 };
2104 
2105 static const nir_search_variable replace287_0 = {
2106    { nir_search_value_variable, 0 },
2107    0, /* a */
2108    false,
2109    nir_type_invalid,
2110    NULL,
2111 };
2112 
2113 static const nir_search_variable replace287_1_0 = {
2114    { nir_search_value_variable, 0 },
2115    1, /* b */
2116    false,
2117    nir_type_invalid,
2118    NULL,
2119 };
2120 
2121 static const nir_search_variable replace287_1_1 = {
2122    { nir_search_value_variable, 0 },
2123    3, /* d */
2124    false,
2125    nir_type_invalid,
2126    NULL,
2127 };
2128 static const nir_search_expression replace287_1 = {
2129    { nir_search_value_expression, 0 },
2130    false,
2131    nir_op_uge,
2132    { &replace287_1_0.value, &replace287_1_1.value },
2133    NULL,
2134 };
2135 
2136 static const nir_search_variable replace287_2_0 = {
2137    { nir_search_value_variable, 0 },
2138    2, /* c */
2139    false,
2140    nir_type_invalid,
2141    NULL,
2142 };
2143 
2144 static const nir_search_variable replace287_2_1 = {
2145    { nir_search_value_variable, 0 },
2146    3, /* d */
2147    false,
2148    nir_type_invalid,
2149    NULL,
2150 };
2151 static const nir_search_expression replace287_2 = {
2152    { nir_search_value_expression, 0 },
2153    false,
2154    nir_op_uge,
2155    { &replace287_2_0.value, &replace287_2_1.value },
2156    NULL,
2157 };
2158 static const nir_search_expression replace287 = {
2159    { nir_search_value_expression, 0 },
2160    false,
2161    nir_op_bcsel,
2162    { &replace287_0.value, &replace287_1.value, &replace287_2.value },
2163    NULL,
2164 };
2165 
2166 static const nir_search_variable search288_0 = {
2167    { nir_search_value_variable, 0 },
2168    0, /* d */
2169    true,
2170    nir_type_invalid,
2171    NULL,
2172 };
2173 
2174 static const nir_search_variable search288_1_0 = {
2175    { nir_search_value_variable, 0 },
2176    1, /* a */
2177    false,
2178    nir_type_invalid,
2179    NULL,
2180 };
2181 
2182 static const nir_search_variable search288_1_1 = {
2183    { nir_search_value_variable, 0 },
2184    2, /* b */
2185    true,
2186    nir_type_invalid,
2187    NULL,
2188 };
2189 
2190 static const nir_search_variable search288_1_2 = {
2191    { nir_search_value_variable, 0 },
2192    3, /* c */
2193    true,
2194    nir_type_invalid,
2195    NULL,
2196 };
2197 static const nir_search_expression search288_1 = {
2198    { nir_search_value_expression, 0 },
2199    false,
2200    nir_op_bcsel,
2201    { &search288_1_0.value, &search288_1_1.value, &search288_1_2.value },
2202    NULL,
2203 };
2204 static const nir_search_expression search288 = {
2205    { nir_search_value_expression, 0 },
2206    false,
2207    nir_op_uge,
2208    { &search288_0.value, &search288_1.value },
2209    NULL,
2210 };
2211 
2212 static const nir_search_variable replace288_0 = {
2213    { nir_search_value_variable, 0 },
2214    1, /* a */
2215    false,
2216    nir_type_invalid,
2217    NULL,
2218 };
2219 
2220 static const nir_search_variable replace288_1_0 = {
2221    { nir_search_value_variable, 0 },
2222    0, /* d */
2223    false,
2224    nir_type_invalid,
2225    NULL,
2226 };
2227 
2228 static const nir_search_variable replace288_1_1 = {
2229    { nir_search_value_variable, 0 },
2230    2, /* b */
2231    false,
2232    nir_type_invalid,
2233    NULL,
2234 };
2235 static const nir_search_expression replace288_1 = {
2236    { nir_search_value_expression, 0 },
2237    false,
2238    nir_op_uge,
2239    { &replace288_1_0.value, &replace288_1_1.value },
2240    NULL,
2241 };
2242 
2243 static const nir_search_variable replace288_2_0 = {
2244    { nir_search_value_variable, 0 },
2245    0, /* d */
2246    false,
2247    nir_type_invalid,
2248    NULL,
2249 };
2250 
2251 static const nir_search_variable replace288_2_1 = {
2252    { nir_search_value_variable, 0 },
2253    3, /* c */
2254    false,
2255    nir_type_invalid,
2256    NULL,
2257 };
2258 static const nir_search_expression replace288_2 = {
2259    { nir_search_value_expression, 0 },
2260    false,
2261    nir_op_uge,
2262    { &replace288_2_0.value, &replace288_2_1.value },
2263    NULL,
2264 };
2265 static const nir_search_expression replace288 = {
2266    { nir_search_value_expression, 0 },
2267    false,
2268    nir_op_bcsel,
2269    { &replace288_0.value, &replace288_1.value, &replace288_2.value },
2270    NULL,
2271 };
2272 
2273 static const struct transform nir_opt_algebraic_uge_xforms[] = {
2274    { &search133, &replace133.value, 0 },
2275    { &search287, &replace287.value, 0 },
2276    { &search288, &replace288.value, 0 },
2277 };
2278 
2279 static const nir_search_variable search11_0_0 = {
2280    { nir_search_value_variable, 0 },
2281    0, /* a */
2282    false,
2283    nir_type_invalid,
2284    NULL,
2285 };
2286 static const nir_search_expression search11_0 = {
2287    { nir_search_value_expression, 0 },
2288    false,
2289    nir_op_ineg,
2290    { &search11_0_0.value },
2291    NULL,
2292 };
2293 static const nir_search_expression search11 = {
2294    { nir_search_value_expression, 0 },
2295    false,
2296    nir_op_ineg,
2297    { &search11_0.value },
2298    NULL,
2299 };
2300 
2301 static const nir_search_variable replace11 = {
2302    { nir_search_value_variable, 0 },
2303    0, /* a */
2304    false,
2305    nir_type_invalid,
2306    NULL,
2307 };
2308 
2309 static const nir_search_variable search125_0_0 = {
2310    { nir_search_value_variable, 0 },
2311    0, /* a */
2312    false,
2313    nir_type_invalid,
2314    NULL,
2315 };
2316 static const nir_search_expression search125_0 = {
2317    { nir_search_value_expression, 32 },
2318    false,
2319    nir_op_b2i,
2320    { &search125_0_0.value },
2321    NULL,
2322 };
2323 static const nir_search_expression search125 = {
2324    { nir_search_value_expression, 0 },
2325    false,
2326    nir_op_ineg,
2327    { &search125_0.value },
2328    NULL,
2329 };
2330 
2331 static const nir_search_variable replace125 = {
2332    { nir_search_value_variable, 0 },
2333    0, /* a */
2334    false,
2335    nir_type_invalid,
2336    NULL,
2337 };
2338 
2339 static const nir_search_variable search218_0 = {
2340    { nir_search_value_variable, 0 },
2341    0, /* a */
2342    false,
2343    nir_type_invalid,
2344    NULL,
2345 };
2346 static const nir_search_expression search218 = {
2347    { nir_search_value_expression, 0 },
2348    false,
2349    nir_op_ineg,
2350    { &search218_0.value },
2351    NULL,
2352 };
2353 
2354 static const nir_search_constant replace218_0 = {
2355    { nir_search_value_constant, 0 },
2356    nir_type_int, { 0x0 /* 0 */ },
2357 };
2358 
2359 static const nir_search_variable replace218_1 = {
2360    { nir_search_value_variable, 0 },
2361    0, /* a */
2362    false,
2363    nir_type_invalid,
2364    NULL,
2365 };
2366 static const nir_search_expression replace218 = {
2367    { nir_search_value_expression, 0 },
2368    false,
2369    nir_op_isub,
2370    { &replace218_0.value, &replace218_1.value },
2371    NULL,
2372 };
2373 
2374 static const struct transform nir_opt_algebraic_ineg_xforms[] = {
2375    { &search11, &replace11.value, 0 },
2376    { &search125, &replace125.value, 0 },
2377    { &search218, &replace218.value, 20 },
2378 };
2379 
2380 static const nir_search_variable search29_0 = {
2381    { nir_search_value_variable, 0 },
2382    0, /* a */
2383    false,
2384    nir_type_invalid,
2385    NULL,
2386 };
2387 
2388 static const nir_search_constant search29_1 = {
2389    { nir_search_value_constant, 0 },
2390    nir_type_float, { 0x0 /* 0.0 */ },
2391 };
2392 static const nir_search_expression search29 = {
2393    { nir_search_value_expression, 0 },
2394    true,
2395    nir_op_fmul,
2396    { &search29_0.value, &search29_1.value },
2397    NULL,
2398 };
2399 
2400 static const nir_search_constant replace29 = {
2401    { nir_search_value_constant, 0 },
2402    nir_type_float, { 0x0 /* 0.0 */ },
2403 };
2404 
2405 static const nir_search_variable search33_0 = {
2406    { nir_search_value_variable, 0 },
2407    0, /* a */
2408    false,
2409    nir_type_invalid,
2410    NULL,
2411 };
2412 
2413 static const nir_search_constant search33_1 = {
2414    { nir_search_value_constant, 0 },
2415    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
2416 };
2417 static const nir_search_expression search33 = {
2418    { nir_search_value_expression, 0 },
2419    false,
2420    nir_op_fmul,
2421    { &search33_0.value, &search33_1.value },
2422    NULL,
2423 };
2424 
2425 static const nir_search_variable replace33 = {
2426    { nir_search_value_variable, 0 },
2427    0, /* a */
2428    false,
2429    nir_type_invalid,
2430    NULL,
2431 };
2432 
2433 static const nir_search_variable search35_0 = {
2434    { nir_search_value_variable, 0 },
2435    0, /* a */
2436    false,
2437    nir_type_invalid,
2438    NULL,
2439 };
2440 
2441 static const nir_search_constant search35_1 = {
2442    { nir_search_value_constant, 0 },
2443    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
2444 };
2445 static const nir_search_expression search35 = {
2446    { nir_search_value_expression, 0 },
2447    false,
2448    nir_op_fmul,
2449    { &search35_0.value, &search35_1.value },
2450    NULL,
2451 };
2452 
2453 static const nir_search_variable replace35_0 = {
2454    { nir_search_value_variable, 0 },
2455    0, /* a */
2456    false,
2457    nir_type_invalid,
2458    NULL,
2459 };
2460 static const nir_search_expression replace35 = {
2461    { nir_search_value_expression, 0 },
2462    false,
2463    nir_op_fneg,
2464    { &replace35_0.value },
2465    NULL,
2466 };
2467 
2468 static const nir_search_variable search122_0_0 = {
2469    { nir_search_value_variable, 0 },
2470    0, /* a */
2471    false,
2472    nir_type_invalid,
2473    NULL,
2474 };
2475 static const nir_search_expression search122_0 = {
2476    { nir_search_value_expression, 0 },
2477    false,
2478    nir_op_b2f,
2479    { &search122_0_0.value },
2480    NULL,
2481 };
2482 
2483 static const nir_search_variable search122_1_0 = {
2484    { nir_search_value_variable, 0 },
2485    1, /* b */
2486    false,
2487    nir_type_invalid,
2488    NULL,
2489 };
2490 static const nir_search_expression search122_1 = {
2491    { nir_search_value_expression, 0 },
2492    false,
2493    nir_op_b2f,
2494    { &search122_1_0.value },
2495    NULL,
2496 };
2497 static const nir_search_expression search122 = {
2498    { nir_search_value_expression, 0 },
2499    false,
2500    nir_op_fmul,
2501    { &search122_0.value, &search122_1.value },
2502    NULL,
2503 };
2504 
2505 static const nir_search_variable replace122_0_0 = {
2506    { nir_search_value_variable, 0 },
2507    0, /* a */
2508    false,
2509    nir_type_invalid,
2510    NULL,
2511 };
2512 
2513 static const nir_search_variable replace122_0_1 = {
2514    { nir_search_value_variable, 0 },
2515    1, /* b */
2516    false,
2517    nir_type_invalid,
2518    NULL,
2519 };
2520 static const nir_search_expression replace122_0 = {
2521    { nir_search_value_expression, 0 },
2522    false,
2523    nir_op_iand,
2524    { &replace122_0_0.value, &replace122_0_1.value },
2525    NULL,
2526 };
2527 static const nir_search_expression replace122 = {
2528    { nir_search_value_expression, 0 },
2529    false,
2530    nir_op_b2f,
2531    { &replace122_0.value },
2532    NULL,
2533 };
2534 
2535 static const nir_search_variable search173_0_0 = {
2536    { nir_search_value_variable, 0 },
2537    0, /* a */
2538    false,
2539    nir_type_invalid,
2540    NULL,
2541 };
2542 static const nir_search_expression search173_0 = {
2543    { nir_search_value_expression, 0 },
2544    false,
2545    nir_op_fexp2,
2546    { &search173_0_0.value },
2547    NULL,
2548 };
2549 
2550 static const nir_search_variable search173_1_0 = {
2551    { nir_search_value_variable, 0 },
2552    1, /* b */
2553    false,
2554    nir_type_invalid,
2555    NULL,
2556 };
2557 static const nir_search_expression search173_1 = {
2558    { nir_search_value_expression, 0 },
2559    false,
2560    nir_op_fexp2,
2561    { &search173_1_0.value },
2562    NULL,
2563 };
2564 static const nir_search_expression search173 = {
2565    { nir_search_value_expression, 0 },
2566    true,
2567    nir_op_fmul,
2568    { &search173_0.value, &search173_1.value },
2569    NULL,
2570 };
2571 
2572 static const nir_search_variable replace173_0_0 = {
2573    { nir_search_value_variable, 0 },
2574    0, /* a */
2575    false,
2576    nir_type_invalid,
2577    NULL,
2578 };
2579 
2580 static const nir_search_variable replace173_0_1 = {
2581    { nir_search_value_variable, 0 },
2582    1, /* b */
2583    false,
2584    nir_type_invalid,
2585    NULL,
2586 };
2587 static const nir_search_expression replace173_0 = {
2588    { nir_search_value_expression, 0 },
2589    false,
2590    nir_op_fadd,
2591    { &replace173_0_0.value, &replace173_0_1.value },
2592    NULL,
2593 };
2594 static const nir_search_expression replace173 = {
2595    { nir_search_value_expression, 0 },
2596    false,
2597    nir_op_fexp2,
2598    { &replace173_0.value },
2599    NULL,
2600 };
2601 
2602 static const nir_search_variable search223_0_0 = {
2603    { nir_search_value_variable, 0 },
2604    0, /* a */
2605    false,
2606    nir_type_invalid,
2607    NULL,
2608 };
2609 static const nir_search_expression search223_0 = {
2610    { nir_search_value_expression, 0 },
2611    false,
2612    nir_op_fneg,
2613    { &search223_0_0.value },
2614    NULL,
2615 };
2616 
2617 static const nir_search_variable search223_1 = {
2618    { nir_search_value_variable, 0 },
2619    1, /* b */
2620    false,
2621    nir_type_invalid,
2622    NULL,
2623 };
2624 static const nir_search_expression search223 = {
2625    { nir_search_value_expression, 0 },
2626    false,
2627    nir_op_fmul,
2628    { &search223_0.value, &search223_1.value },
2629    NULL,
2630 };
2631 
2632 static const nir_search_variable replace223_0_0 = {
2633    { nir_search_value_variable, 0 },
2634    0, /* a */
2635    false,
2636    nir_type_invalid,
2637    NULL,
2638 };
2639 
2640 static const nir_search_variable replace223_0_1 = {
2641    { nir_search_value_variable, 0 },
2642    1, /* b */
2643    false,
2644    nir_type_invalid,
2645    NULL,
2646 };
2647 static const nir_search_expression replace223_0 = {
2648    { nir_search_value_expression, 0 },
2649    false,
2650    nir_op_fmul,
2651    { &replace223_0_0.value, &replace223_0_1.value },
2652    NULL,
2653 };
2654 static const nir_search_expression replace223 = {
2655    { nir_search_value_expression, 0 },
2656    false,
2657    nir_op_fneg,
2658    { &replace223_0.value },
2659    NULL,
2660 };
2661 
2662 static const nir_search_variable search225_0_0 = {
2663    { nir_search_value_variable, 0 },
2664    0, /* a */
2665    false,
2666    nir_type_invalid,
2667    (is_not_const),
2668 };
2669 
2670 static const nir_search_variable search225_0_1 = {
2671    { nir_search_value_variable, 0 },
2672    1, /* b */
2673    false,
2674    nir_type_invalid,
2675    (is_not_const),
2676 };
2677 static const nir_search_expression search225_0 = {
2678    { nir_search_value_expression, 0 },
2679    false,
2680    nir_op_fmul,
2681    { &search225_0_0.value, &search225_0_1.value },
2682    (is_used_once),
2683 };
2684 
2685 static const nir_search_variable search225_1 = {
2686    { nir_search_value_variable, 0 },
2687    2, /* c */
2688    true,
2689    nir_type_invalid,
2690    NULL,
2691 };
2692 static const nir_search_expression search225 = {
2693    { nir_search_value_expression, 0 },
2694    true,
2695    nir_op_fmul,
2696    { &search225_0.value, &search225_1.value },
2697    (is_used_once),
2698 };
2699 
2700 static const nir_search_variable replace225_0_0 = {
2701    { nir_search_value_variable, 0 },
2702    0, /* a */
2703    false,
2704    nir_type_invalid,
2705    NULL,
2706 };
2707 
2708 static const nir_search_variable replace225_0_1 = {
2709    { nir_search_value_variable, 0 },
2710    2, /* c */
2711    false,
2712    nir_type_invalid,
2713    NULL,
2714 };
2715 static const nir_search_expression replace225_0 = {
2716    { nir_search_value_expression, 0 },
2717    false,
2718    nir_op_fmul,
2719    { &replace225_0_0.value, &replace225_0_1.value },
2720    NULL,
2721 };
2722 
2723 static const nir_search_variable replace225_1 = {
2724    { nir_search_value_variable, 0 },
2725    1, /* b */
2726    false,
2727    nir_type_invalid,
2728    NULL,
2729 };
2730 static const nir_search_expression replace225 = {
2731    { nir_search_value_expression, 0 },
2732    false,
2733    nir_op_fmul,
2734    { &replace225_0.value, &replace225_1.value },
2735    NULL,
2736 };
2737 
2738 static const nir_search_variable search229_0 = {
2739    { nir_search_value_variable, 0 },
2740    0, /* a */
2741    true,
2742    nir_type_invalid,
2743    NULL,
2744 };
2745 
2746 static const nir_search_variable search229_1_0 = {
2747    { nir_search_value_variable, 0 },
2748    1, /* b */
2749    false,
2750    nir_type_invalid,
2751    NULL,
2752 };
2753 
2754 static const nir_search_variable search229_1_1 = {
2755    { nir_search_value_variable, 0 },
2756    2, /* c */
2757    true,
2758    nir_type_invalid,
2759    NULL,
2760 };
2761 static const nir_search_expression search229_1 = {
2762    { nir_search_value_expression, 0 },
2763    false,
2764    nir_op_fmul,
2765    { &search229_1_0.value, &search229_1_1.value },
2766    NULL,
2767 };
2768 static const nir_search_expression search229 = {
2769    { nir_search_value_expression, 0 },
2770    true,
2771    nir_op_fmul,
2772    { &search229_0.value, &search229_1.value },
2773    NULL,
2774 };
2775 
2776 static const nir_search_variable replace229_0_0 = {
2777    { nir_search_value_variable, 0 },
2778    0, /* a */
2779    false,
2780    nir_type_invalid,
2781    NULL,
2782 };
2783 
2784 static const nir_search_variable replace229_0_1 = {
2785    { nir_search_value_variable, 0 },
2786    2, /* c */
2787    false,
2788    nir_type_invalid,
2789    NULL,
2790 };
2791 static const nir_search_expression replace229_0 = {
2792    { nir_search_value_expression, 0 },
2793    false,
2794    nir_op_fmul,
2795    { &replace229_0_0.value, &replace229_0_1.value },
2796    NULL,
2797 };
2798 
2799 static const nir_search_variable replace229_1 = {
2800    { nir_search_value_variable, 0 },
2801    1, /* b */
2802    false,
2803    nir_type_invalid,
2804    NULL,
2805 };
2806 static const nir_search_expression replace229 = {
2807    { nir_search_value_expression, 0 },
2808    false,
2809    nir_op_fmul,
2810    { &replace229_0.value, &replace229_1.value },
2811    NULL,
2812 };
2813 
2814 static const struct transform nir_opt_algebraic_fmul_xforms[] = {
2815    { &search29, &replace29.value, 0 },
2816    { &search33, &replace33.value, 0 },
2817    { &search35, &replace35.value, 0 },
2818    { &search122, &replace122.value, 0 },
2819    { &search173, &replace173.value, 0 },
2820    { &search223, &replace223.value, 0 },
2821    { &search225, &replace225.value, 0 },
2822    { &search229, &replace229.value, 0 },
2823 };
2824 
2825 static const nir_search_variable search202_0_0 = {
2826    { nir_search_value_variable, 0 },
2827    0, /* a */
2828    false,
2829    nir_type_invalid,
2830    NULL,
2831 };
2832 
2833 static const nir_search_variable search202_0_1 = {
2834    { nir_search_value_variable, 0 },
2835    1, /* b */
2836    false,
2837    nir_type_invalid,
2838    NULL,
2839 };
2840 static const nir_search_expression search202_0 = {
2841    { nir_search_value_expression, 0 },
2842    false,
2843    nir_op_pack_64_2x32_split,
2844    { &search202_0_0.value, &search202_0_1.value },
2845    NULL,
2846 };
2847 static const nir_search_expression search202 = {
2848    { nir_search_value_expression, 0 },
2849    false,
2850    nir_op_unpack_64_2x32_split_x,
2851    { &search202_0.value },
2852    NULL,
2853 };
2854 
2855 static const nir_search_variable replace202 = {
2856    { nir_search_value_variable, 0 },
2857    0, /* a */
2858    false,
2859    nir_type_invalid,
2860    NULL,
2861 };
2862 
2863 static const struct transform nir_opt_algebraic_unpack_64_2x32_split_x_xforms[] = {
2864    { &search202, &replace202.value, 0 },
2865 };
2866 
2867 static const nir_search_constant search37_0 = {
2868    { nir_search_value_constant, 0 },
2869    nir_type_float, { 0x0 /* 0.0 */ },
2870 };
2871 
2872 static const nir_search_variable search37_1 = {
2873    { nir_search_value_variable, 0 },
2874    0, /* a */
2875    false,
2876    nir_type_invalid,
2877    NULL,
2878 };
2879 
2880 static const nir_search_variable search37_2 = {
2881    { nir_search_value_variable, 0 },
2882    1, /* b */
2883    false,
2884    nir_type_invalid,
2885    NULL,
2886 };
2887 static const nir_search_expression search37 = {
2888    { nir_search_value_expression, 0 },
2889    true,
2890    nir_op_ffma,
2891    { &search37_0.value, &search37_1.value, &search37_2.value },
2892    NULL,
2893 };
2894 
2895 static const nir_search_variable replace37 = {
2896    { nir_search_value_variable, 0 },
2897    1, /* b */
2898    false,
2899    nir_type_invalid,
2900    NULL,
2901 };
2902 
2903 static const nir_search_variable search38_0 = {
2904    { nir_search_value_variable, 0 },
2905    0, /* a */
2906    false,
2907    nir_type_invalid,
2908    NULL,
2909 };
2910 
2911 static const nir_search_constant search38_1 = {
2912    { nir_search_value_constant, 0 },
2913    nir_type_float, { 0x0 /* 0.0 */ },
2914 };
2915 
2916 static const nir_search_variable search38_2 = {
2917    { nir_search_value_variable, 0 },
2918    1, /* b */
2919    false,
2920    nir_type_invalid,
2921    NULL,
2922 };
2923 static const nir_search_expression search38 = {
2924    { nir_search_value_expression, 0 },
2925    true,
2926    nir_op_ffma,
2927    { &search38_0.value, &search38_1.value, &search38_2.value },
2928    NULL,
2929 };
2930 
2931 static const nir_search_variable replace38 = {
2932    { nir_search_value_variable, 0 },
2933    1, /* b */
2934    false,
2935    nir_type_invalid,
2936    NULL,
2937 };
2938 
2939 static const nir_search_variable search39_0 = {
2940    { nir_search_value_variable, 0 },
2941    0, /* a */
2942    false,
2943    nir_type_invalid,
2944    NULL,
2945 };
2946 
2947 static const nir_search_variable search39_1 = {
2948    { nir_search_value_variable, 0 },
2949    1, /* b */
2950    false,
2951    nir_type_invalid,
2952    NULL,
2953 };
2954 
2955 static const nir_search_constant search39_2 = {
2956    { nir_search_value_constant, 0 },
2957    nir_type_float, { 0x0 /* 0.0 */ },
2958 };
2959 static const nir_search_expression search39 = {
2960    { nir_search_value_expression, 0 },
2961    true,
2962    nir_op_ffma,
2963    { &search39_0.value, &search39_1.value, &search39_2.value },
2964    NULL,
2965 };
2966 
2967 static const nir_search_variable replace39_0 = {
2968    { nir_search_value_variable, 0 },
2969    0, /* a */
2970    false,
2971    nir_type_invalid,
2972    NULL,
2973 };
2974 
2975 static const nir_search_variable replace39_1 = {
2976    { nir_search_value_variable, 0 },
2977    1, /* b */
2978    false,
2979    nir_type_invalid,
2980    NULL,
2981 };
2982 static const nir_search_expression replace39 = {
2983    { nir_search_value_expression, 0 },
2984    false,
2985    nir_op_fmul,
2986    { &replace39_0.value, &replace39_1.value },
2987    NULL,
2988 };
2989 
2990 static const nir_search_variable search40_0 = {
2991    { nir_search_value_variable, 0 },
2992    0, /* a */
2993    false,
2994    nir_type_invalid,
2995    NULL,
2996 };
2997 
2998 static const nir_search_constant search40_1 = {
2999    { nir_search_value_constant, 0 },
3000    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
3001 };
3002 
3003 static const nir_search_variable search40_2 = {
3004    { nir_search_value_variable, 0 },
3005    1, /* b */
3006    false,
3007    nir_type_invalid,
3008    NULL,
3009 };
3010 static const nir_search_expression search40 = {
3011    { nir_search_value_expression, 0 },
3012    false,
3013    nir_op_ffma,
3014    { &search40_0.value, &search40_1.value, &search40_2.value },
3015    NULL,
3016 };
3017 
3018 static const nir_search_variable replace40_0 = {
3019    { nir_search_value_variable, 0 },
3020    0, /* a */
3021    false,
3022    nir_type_invalid,
3023    NULL,
3024 };
3025 
3026 static const nir_search_variable replace40_1 = {
3027    { nir_search_value_variable, 0 },
3028    1, /* b */
3029    false,
3030    nir_type_invalid,
3031    NULL,
3032 };
3033 static const nir_search_expression replace40 = {
3034    { nir_search_value_expression, 0 },
3035    false,
3036    nir_op_fadd,
3037    { &replace40_0.value, &replace40_1.value },
3038    NULL,
3039 };
3040 
3041 static const nir_search_constant search41_0 = {
3042    { nir_search_value_constant, 0 },
3043    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
3044 };
3045 
3046 static const nir_search_variable search41_1 = {
3047    { nir_search_value_variable, 0 },
3048    0, /* a */
3049    false,
3050    nir_type_invalid,
3051    NULL,
3052 };
3053 
3054 static const nir_search_variable search41_2 = {
3055    { nir_search_value_variable, 0 },
3056    1, /* b */
3057    false,
3058    nir_type_invalid,
3059    NULL,
3060 };
3061 static const nir_search_expression search41 = {
3062    { nir_search_value_expression, 0 },
3063    false,
3064    nir_op_ffma,
3065    { &search41_0.value, &search41_1.value, &search41_2.value },
3066    NULL,
3067 };
3068 
3069 static const nir_search_variable replace41_0 = {
3070    { nir_search_value_variable, 0 },
3071    0, /* a */
3072    false,
3073    nir_type_invalid,
3074    NULL,
3075 };
3076 
3077 static const nir_search_variable replace41_1 = {
3078    { nir_search_value_variable, 0 },
3079    1, /* b */
3080    false,
3081    nir_type_invalid,
3082    NULL,
3083 };
3084 static const nir_search_expression replace41 = {
3085    { nir_search_value_expression, 0 },
3086    false,
3087    nir_op_fadd,
3088    { &replace41_0.value, &replace41_1.value },
3089    NULL,
3090 };
3091 
3092 static const nir_search_variable search57_0 = {
3093    { nir_search_value_variable, 0 },
3094    0, /* a */
3095    false,
3096    nir_type_invalid,
3097    NULL,
3098 };
3099 
3100 static const nir_search_variable search57_1 = {
3101    { nir_search_value_variable, 0 },
3102    1, /* b */
3103    false,
3104    nir_type_invalid,
3105    NULL,
3106 };
3107 
3108 static const nir_search_variable search57_2 = {
3109    { nir_search_value_variable, 0 },
3110    2, /* c */
3111    false,
3112    nir_type_invalid,
3113    NULL,
3114 };
3115 static const nir_search_expression search57 = {
3116    { nir_search_value_expression, 0 },
3117    false,
3118    nir_op_ffma,
3119    { &search57_0.value, &search57_1.value, &search57_2.value },
3120    NULL,
3121 };
3122 
3123 static const nir_search_variable replace57_0_0 = {
3124    { nir_search_value_variable, 0 },
3125    0, /* a */
3126    false,
3127    nir_type_invalid,
3128    NULL,
3129 };
3130 
3131 static const nir_search_variable replace57_0_1 = {
3132    { nir_search_value_variable, 0 },
3133    1, /* b */
3134    false,
3135    nir_type_invalid,
3136    NULL,
3137 };
3138 static const nir_search_expression replace57_0 = {
3139    { nir_search_value_expression, 0 },
3140    false,
3141    nir_op_fmul,
3142    { &replace57_0_0.value, &replace57_0_1.value },
3143    NULL,
3144 };
3145 
3146 static const nir_search_variable replace57_1 = {
3147    { nir_search_value_variable, 0 },
3148    2, /* c */
3149    false,
3150    nir_type_invalid,
3151    NULL,
3152 };
3153 static const nir_search_expression replace57 = {
3154    { nir_search_value_expression, 0 },
3155    false,
3156    nir_op_fadd,
3157    { &replace57_0.value, &replace57_1.value },
3158    NULL,
3159 };
3160 
3161 static const struct transform nir_opt_algebraic_ffma_xforms[] = {
3162    { &search37, &replace37.value, 0 },
3163    { &search38, &replace38.value, 0 },
3164    { &search39, &replace39.value, 0 },
3165    { &search40, &replace40.value, 0 },
3166    { &search41, &replace41.value, 0 },
3167    { &search57, &replace57.value, 7 },
3168 };
3169 
3170 static const nir_search_variable search83_0 = {
3171    { nir_search_value_variable, 0 },
3172    0, /* a */
3173    false,
3174    nir_type_invalid,
3175    NULL,
3176 };
3177 
3178 static const nir_search_variable search83_1 = {
3179    { nir_search_value_variable, 0 },
3180    0, /* a */
3181    false,
3182    nir_type_invalid,
3183    NULL,
3184 };
3185 static const nir_search_expression search83 = {
3186    { nir_search_value_expression, 0 },
3187    false,
3188    nir_op_umin,
3189    { &search83_0.value, &search83_1.value },
3190    NULL,
3191 };
3192 
3193 static const nir_search_variable replace83 = {
3194    { nir_search_value_variable, 0 },
3195    0, /* a */
3196    false,
3197    nir_type_invalid,
3198    NULL,
3199 };
3200 
3201 static const nir_search_variable search103_0_0_0_0 = {
3202    { nir_search_value_variable, 0 },
3203    0, /* a */
3204    false,
3205    nir_type_invalid,
3206    NULL,
3207 };
3208 
3209 static const nir_search_variable search103_0_0_0_1 = {
3210    { nir_search_value_variable, 0 },
3211    1, /* b */
3212    false,
3213    nir_type_invalid,
3214    NULL,
3215 };
3216 static const nir_search_expression search103_0_0_0 = {
3217    { nir_search_value_expression, 0 },
3218    false,
3219    nir_op_umax,
3220    { &search103_0_0_0_0.value, &search103_0_0_0_1.value },
3221    NULL,
3222 };
3223 
3224 static const nir_search_variable search103_0_0_1 = {
3225    { nir_search_value_variable, 0 },
3226    2, /* c */
3227    false,
3228    nir_type_invalid,
3229    NULL,
3230 };
3231 static const nir_search_expression search103_0_0 = {
3232    { nir_search_value_expression, 0 },
3233    false,
3234    nir_op_umin,
3235    { &search103_0_0_0.value, &search103_0_0_1.value },
3236    NULL,
3237 };
3238 
3239 static const nir_search_variable search103_0_1 = {
3240    { nir_search_value_variable, 0 },
3241    1, /* b */
3242    false,
3243    nir_type_invalid,
3244    NULL,
3245 };
3246 static const nir_search_expression search103_0 = {
3247    { nir_search_value_expression, 0 },
3248    false,
3249    nir_op_umax,
3250    { &search103_0_0.value, &search103_0_1.value },
3251    NULL,
3252 };
3253 
3254 static const nir_search_variable search103_1 = {
3255    { nir_search_value_variable, 0 },
3256    2, /* c */
3257    false,
3258    nir_type_invalid,
3259    NULL,
3260 };
3261 static const nir_search_expression search103 = {
3262    { nir_search_value_expression, 0 },
3263    false,
3264    nir_op_umin,
3265    { &search103_0.value, &search103_1.value },
3266    NULL,
3267 };
3268 
3269 static const nir_search_variable replace103_0_0 = {
3270    { nir_search_value_variable, 0 },
3271    0, /* a */
3272    false,
3273    nir_type_invalid,
3274    NULL,
3275 };
3276 
3277 static const nir_search_variable replace103_0_1 = {
3278    { nir_search_value_variable, 0 },
3279    1, /* b */
3280    false,
3281    nir_type_invalid,
3282    NULL,
3283 };
3284 static const nir_search_expression replace103_0 = {
3285    { nir_search_value_expression, 0 },
3286    false,
3287    nir_op_umax,
3288    { &replace103_0_0.value, &replace103_0_1.value },
3289    NULL,
3290 };
3291 
3292 static const nir_search_variable replace103_1 = {
3293    { nir_search_value_variable, 0 },
3294    2, /* c */
3295    false,
3296    nir_type_invalid,
3297    NULL,
3298 };
3299 static const nir_search_expression replace103 = {
3300    { nir_search_value_expression, 0 },
3301    false,
3302    nir_op_umin,
3303    { &replace103_0.value, &replace103_1.value },
3304    NULL,
3305 };
3306 
3307 static const struct transform nir_opt_algebraic_umin_xforms[] = {
3308    { &search83, &replace83.value, 0 },
3309    { &search103, &replace103.value, 0 },
3310 };
3311 
3312 static const nir_search_variable search84_0 = {
3313    { nir_search_value_variable, 0 },
3314    0, /* a */
3315    false,
3316    nir_type_invalid,
3317    NULL,
3318 };
3319 
3320 static const nir_search_variable search84_1 = {
3321    { nir_search_value_variable, 0 },
3322    0, /* a */
3323    false,
3324    nir_type_invalid,
3325    NULL,
3326 };
3327 static const nir_search_expression search84 = {
3328    { nir_search_value_expression, 0 },
3329    false,
3330    nir_op_umax,
3331    { &search84_0.value, &search84_1.value },
3332    NULL,
3333 };
3334 
3335 static const nir_search_variable replace84 = {
3336    { nir_search_value_variable, 0 },
3337    0, /* a */
3338    false,
3339    nir_type_invalid,
3340    NULL,
3341 };
3342 
3343 static const struct transform nir_opt_algebraic_umax_xforms[] = {
3344    { &search84, &replace84.value, 0 },
3345 };
3346 
3347 static const nir_search_variable search74_0_0 = {
3348    { nir_search_value_variable, 0 },
3349    0, /* b */
3350    false,
3351    nir_type_invalid,
3352    NULL,
3353 };
3354 
3355 static const nir_search_variable search74_0_1 = {
3356    { nir_search_value_variable, 0 },
3357    1, /* a */
3358    false,
3359    nir_type_invalid,
3360    NULL,
3361 };
3362 static const nir_search_expression search74_0 = {
3363    { nir_search_value_expression, 0 },
3364    false,
3365    nir_op_flt,
3366    { &search74_0_0.value, &search74_0_1.value },
3367    NULL,
3368 };
3369 
3370 static const nir_search_variable search74_1 = {
3371    { nir_search_value_variable, 0 },
3372    0, /* b */
3373    false,
3374    nir_type_invalid,
3375    NULL,
3376 };
3377 
3378 static const nir_search_variable search74_2 = {
3379    { nir_search_value_variable, 0 },
3380    1, /* a */
3381    false,
3382    nir_type_invalid,
3383    NULL,
3384 };
3385 static const nir_search_expression search74 = {
3386    { nir_search_value_expression, 0 },
3387    false,
3388    nir_op_bcsel,
3389    { &search74_0.value, &search74_1.value, &search74_2.value },
3390    NULL,
3391 };
3392 
3393 static const nir_search_variable replace74_0 = {
3394    { nir_search_value_variable, 0 },
3395    1, /* a */
3396    false,
3397    nir_type_invalid,
3398    NULL,
3399 };
3400 
3401 static const nir_search_variable replace74_1 = {
3402    { nir_search_value_variable, 0 },
3403    0, /* b */
3404    false,
3405    nir_type_invalid,
3406    NULL,
3407 };
3408 static const nir_search_expression replace74 = {
3409    { nir_search_value_expression, 0 },
3410    false,
3411    nir_op_fmin,
3412    { &replace74_0.value, &replace74_1.value },
3413    NULL,
3414 };
3415 
3416 static const nir_search_variable search75_0_0 = {
3417    { nir_search_value_variable, 0 },
3418    0, /* a */
3419    false,
3420    nir_type_invalid,
3421    NULL,
3422 };
3423 
3424 static const nir_search_variable search75_0_1 = {
3425    { nir_search_value_variable, 0 },
3426    1, /* b */
3427    false,
3428    nir_type_invalid,
3429    NULL,
3430 };
3431 static const nir_search_expression search75_0 = {
3432    { nir_search_value_expression, 0 },
3433    false,
3434    nir_op_flt,
3435    { &search75_0_0.value, &search75_0_1.value },
3436    NULL,
3437 };
3438 
3439 static const nir_search_variable search75_1 = {
3440    { nir_search_value_variable, 0 },
3441    1, /* b */
3442    false,
3443    nir_type_invalid,
3444    NULL,
3445 };
3446 
3447 static const nir_search_variable search75_2 = {
3448    { nir_search_value_variable, 0 },
3449    0, /* a */
3450    false,
3451    nir_type_invalid,
3452    NULL,
3453 };
3454 static const nir_search_expression search75 = {
3455    { nir_search_value_expression, 0 },
3456    false,
3457    nir_op_bcsel,
3458    { &search75_0.value, &search75_1.value, &search75_2.value },
3459    NULL,
3460 };
3461 
3462 static const nir_search_variable replace75_0 = {
3463    { nir_search_value_variable, 0 },
3464    0, /* a */
3465    false,
3466    nir_type_invalid,
3467    NULL,
3468 };
3469 
3470 static const nir_search_variable replace75_1 = {
3471    { nir_search_value_variable, 0 },
3472    1, /* b */
3473    false,
3474    nir_type_invalid,
3475    NULL,
3476 };
3477 static const nir_search_expression replace75 = {
3478    { nir_search_value_expression, 0 },
3479    false,
3480    nir_op_fmax,
3481    { &replace75_0.value, &replace75_1.value },
3482    NULL,
3483 };
3484 
3485 static const nir_search_variable search76_0_0 = {
3486    { nir_search_value_variable, 0 },
3487    0, /* a */
3488    false,
3489    nir_type_invalid,
3490    NULL,
3491 };
3492 static const nir_search_expression search76_0 = {
3493    { nir_search_value_expression, 0 },
3494    false,
3495    nir_op_inot,
3496    { &search76_0_0.value },
3497    NULL,
3498 };
3499 
3500 static const nir_search_variable search76_1 = {
3501    { nir_search_value_variable, 0 },
3502    1, /* b */
3503    false,
3504    nir_type_invalid,
3505    NULL,
3506 };
3507 
3508 static const nir_search_variable search76_2 = {
3509    { nir_search_value_variable, 0 },
3510    2, /* c */
3511    false,
3512    nir_type_invalid,
3513    NULL,
3514 };
3515 static const nir_search_expression search76 = {
3516    { nir_search_value_expression, 0 },
3517    false,
3518    nir_op_bcsel,
3519    { &search76_0.value, &search76_1.value, &search76_2.value },
3520    NULL,
3521 };
3522 
3523 static const nir_search_variable replace76_0 = {
3524    { nir_search_value_variable, 0 },
3525    0, /* a */
3526    false,
3527    nir_type_invalid,
3528    NULL,
3529 };
3530 
3531 static const nir_search_variable replace76_1 = {
3532    { nir_search_value_variable, 0 },
3533    2, /* c */
3534    false,
3535    nir_type_invalid,
3536    NULL,
3537 };
3538 
3539 static const nir_search_variable replace76_2 = {
3540    { nir_search_value_variable, 0 },
3541    1, /* b */
3542    false,
3543    nir_type_invalid,
3544    NULL,
3545 };
3546 static const nir_search_expression replace76 = {
3547    { nir_search_value_expression, 0 },
3548    false,
3549    nir_op_bcsel,
3550    { &replace76_0.value, &replace76_1.value, &replace76_2.value },
3551    NULL,
3552 };
3553 
3554 static const nir_search_variable search77_0 = {
3555    { nir_search_value_variable, 0 },
3556    0, /* a */
3557    false,
3558    nir_type_invalid,
3559    NULL,
3560 };
3561 
3562 static const nir_search_variable search77_1_0 = {
3563    { nir_search_value_variable, 0 },
3564    0, /* a */
3565    false,
3566    nir_type_invalid,
3567    NULL,
3568 };
3569 
3570 static const nir_search_variable search77_1_1 = {
3571    { nir_search_value_variable, 0 },
3572    1, /* b */
3573    false,
3574    nir_type_invalid,
3575    NULL,
3576 };
3577 
3578 static const nir_search_variable search77_1_2 = {
3579    { nir_search_value_variable, 0 },
3580    2, /* c */
3581    false,
3582    nir_type_invalid,
3583    NULL,
3584 };
3585 static const nir_search_expression search77_1 = {
3586    { nir_search_value_expression, 0 },
3587    false,
3588    nir_op_bcsel,
3589    { &search77_1_0.value, &search77_1_1.value, &search77_1_2.value },
3590    NULL,
3591 };
3592 
3593 static const nir_search_variable search77_2 = {
3594    { nir_search_value_variable, 0 },
3595    3, /* d */
3596    false,
3597    nir_type_invalid,
3598    NULL,
3599 };
3600 static const nir_search_expression search77 = {
3601    { nir_search_value_expression, 0 },
3602    false,
3603    nir_op_bcsel,
3604    { &search77_0.value, &search77_1.value, &search77_2.value },
3605    NULL,
3606 };
3607 
3608 static const nir_search_variable replace77_0 = {
3609    { nir_search_value_variable, 0 },
3610    0, /* a */
3611    false,
3612    nir_type_invalid,
3613    NULL,
3614 };
3615 
3616 static const nir_search_variable replace77_1 = {
3617    { nir_search_value_variable, 0 },
3618    1, /* b */
3619    false,
3620    nir_type_invalid,
3621    NULL,
3622 };
3623 
3624 static const nir_search_variable replace77_2 = {
3625    { nir_search_value_variable, 0 },
3626    3, /* d */
3627    false,
3628    nir_type_invalid,
3629    NULL,
3630 };
3631 static const nir_search_expression replace77 = {
3632    { nir_search_value_expression, 0 },
3633    false,
3634    nir_op_bcsel,
3635    { &replace77_0.value, &replace77_1.value, &replace77_2.value },
3636    NULL,
3637 };
3638 
3639 static const nir_search_variable search78_0 = {
3640    { nir_search_value_variable, 0 },
3641    0, /* a */
3642    false,
3643    nir_type_invalid,
3644    NULL,
3645 };
3646 
3647 static const nir_search_constant search78_1 = {
3648    { nir_search_value_constant, 32 },
3649    nir_type_bool32, { NIR_TRUE /* True */ },
3650 };
3651 
3652 static const nir_search_variable search78_2 = {
3653    { nir_search_value_variable, 32 },
3654    1, /* b */
3655    false,
3656    nir_type_bool32,
3657    NULL,
3658 };
3659 static const nir_search_expression search78 = {
3660    { nir_search_value_expression, 0 },
3661    false,
3662    nir_op_bcsel,
3663    { &search78_0.value, &search78_1.value, &search78_2.value },
3664    NULL,
3665 };
3666 
3667 static const nir_search_variable replace78_0 = {
3668    { nir_search_value_variable, 0 },
3669    0, /* a */
3670    false,
3671    nir_type_invalid,
3672    NULL,
3673 };
3674 
3675 static const nir_search_variable replace78_1 = {
3676    { nir_search_value_variable, 0 },
3677    1, /* b */
3678    false,
3679    nir_type_invalid,
3680    NULL,
3681 };
3682 static const nir_search_expression replace78 = {
3683    { nir_search_value_expression, 0 },
3684    false,
3685    nir_op_ior,
3686    { &replace78_0.value, &replace78_1.value },
3687    NULL,
3688 };
3689 
3690 static const nir_search_variable search184_0 = {
3691    { nir_search_value_variable, 0 },
3692    0, /* a */
3693    false,
3694    nir_type_invalid,
3695    NULL,
3696 };
3697 
3698 static const nir_search_constant search184_1 = {
3699    { nir_search_value_constant, 32 },
3700    nir_type_bool32, { NIR_TRUE /* True */ },
3701 };
3702 
3703 static const nir_search_constant search184_2 = {
3704    { nir_search_value_constant, 32 },
3705    nir_type_bool32, { NIR_FALSE /* False */ },
3706 };
3707 static const nir_search_expression search184 = {
3708    { nir_search_value_expression, 0 },
3709    false,
3710    nir_op_bcsel,
3711    { &search184_0.value, &search184_1.value, &search184_2.value },
3712    NULL,
3713 };
3714 
3715 static const nir_search_variable replace184 = {
3716    { nir_search_value_variable, 0 },
3717    0, /* a */
3718    false,
3719    nir_type_invalid,
3720    NULL,
3721 };
3722 
3723 static const nir_search_variable search185_0 = {
3724    { nir_search_value_variable, 0 },
3725    0, /* a */
3726    false,
3727    nir_type_invalid,
3728    NULL,
3729 };
3730 
3731 static const nir_search_constant search185_1 = {
3732    { nir_search_value_constant, 32 },
3733    nir_type_bool32, { NIR_FALSE /* False */ },
3734 };
3735 
3736 static const nir_search_constant search185_2 = {
3737    { nir_search_value_constant, 32 },
3738    nir_type_bool32, { NIR_TRUE /* True */ },
3739 };
3740 static const nir_search_expression search185 = {
3741    { nir_search_value_expression, 0 },
3742    false,
3743    nir_op_bcsel,
3744    { &search185_0.value, &search185_1.value, &search185_2.value },
3745    NULL,
3746 };
3747 
3748 static const nir_search_variable replace185_0 = {
3749    { nir_search_value_variable, 0 },
3750    0, /* a */
3751    false,
3752    nir_type_invalid,
3753    NULL,
3754 };
3755 static const nir_search_expression replace185 = {
3756    { nir_search_value_expression, 0 },
3757    false,
3758    nir_op_inot,
3759    { &replace185_0.value },
3760    NULL,
3761 };
3762 
3763 static const nir_search_variable search186_0 = {
3764    { nir_search_value_variable, 0 },
3765    0, /* a */
3766    false,
3767    nir_type_invalid,
3768    NULL,
3769 };
3770 
3771 static const nir_search_constant search186_1 = {
3772    { nir_search_value_constant, 0 },
3773    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
3774 };
3775 
3776 static const nir_search_constant search186_2 = {
3777    { nir_search_value_constant, 0 },
3778    nir_type_float, { 0x0 /* 0.0 */ },
3779 };
3780 static const nir_search_expression search186 = {
3781    { nir_search_value_expression, 32 },
3782    false,
3783    nir_op_bcsel,
3784    { &search186_0.value, &search186_1.value, &search186_2.value },
3785    NULL,
3786 };
3787 
3788 static const nir_search_variable replace186_0 = {
3789    { nir_search_value_variable, 0 },
3790    0, /* a */
3791    false,
3792    nir_type_invalid,
3793    NULL,
3794 };
3795 static const nir_search_expression replace186 = {
3796    { nir_search_value_expression, 0 },
3797    false,
3798    nir_op_b2f,
3799    { &replace186_0.value },
3800    NULL,
3801 };
3802 
3803 static const nir_search_variable search187_0 = {
3804    { nir_search_value_variable, 0 },
3805    0, /* a */
3806    false,
3807    nir_type_invalid,
3808    NULL,
3809 };
3810 
3811 static const nir_search_constant search187_1 = {
3812    { nir_search_value_constant, 0 },
3813    nir_type_float, { 0x0 /* 0.0 */ },
3814 };
3815 
3816 static const nir_search_constant search187_2 = {
3817    { nir_search_value_constant, 0 },
3818    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
3819 };
3820 static const nir_search_expression search187 = {
3821    { nir_search_value_expression, 32 },
3822    false,
3823    nir_op_bcsel,
3824    { &search187_0.value, &search187_1.value, &search187_2.value },
3825    NULL,
3826 };
3827 
3828 static const nir_search_variable replace187_0_0 = {
3829    { nir_search_value_variable, 0 },
3830    0, /* a */
3831    false,
3832    nir_type_invalid,
3833    NULL,
3834 };
3835 static const nir_search_expression replace187_0 = {
3836    { nir_search_value_expression, 0 },
3837    false,
3838    nir_op_inot,
3839    { &replace187_0_0.value },
3840    NULL,
3841 };
3842 static const nir_search_expression replace187 = {
3843    { nir_search_value_expression, 0 },
3844    false,
3845    nir_op_b2f,
3846    { &replace187_0.value },
3847    NULL,
3848 };
3849 
3850 static const nir_search_variable search188_0 = {
3851    { nir_search_value_variable, 0 },
3852    0, /* a */
3853    false,
3854    nir_type_invalid,
3855    NULL,
3856 };
3857 
3858 static const nir_search_constant search188_1 = {
3859    { nir_search_value_constant, 0 },
3860    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
3861 };
3862 
3863 static const nir_search_constant search188_2 = {
3864    { nir_search_value_constant, 0 },
3865    nir_type_float, { 0x8000000000000000L /* -0.0 */ },
3866 };
3867 static const nir_search_expression search188 = {
3868    { nir_search_value_expression, 32 },
3869    false,
3870    nir_op_bcsel,
3871    { &search188_0.value, &search188_1.value, &search188_2.value },
3872    NULL,
3873 };
3874 
3875 static const nir_search_variable replace188_0_0 = {
3876    { nir_search_value_variable, 0 },
3877    0, /* a */
3878    false,
3879    nir_type_invalid,
3880    NULL,
3881 };
3882 static const nir_search_expression replace188_0 = {
3883    { nir_search_value_expression, 0 },
3884    false,
3885    nir_op_b2f,
3886    { &replace188_0_0.value },
3887    NULL,
3888 };
3889 static const nir_search_expression replace188 = {
3890    { nir_search_value_expression, 0 },
3891    false,
3892    nir_op_fneg,
3893    { &replace188_0.value },
3894    NULL,
3895 };
3896 
3897 static const nir_search_variable search189_0 = {
3898    { nir_search_value_variable, 0 },
3899    0, /* a */
3900    false,
3901    nir_type_invalid,
3902    NULL,
3903 };
3904 
3905 static const nir_search_constant search189_1 = {
3906    { nir_search_value_constant, 0 },
3907    nir_type_float, { 0x8000000000000000L /* -0.0 */ },
3908 };
3909 
3910 static const nir_search_constant search189_2 = {
3911    { nir_search_value_constant, 0 },
3912    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
3913 };
3914 static const nir_search_expression search189 = {
3915    { nir_search_value_expression, 32 },
3916    false,
3917    nir_op_bcsel,
3918    { &search189_0.value, &search189_1.value, &search189_2.value },
3919    NULL,
3920 };
3921 
3922 static const nir_search_variable replace189_0_0_0 = {
3923    { nir_search_value_variable, 0 },
3924    0, /* a */
3925    false,
3926    nir_type_invalid,
3927    NULL,
3928 };
3929 static const nir_search_expression replace189_0_0 = {
3930    { nir_search_value_expression, 0 },
3931    false,
3932    nir_op_inot,
3933    { &replace189_0_0_0.value },
3934    NULL,
3935 };
3936 static const nir_search_expression replace189_0 = {
3937    { nir_search_value_expression, 0 },
3938    false,
3939    nir_op_b2f,
3940    { &replace189_0_0.value },
3941    NULL,
3942 };
3943 static const nir_search_expression replace189 = {
3944    { nir_search_value_expression, 0 },
3945    false,
3946    nir_op_fneg,
3947    { &replace189_0.value },
3948    NULL,
3949 };
3950 
3951 static const nir_search_constant search190_0 = {
3952    { nir_search_value_constant, 32 },
3953    nir_type_bool32, { NIR_TRUE /* True */ },
3954 };
3955 
3956 static const nir_search_variable search190_1 = {
3957    { nir_search_value_variable, 0 },
3958    0, /* b */
3959    false,
3960    nir_type_invalid,
3961    NULL,
3962 };
3963 
3964 static const nir_search_variable search190_2 = {
3965    { nir_search_value_variable, 0 },
3966    1, /* c */
3967    false,
3968    nir_type_invalid,
3969    NULL,
3970 };
3971 static const nir_search_expression search190 = {
3972    { nir_search_value_expression, 0 },
3973    false,
3974    nir_op_bcsel,
3975    { &search190_0.value, &search190_1.value, &search190_2.value },
3976    NULL,
3977 };
3978 
3979 static const nir_search_variable replace190 = {
3980    { nir_search_value_variable, 0 },
3981    0, /* b */
3982    false,
3983    nir_type_invalid,
3984    NULL,
3985 };
3986 
3987 static const nir_search_constant search191_0 = {
3988    { nir_search_value_constant, 32 },
3989    nir_type_bool32, { NIR_FALSE /* False */ },
3990 };
3991 
3992 static const nir_search_variable search191_1 = {
3993    { nir_search_value_variable, 0 },
3994    0, /* b */
3995    false,
3996    nir_type_invalid,
3997    NULL,
3998 };
3999 
4000 static const nir_search_variable search191_2 = {
4001    { nir_search_value_variable, 0 },
4002    1, /* c */
4003    false,
4004    nir_type_invalid,
4005    NULL,
4006 };
4007 static const nir_search_expression search191 = {
4008    { nir_search_value_expression, 0 },
4009    false,
4010    nir_op_bcsel,
4011    { &search191_0.value, &search191_1.value, &search191_2.value },
4012    NULL,
4013 };
4014 
4015 static const nir_search_variable replace191 = {
4016    { nir_search_value_variable, 0 },
4017    1, /* c */
4018    false,
4019    nir_type_invalid,
4020    NULL,
4021 };
4022 
4023 static const nir_search_variable search192_0 = {
4024    { nir_search_value_variable, 0 },
4025    0, /* a */
4026    true,
4027    nir_type_invalid,
4028    NULL,
4029 };
4030 
4031 static const nir_search_variable search192_1 = {
4032    { nir_search_value_variable, 0 },
4033    1, /* b */
4034    false,
4035    nir_type_invalid,
4036    NULL,
4037 };
4038 
4039 static const nir_search_variable search192_2 = {
4040    { nir_search_value_variable, 0 },
4041    2, /* c */
4042    false,
4043    nir_type_invalid,
4044    NULL,
4045 };
4046 static const nir_search_expression search192 = {
4047    { nir_search_value_expression, 0 },
4048    false,
4049    nir_op_bcsel,
4050    { &search192_0.value, &search192_1.value, &search192_2.value },
4051    NULL,
4052 };
4053 
4054 static const nir_search_variable replace192_0_0 = {
4055    { nir_search_value_variable, 0 },
4056    0, /* a */
4057    false,
4058    nir_type_invalid,
4059    NULL,
4060 };
4061 
4062 static const nir_search_constant replace192_0_1 = {
4063    { nir_search_value_constant, 0 },
4064    nir_type_int, { 0x0 /* 0 */ },
4065 };
4066 static const nir_search_expression replace192_0 = {
4067    { nir_search_value_expression, 0 },
4068    false,
4069    nir_op_ine,
4070    { &replace192_0_0.value, &replace192_0_1.value },
4071    NULL,
4072 };
4073 
4074 static const nir_search_variable replace192_1 = {
4075    { nir_search_value_variable, 0 },
4076    1, /* b */
4077    false,
4078    nir_type_invalid,
4079    NULL,
4080 };
4081 
4082 static const nir_search_variable replace192_2 = {
4083    { nir_search_value_variable, 0 },
4084    2, /* c */
4085    false,
4086    nir_type_invalid,
4087    NULL,
4088 };
4089 static const nir_search_expression replace192 = {
4090    { nir_search_value_expression, 0 },
4091    false,
4092    nir_op_bcsel,
4093    { &replace192_0.value, &replace192_1.value, &replace192_2.value },
4094    NULL,
4095 };
4096 
4097 static const nir_search_variable search193_0 = {
4098    { nir_search_value_variable, 0 },
4099    0, /* a */
4100    false,
4101    nir_type_invalid,
4102    NULL,
4103 };
4104 
4105 static const nir_search_variable search193_1 = {
4106    { nir_search_value_variable, 0 },
4107    1, /* b */
4108    false,
4109    nir_type_invalid,
4110    NULL,
4111 };
4112 
4113 static const nir_search_variable search193_2 = {
4114    { nir_search_value_variable, 0 },
4115    1, /* b */
4116    false,
4117    nir_type_invalid,
4118    NULL,
4119 };
4120 static const nir_search_expression search193 = {
4121    { nir_search_value_expression, 0 },
4122    false,
4123    nir_op_bcsel,
4124    { &search193_0.value, &search193_1.value, &search193_2.value },
4125    NULL,
4126 };
4127 
4128 static const nir_search_variable replace193 = {
4129    { nir_search_value_variable, 0 },
4130    1, /* b */
4131    false,
4132    nir_type_invalid,
4133    NULL,
4134 };
4135 
4136 static const nir_search_variable search233_0_0_0 = {
4137    { nir_search_value_variable, 0 },
4138    0, /* a */
4139    false,
4140    nir_type_invalid,
4141    NULL,
4142 };
4143 static const nir_search_expression search233_0_0 = {
4144    { nir_search_value_expression, 0 },
4145    false,
4146    nir_op_find_lsb,
4147    { &search233_0_0_0.value },
4148    NULL,
4149 };
4150 
4151 static const nir_search_constant search233_0_1 = {
4152    { nir_search_value_constant, 0 },
4153    nir_type_int, { 0x0 /* 0 */ },
4154 };
4155 static const nir_search_expression search233_0 = {
4156    { nir_search_value_expression, 0 },
4157    false,
4158    nir_op_ige,
4159    { &search233_0_0.value, &search233_0_1.value },
4160    NULL,
4161 };
4162 
4163 static const nir_search_variable search233_1_0 = {
4164    { nir_search_value_variable, 0 },
4165    0, /* a */
4166    false,
4167    nir_type_invalid,
4168    NULL,
4169 };
4170 static const nir_search_expression search233_1 = {
4171    { nir_search_value_expression, 0 },
4172    false,
4173    nir_op_find_lsb,
4174    { &search233_1_0.value },
4175    NULL,
4176 };
4177 
4178 static const nir_search_constant search233_2 = {
4179    { nir_search_value_constant, 0 },
4180    nir_type_int, { -0x1 /* -1 */ },
4181 };
4182 static const nir_search_expression search233 = {
4183    { nir_search_value_expression, 0 },
4184    false,
4185    nir_op_bcsel,
4186    { &search233_0.value, &search233_1.value, &search233_2.value },
4187    NULL,
4188 };
4189 
4190 static const nir_search_variable replace233_0 = {
4191    { nir_search_value_variable, 0 },
4192    0, /* a */
4193    false,
4194    nir_type_invalid,
4195    NULL,
4196 };
4197 static const nir_search_expression replace233 = {
4198    { nir_search_value_expression, 0 },
4199    false,
4200    nir_op_find_lsb,
4201    { &replace233_0.value },
4202    NULL,
4203 };
4204 
4205 static const nir_search_variable search234_0_0_0 = {
4206    { nir_search_value_variable, 0 },
4207    0, /* a */
4208    false,
4209    nir_type_invalid,
4210    NULL,
4211 };
4212 static const nir_search_expression search234_0_0 = {
4213    { nir_search_value_expression, 0 },
4214    false,
4215    nir_op_ifind_msb,
4216    { &search234_0_0_0.value },
4217    NULL,
4218 };
4219 
4220 static const nir_search_constant search234_0_1 = {
4221    { nir_search_value_constant, 0 },
4222    nir_type_int, { 0x0 /* 0 */ },
4223 };
4224 static const nir_search_expression search234_0 = {
4225    { nir_search_value_expression, 0 },
4226    false,
4227    nir_op_ige,
4228    { &search234_0_0.value, &search234_0_1.value },
4229    NULL,
4230 };
4231 
4232 static const nir_search_variable search234_1_0 = {
4233    { nir_search_value_variable, 0 },
4234    0, /* a */
4235    false,
4236    nir_type_invalid,
4237    NULL,
4238 };
4239 static const nir_search_expression search234_1 = {
4240    { nir_search_value_expression, 0 },
4241    false,
4242    nir_op_ifind_msb,
4243    { &search234_1_0.value },
4244    NULL,
4245 };
4246 
4247 static const nir_search_constant search234_2 = {
4248    { nir_search_value_constant, 0 },
4249    nir_type_int, { -0x1 /* -1 */ },
4250 };
4251 static const nir_search_expression search234 = {
4252    { nir_search_value_expression, 0 },
4253    false,
4254    nir_op_bcsel,
4255    { &search234_0.value, &search234_1.value, &search234_2.value },
4256    NULL,
4257 };
4258 
4259 static const nir_search_variable replace234_0 = {
4260    { nir_search_value_variable, 0 },
4261    0, /* a */
4262    false,
4263    nir_type_invalid,
4264    NULL,
4265 };
4266 static const nir_search_expression replace234 = {
4267    { nir_search_value_expression, 0 },
4268    false,
4269    nir_op_ifind_msb,
4270    { &replace234_0.value },
4271    NULL,
4272 };
4273 
4274 static const nir_search_variable search235_0_0_0 = {
4275    { nir_search_value_variable, 0 },
4276    0, /* a */
4277    false,
4278    nir_type_invalid,
4279    NULL,
4280 };
4281 static const nir_search_expression search235_0_0 = {
4282    { nir_search_value_expression, 0 },
4283    false,
4284    nir_op_ufind_msb,
4285    { &search235_0_0_0.value },
4286    NULL,
4287 };
4288 
4289 static const nir_search_constant search235_0_1 = {
4290    { nir_search_value_constant, 0 },
4291    nir_type_int, { 0x0 /* 0 */ },
4292 };
4293 static const nir_search_expression search235_0 = {
4294    { nir_search_value_expression, 0 },
4295    false,
4296    nir_op_ige,
4297    { &search235_0_0.value, &search235_0_1.value },
4298    NULL,
4299 };
4300 
4301 static const nir_search_variable search235_1_0 = {
4302    { nir_search_value_variable, 0 },
4303    0, /* a */
4304    false,
4305    nir_type_invalid,
4306    NULL,
4307 };
4308 static const nir_search_expression search235_1 = {
4309    { nir_search_value_expression, 0 },
4310    false,
4311    nir_op_ufind_msb,
4312    { &search235_1_0.value },
4313    NULL,
4314 };
4315 
4316 static const nir_search_constant search235_2 = {
4317    { nir_search_value_constant, 0 },
4318    nir_type_int, { -0x1 /* -1 */ },
4319 };
4320 static const nir_search_expression search235 = {
4321    { nir_search_value_expression, 0 },
4322    false,
4323    nir_op_bcsel,
4324    { &search235_0.value, &search235_1.value, &search235_2.value },
4325    NULL,
4326 };
4327 
4328 static const nir_search_variable replace235_0 = {
4329    { nir_search_value_variable, 0 },
4330    0, /* a */
4331    false,
4332    nir_type_invalid,
4333    NULL,
4334 };
4335 static const nir_search_expression replace235 = {
4336    { nir_search_value_expression, 0 },
4337    false,
4338    nir_op_ufind_msb,
4339    { &replace235_0.value },
4340    NULL,
4341 };
4342 
4343 static const nir_search_variable search236_0_0 = {
4344    { nir_search_value_variable, 0 },
4345    0, /* a */
4346    false,
4347    nir_type_invalid,
4348    NULL,
4349 };
4350 
4351 static const nir_search_constant search236_0_1 = {
4352    { nir_search_value_constant, 0 },
4353    nir_type_int, { 0x0 /* 0 */ },
4354 };
4355 static const nir_search_expression search236_0 = {
4356    { nir_search_value_expression, 0 },
4357    false,
4358    nir_op_ine,
4359    { &search236_0_0.value, &search236_0_1.value },
4360    NULL,
4361 };
4362 
4363 static const nir_search_variable search236_1_0 = {
4364    { nir_search_value_variable, 0 },
4365    0, /* a */
4366    false,
4367    nir_type_invalid,
4368    NULL,
4369 };
4370 static const nir_search_expression search236_1 = {
4371    { nir_search_value_expression, 0 },
4372    false,
4373    nir_op_find_lsb,
4374    { &search236_1_0.value },
4375    NULL,
4376 };
4377 
4378 static const nir_search_constant search236_2 = {
4379    { nir_search_value_constant, 0 },
4380    nir_type_int, { -0x1 /* -1 */ },
4381 };
4382 static const nir_search_expression search236 = {
4383    { nir_search_value_expression, 0 },
4384    false,
4385    nir_op_bcsel,
4386    { &search236_0.value, &search236_1.value, &search236_2.value },
4387    NULL,
4388 };
4389 
4390 static const nir_search_variable replace236_0 = {
4391    { nir_search_value_variable, 0 },
4392    0, /* a */
4393    false,
4394    nir_type_invalid,
4395    NULL,
4396 };
4397 static const nir_search_expression replace236 = {
4398    { nir_search_value_expression, 0 },
4399    false,
4400    nir_op_find_lsb,
4401    { &replace236_0.value },
4402    NULL,
4403 };
4404 
4405 static const nir_search_variable search237_0_0 = {
4406    { nir_search_value_variable, 0 },
4407    0, /* a */
4408    false,
4409    nir_type_invalid,
4410    NULL,
4411 };
4412 
4413 static const nir_search_constant search237_0_1 = {
4414    { nir_search_value_constant, 0 },
4415    nir_type_int, { 0x0 /* 0 */ },
4416 };
4417 static const nir_search_expression search237_0 = {
4418    { nir_search_value_expression, 0 },
4419    false,
4420    nir_op_ine,
4421    { &search237_0_0.value, &search237_0_1.value },
4422    NULL,
4423 };
4424 
4425 static const nir_search_variable search237_1_0 = {
4426    { nir_search_value_variable, 0 },
4427    0, /* a */
4428    false,
4429    nir_type_invalid,
4430    NULL,
4431 };
4432 static const nir_search_expression search237_1 = {
4433    { nir_search_value_expression, 0 },
4434    false,
4435    nir_op_ifind_msb,
4436    { &search237_1_0.value },
4437    NULL,
4438 };
4439 
4440 static const nir_search_constant search237_2 = {
4441    { nir_search_value_constant, 0 },
4442    nir_type_int, { -0x1 /* -1 */ },
4443 };
4444 static const nir_search_expression search237 = {
4445    { nir_search_value_expression, 0 },
4446    false,
4447    nir_op_bcsel,
4448    { &search237_0.value, &search237_1.value, &search237_2.value },
4449    NULL,
4450 };
4451 
4452 static const nir_search_variable replace237_0 = {
4453    { nir_search_value_variable, 0 },
4454    0, /* a */
4455    false,
4456    nir_type_invalid,
4457    NULL,
4458 };
4459 static const nir_search_expression replace237 = {
4460    { nir_search_value_expression, 0 },
4461    false,
4462    nir_op_ifind_msb,
4463    { &replace237_0.value },
4464    NULL,
4465 };
4466 
4467 static const nir_search_variable search238_0_0 = {
4468    { nir_search_value_variable, 0 },
4469    0, /* a */
4470    false,
4471    nir_type_invalid,
4472    NULL,
4473 };
4474 
4475 static const nir_search_constant search238_0_1 = {
4476    { nir_search_value_constant, 0 },
4477    nir_type_int, { 0x0 /* 0 */ },
4478 };
4479 static const nir_search_expression search238_0 = {
4480    { nir_search_value_expression, 0 },
4481    false,
4482    nir_op_ine,
4483    { &search238_0_0.value, &search238_0_1.value },
4484    NULL,
4485 };
4486 
4487 static const nir_search_variable search238_1_0 = {
4488    { nir_search_value_variable, 0 },
4489    0, /* a */
4490    false,
4491    nir_type_invalid,
4492    NULL,
4493 };
4494 static const nir_search_expression search238_1 = {
4495    { nir_search_value_expression, 0 },
4496    false,
4497    nir_op_ufind_msb,
4498    { &search238_1_0.value },
4499    NULL,
4500 };
4501 
4502 static const nir_search_constant search238_2 = {
4503    { nir_search_value_constant, 0 },
4504    nir_type_int, { -0x1 /* -1 */ },
4505 };
4506 static const nir_search_expression search238 = {
4507    { nir_search_value_expression, 0 },
4508    false,
4509    nir_op_bcsel,
4510    { &search238_0.value, &search238_1.value, &search238_2.value },
4511    NULL,
4512 };
4513 
4514 static const nir_search_variable replace238_0 = {
4515    { nir_search_value_variable, 0 },
4516    0, /* a */
4517    false,
4518    nir_type_invalid,
4519    NULL,
4520 };
4521 static const nir_search_expression replace238 = {
4522    { nir_search_value_expression, 0 },
4523    false,
4524    nir_op_ufind_msb,
4525    { &replace238_0.value },
4526    NULL,
4527 };
4528 
4529 static const nir_search_variable search239_0_0 = {
4530    { nir_search_value_variable, 0 },
4531    0, /* a */
4532    false,
4533    nir_type_invalid,
4534    NULL,
4535 };
4536 
4537 static const nir_search_constant search239_0_1 = {
4538    { nir_search_value_constant, 0 },
4539    nir_type_int, { -0x1 /* -1 */ },
4540 };
4541 static const nir_search_expression search239_0 = {
4542    { nir_search_value_expression, 0 },
4543    false,
4544    nir_op_ine,
4545    { &search239_0_0.value, &search239_0_1.value },
4546    NULL,
4547 };
4548 
4549 static const nir_search_variable search239_1_0 = {
4550    { nir_search_value_variable, 0 },
4551    0, /* a */
4552    false,
4553    nir_type_invalid,
4554    NULL,
4555 };
4556 static const nir_search_expression search239_1 = {
4557    { nir_search_value_expression, 0 },
4558    false,
4559    nir_op_ifind_msb,
4560    { &search239_1_0.value },
4561    NULL,
4562 };
4563 
4564 static const nir_search_constant search239_2 = {
4565    { nir_search_value_constant, 0 },
4566    nir_type_int, { -0x1 /* -1 */ },
4567 };
4568 static const nir_search_expression search239 = {
4569    { nir_search_value_expression, 0 },
4570    false,
4571    nir_op_bcsel,
4572    { &search239_0.value, &search239_1.value, &search239_2.value },
4573    NULL,
4574 };
4575 
4576 static const nir_search_variable replace239_0 = {
4577    { nir_search_value_variable, 0 },
4578    0, /* a */
4579    false,
4580    nir_type_invalid,
4581    NULL,
4582 };
4583 static const nir_search_expression replace239 = {
4584    { nir_search_value_expression, 0 },
4585    false,
4586    nir_op_ifind_msb,
4587    { &replace239_0.value },
4588    NULL,
4589 };
4590 
4591 static const struct transform nir_opt_algebraic_bcsel_xforms[] = {
4592    { &search74, &replace74.value, 0 },
4593    { &search75, &replace75.value, 0 },
4594    { &search76, &replace76.value, 0 },
4595    { &search77, &replace77.value, 0 },
4596    { &search78, &replace78.value, 0 },
4597    { &search184, &replace184.value, 0 },
4598    { &search185, &replace185.value, 0 },
4599    { &search186, &replace186.value, 0 },
4600    { &search187, &replace187.value, 0 },
4601    { &search188, &replace188.value, 0 },
4602    { &search189, &replace189.value, 0 },
4603    { &search190, &replace190.value, 0 },
4604    { &search191, &replace191.value, 0 },
4605    { &search192, &replace192.value, 0 },
4606    { &search193, &replace193.value, 0 },
4607    { &search233, &replace233.value, 0 },
4608    { &search234, &replace234.value, 0 },
4609    { &search235, &replace235.value, 0 },
4610    { &search236, &replace236.value, 0 },
4611    { &search237, &replace237.value, 0 },
4612    { &search238, &replace238.value, 0 },
4613    { &search239, &replace239.value, 0 },
4614 };
4615 
4616 static const nir_search_variable search116_0 = {
4617    { nir_search_value_variable, 0 },
4618    0, /* a */
4619    false,
4620    nir_type_invalid,
4621    NULL,
4622 };
4623 
4624 static const nir_search_variable search116_1 = {
4625    { nir_search_value_variable, 0 },
4626    1, /* b */
4627    false,
4628    nir_type_invalid,
4629    NULL,
4630 };
4631 static const nir_search_expression search116 = {
4632    { nir_search_value_expression, 0 },
4633    false,
4634    nir_op_sge,
4635    { &search116_0.value, &search116_1.value },
4636    NULL,
4637 };
4638 
4639 static const nir_search_variable replace116_0_0 = {
4640    { nir_search_value_variable, 0 },
4641    0, /* a */
4642    false,
4643    nir_type_invalid,
4644    NULL,
4645 };
4646 
4647 static const nir_search_variable replace116_0_1 = {
4648    { nir_search_value_variable, 0 },
4649    1, /* b */
4650    false,
4651    nir_type_invalid,
4652    NULL,
4653 };
4654 static const nir_search_expression replace116_0 = {
4655    { nir_search_value_expression, 0 },
4656    false,
4657    nir_op_fge,
4658    { &replace116_0_0.value, &replace116_0_1.value },
4659    NULL,
4660 };
4661 static const nir_search_expression replace116 = {
4662    { nir_search_value_expression, 0 },
4663    false,
4664    nir_op_b2f,
4665    { &replace116_0.value },
4666    NULL,
4667 };
4668 
4669 static const struct transform nir_opt_algebraic_sge_xforms[] = {
4670    { &search116, &replace116.value, 11 },
4671 };
4672 
4673 static const nir_search_variable search166_0_0 = {
4674    { nir_search_value_variable, 0 },
4675    0, /* a */
4676    false,
4677    nir_type_invalid,
4678    NULL,
4679 };
4680 static const nir_search_expression search166_0 = {
4681    { nir_search_value_expression, 0 },
4682    false,
4683    nir_op_fexp2,
4684    { &search166_0_0.value },
4685    NULL,
4686 };
4687 static const nir_search_expression search166 = {
4688    { nir_search_value_expression, 0 },
4689    true,
4690    nir_op_fsqrt,
4691    { &search166_0.value },
4692    NULL,
4693 };
4694 
4695 static const nir_search_constant replace166_0_0 = {
4696    { nir_search_value_constant, 0 },
4697    nir_type_float, { 0x3fe0000000000000 /* 0.5 */ },
4698 };
4699 
4700 static const nir_search_variable replace166_0_1 = {
4701    { nir_search_value_variable, 0 },
4702    0, /* a */
4703    false,
4704    nir_type_invalid,
4705    NULL,
4706 };
4707 static const nir_search_expression replace166_0 = {
4708    { nir_search_value_expression, 0 },
4709    false,
4710    nir_op_fmul,
4711    { &replace166_0_0.value, &replace166_0_1.value },
4712    NULL,
4713 };
4714 static const nir_search_expression replace166 = {
4715    { nir_search_value_expression, 0 },
4716    false,
4717    nir_op_fexp2,
4718    { &replace166_0.value },
4719    NULL,
4720 };
4721 
4722 static const nir_search_variable search178_0 = {
4723    { nir_search_value_variable, 0 },
4724    0, /* a */
4725    false,
4726    nir_type_invalid,
4727    NULL,
4728 };
4729 static const nir_search_expression search178 = {
4730    { nir_search_value_expression, 0 },
4731    false,
4732    nir_op_fsqrt,
4733    { &search178_0.value },
4734    NULL,
4735 };
4736 
4737 static const nir_search_variable replace178_0_0 = {
4738    { nir_search_value_variable, 0 },
4739    0, /* a */
4740    false,
4741    nir_type_invalid,
4742    NULL,
4743 };
4744 static const nir_search_expression replace178_0 = {
4745    { nir_search_value_expression, 0 },
4746    false,
4747    nir_op_frsq,
4748    { &replace178_0_0.value },
4749    NULL,
4750 };
4751 static const nir_search_expression replace178 = {
4752    { nir_search_value_expression, 0 },
4753    false,
4754    nir_op_frcp,
4755    { &replace178_0.value },
4756    NULL,
4757 };
4758 
4759 static const struct transform nir_opt_algebraic_fsqrt_xforms[] = {
4760    { &search166, &replace166.value, 0 },
4761    { &search178, &replace178.value, 15 },
4762 };
4763 
4764 static const nir_search_variable search18_0 = {
4765    { nir_search_value_variable, 0 },
4766    0, /* a */
4767    false,
4768    nir_type_invalid,
4769    NULL,
4770 };
4771 
4772 static const nir_search_constant search18_1 = {
4773    { nir_search_value_constant, 0 },
4774    nir_type_int, { 0x0 /* 0 */ },
4775 };
4776 static const nir_search_expression search18 = {
4777    { nir_search_value_expression, 0 },
4778    false,
4779    nir_op_iadd,
4780    { &search18_0.value, &search18_1.value },
4781    NULL,
4782 };
4783 
4784 static const nir_search_variable replace18 = {
4785    { nir_search_value_variable, 0 },
4786    0, /* a */
4787    false,
4788    nir_type_invalid,
4789    NULL,
4790 };
4791 
4792 static const nir_search_variable search22_0_0 = {
4793    { nir_search_value_variable, 0 },
4794    0, /* a */
4795    false,
4796    nir_type_invalid,
4797    NULL,
4798 };
4799 
4800 static const nir_search_variable search22_0_1 = {
4801    { nir_search_value_variable, 0 },
4802    1, /* b */
4803    false,
4804    nir_type_invalid,
4805    NULL,
4806 };
4807 static const nir_search_expression search22_0 = {
4808    { nir_search_value_expression, 0 },
4809    false,
4810    nir_op_imul,
4811    { &search22_0_0.value, &search22_0_1.value },
4812    NULL,
4813 };
4814 
4815 static const nir_search_variable search22_1_0 = {
4816    { nir_search_value_variable, 0 },
4817    0, /* a */
4818    false,
4819    nir_type_invalid,
4820    NULL,
4821 };
4822 
4823 static const nir_search_variable search22_1_1 = {
4824    { nir_search_value_variable, 0 },
4825    2, /* c */
4826    false,
4827    nir_type_invalid,
4828    NULL,
4829 };
4830 static const nir_search_expression search22_1 = {
4831    { nir_search_value_expression, 0 },
4832    false,
4833    nir_op_imul,
4834    { &search22_1_0.value, &search22_1_1.value },
4835    NULL,
4836 };
4837 static const nir_search_expression search22 = {
4838    { nir_search_value_expression, 0 },
4839    false,
4840    nir_op_iadd,
4841    { &search22_0.value, &search22_1.value },
4842    NULL,
4843 };
4844 
4845 static const nir_search_variable replace22_0 = {
4846    { nir_search_value_variable, 0 },
4847    0, /* a */
4848    false,
4849    nir_type_invalid,
4850    NULL,
4851 };
4852 
4853 static const nir_search_variable replace22_1_0 = {
4854    { nir_search_value_variable, 0 },
4855    1, /* b */
4856    false,
4857    nir_type_invalid,
4858    NULL,
4859 };
4860 
4861 static const nir_search_variable replace22_1_1 = {
4862    { nir_search_value_variable, 0 },
4863    2, /* c */
4864    false,
4865    nir_type_invalid,
4866    NULL,
4867 };
4868 static const nir_search_expression replace22_1 = {
4869    { nir_search_value_expression, 0 },
4870    false,
4871    nir_op_iadd,
4872    { &replace22_1_0.value, &replace22_1_1.value },
4873    NULL,
4874 };
4875 static const nir_search_expression replace22 = {
4876    { nir_search_value_expression, 0 },
4877    false,
4878    nir_op_imul,
4879    { &replace22_0.value, &replace22_1.value },
4880    NULL,
4881 };
4882 
4883 static const nir_search_variable search24_0_0 = {
4884    { nir_search_value_variable, 0 },
4885    0, /* a */
4886    false,
4887    nir_type_invalid,
4888    NULL,
4889 };
4890 static const nir_search_expression search24_0 = {
4891    { nir_search_value_expression, 0 },
4892    false,
4893    nir_op_ineg,
4894    { &search24_0_0.value },
4895    NULL,
4896 };
4897 
4898 static const nir_search_variable search24_1 = {
4899    { nir_search_value_variable, 0 },
4900    0, /* a */
4901    false,
4902    nir_type_invalid,
4903    NULL,
4904 };
4905 static const nir_search_expression search24 = {
4906    { nir_search_value_expression, 0 },
4907    false,
4908    nir_op_iadd,
4909    { &search24_0.value, &search24_1.value },
4910    NULL,
4911 };
4912 
4913 static const nir_search_constant replace24 = {
4914    { nir_search_value_constant, 0 },
4915    nir_type_int, { 0x0 /* 0 */ },
4916 };
4917 
4918 static const nir_search_variable search25_0_0 = {
4919    { nir_search_value_variable, 0 },
4920    0, /* a */
4921    false,
4922    nir_type_invalid,
4923    NULL,
4924 };
4925 static const nir_search_expression search25_0 = {
4926    { nir_search_value_expression, 0 },
4927    false,
4928    nir_op_ineg,
4929    { &search25_0_0.value },
4930    NULL,
4931 };
4932 
4933 static const nir_search_variable search25_1_0 = {
4934    { nir_search_value_variable, 0 },
4935    0, /* a */
4936    false,
4937    nir_type_invalid,
4938    NULL,
4939 };
4940 
4941 static const nir_search_variable search25_1_1 = {
4942    { nir_search_value_variable, 0 },
4943    1, /* b */
4944    false,
4945    nir_type_invalid,
4946    NULL,
4947 };
4948 static const nir_search_expression search25_1 = {
4949    { nir_search_value_expression, 0 },
4950    false,
4951    nir_op_iadd,
4952    { &search25_1_0.value, &search25_1_1.value },
4953    NULL,
4954 };
4955 static const nir_search_expression search25 = {
4956    { nir_search_value_expression, 0 },
4957    false,
4958    nir_op_iadd,
4959    { &search25_0.value, &search25_1.value },
4960    NULL,
4961 };
4962 
4963 static const nir_search_variable replace25 = {
4964    { nir_search_value_variable, 0 },
4965    1, /* b */
4966    false,
4967    nir_type_invalid,
4968    NULL,
4969 };
4970 
4971 static const nir_search_variable search26_0 = {
4972    { nir_search_value_variable, 0 },
4973    0, /* a */
4974    false,
4975    nir_type_invalid,
4976    NULL,
4977 };
4978 
4979 static const nir_search_variable search26_1_0_0 = {
4980    { nir_search_value_variable, 0 },
4981    0, /* a */
4982    false,
4983    nir_type_invalid,
4984    NULL,
4985 };
4986 static const nir_search_expression search26_1_0 = {
4987    { nir_search_value_expression, 0 },
4988    false,
4989    nir_op_ineg,
4990    { &search26_1_0_0.value },
4991    NULL,
4992 };
4993 
4994 static const nir_search_variable search26_1_1 = {
4995    { nir_search_value_variable, 0 },
4996    1, /* b */
4997    false,
4998    nir_type_invalid,
4999    NULL,
5000 };
5001 static const nir_search_expression search26_1 = {
5002    { nir_search_value_expression, 0 },
5003    false,
5004    nir_op_iadd,
5005    { &search26_1_0.value, &search26_1_1.value },
5006    NULL,
5007 };
5008 static const nir_search_expression search26 = {
5009    { nir_search_value_expression, 0 },
5010    false,
5011    nir_op_iadd,
5012    { &search26_0.value, &search26_1.value },
5013    NULL,
5014 };
5015 
5016 static const nir_search_variable replace26 = {
5017    { nir_search_value_variable, 0 },
5018    1, /* b */
5019    false,
5020    nir_type_invalid,
5021    NULL,
5022 };
5023 
5024 static const nir_search_variable search220_0 = {
5025    { nir_search_value_variable, 0 },
5026    0, /* a */
5027    false,
5028    nir_type_invalid,
5029    NULL,
5030 };
5031 
5032 static const nir_search_constant search220_1_0 = {
5033    { nir_search_value_constant, 0 },
5034    nir_type_int, { 0x0 /* 0 */ },
5035 };
5036 
5037 static const nir_search_variable search220_1_1 = {
5038    { nir_search_value_variable, 0 },
5039    1, /* b */
5040    false,
5041    nir_type_invalid,
5042    NULL,
5043 };
5044 static const nir_search_expression search220_1 = {
5045    { nir_search_value_expression, 0 },
5046    false,
5047    nir_op_isub,
5048    { &search220_1_0.value, &search220_1_1.value },
5049    NULL,
5050 };
5051 static const nir_search_expression search220 = {
5052    { nir_search_value_expression, 0 },
5053    false,
5054    nir_op_iadd,
5055    { &search220_0.value, &search220_1.value },
5056    NULL,
5057 };
5058 
5059 static const nir_search_variable replace220_0 = {
5060    { nir_search_value_variable, 0 },
5061    0, /* a */
5062    false,
5063    nir_type_invalid,
5064    NULL,
5065 };
5066 
5067 static const nir_search_variable replace220_1 = {
5068    { nir_search_value_variable, 0 },
5069    1, /* b */
5070    false,
5071    nir_type_invalid,
5072    NULL,
5073 };
5074 static const nir_search_expression replace220 = {
5075    { nir_search_value_expression, 0 },
5076    false,
5077    nir_op_isub,
5078    { &replace220_0.value, &replace220_1.value },
5079    NULL,
5080 };
5081 
5082 static const nir_search_variable search228_0_0 = {
5083    { nir_search_value_variable, 0 },
5084    0, /* a */
5085    false,
5086    nir_type_invalid,
5087    (is_not_const),
5088 };
5089 
5090 static const nir_search_variable search228_0_1 = {
5091    { nir_search_value_variable, 0 },
5092    1, /* b */
5093    false,
5094    nir_type_invalid,
5095    (is_not_const),
5096 };
5097 static const nir_search_expression search228_0 = {
5098    { nir_search_value_expression, 0 },
5099    false,
5100    nir_op_iadd,
5101    { &search228_0_0.value, &search228_0_1.value },
5102    (is_used_once),
5103 };
5104 
5105 static const nir_search_variable search228_1 = {
5106    { nir_search_value_variable, 0 },
5107    2, /* c */
5108    true,
5109    nir_type_invalid,
5110    NULL,
5111 };
5112 static const nir_search_expression search228 = {
5113    { nir_search_value_expression, 0 },
5114    false,
5115    nir_op_iadd,
5116    { &search228_0.value, &search228_1.value },
5117    (is_used_once),
5118 };
5119 
5120 static const nir_search_variable replace228_0_0 = {
5121    { nir_search_value_variable, 0 },
5122    0, /* a */
5123    false,
5124    nir_type_invalid,
5125    NULL,
5126 };
5127 
5128 static const nir_search_variable replace228_0_1 = {
5129    { nir_search_value_variable, 0 },
5130    2, /* c */
5131    false,
5132    nir_type_invalid,
5133    NULL,
5134 };
5135 static const nir_search_expression replace228_0 = {
5136    { nir_search_value_expression, 0 },
5137    false,
5138    nir_op_iadd,
5139    { &replace228_0_0.value, &replace228_0_1.value },
5140    NULL,
5141 };
5142 
5143 static const nir_search_variable replace228_1 = {
5144    { nir_search_value_variable, 0 },
5145    1, /* b */
5146    false,
5147    nir_type_invalid,
5148    NULL,
5149 };
5150 static const nir_search_expression replace228 = {
5151    { nir_search_value_expression, 0 },
5152    false,
5153    nir_op_iadd,
5154    { &replace228_0.value, &replace228_1.value },
5155    NULL,
5156 };
5157 
5158 static const nir_search_variable search232_0 = {
5159    { nir_search_value_variable, 0 },
5160    0, /* a */
5161    true,
5162    nir_type_invalid,
5163    NULL,
5164 };
5165 
5166 static const nir_search_variable search232_1_0 = {
5167    { nir_search_value_variable, 0 },
5168    1, /* b */
5169    false,
5170    nir_type_invalid,
5171    NULL,
5172 };
5173 
5174 static const nir_search_variable search232_1_1 = {
5175    { nir_search_value_variable, 0 },
5176    2, /* c */
5177    true,
5178    nir_type_invalid,
5179    NULL,
5180 };
5181 static const nir_search_expression search232_1 = {
5182    { nir_search_value_expression, 0 },
5183    false,
5184    nir_op_iadd,
5185    { &search232_1_0.value, &search232_1_1.value },
5186    NULL,
5187 };
5188 static const nir_search_expression search232 = {
5189    { nir_search_value_expression, 0 },
5190    false,
5191    nir_op_iadd,
5192    { &search232_0.value, &search232_1.value },
5193    NULL,
5194 };
5195 
5196 static const nir_search_variable replace232_0_0 = {
5197    { nir_search_value_variable, 0 },
5198    0, /* a */
5199    false,
5200    nir_type_invalid,
5201    NULL,
5202 };
5203 
5204 static const nir_search_variable replace232_0_1 = {
5205    { nir_search_value_variable, 0 },
5206    2, /* c */
5207    false,
5208    nir_type_invalid,
5209    NULL,
5210 };
5211 static const nir_search_expression replace232_0 = {
5212    { nir_search_value_expression, 0 },
5213    false,
5214    nir_op_iadd,
5215    { &replace232_0_0.value, &replace232_0_1.value },
5216    NULL,
5217 };
5218 
5219 static const nir_search_variable replace232_1 = {
5220    { nir_search_value_variable, 0 },
5221    1, /* b */
5222    false,
5223    nir_type_invalid,
5224    NULL,
5225 };
5226 static const nir_search_expression replace232 = {
5227    { nir_search_value_expression, 0 },
5228    false,
5229    nir_op_iadd,
5230    { &replace232_0.value, &replace232_1.value },
5231    NULL,
5232 };
5233 
5234 static const struct transform nir_opt_algebraic_iadd_xforms[] = {
5235    { &search18, &replace18.value, 0 },
5236    { &search22, &replace22.value, 0 },
5237    { &search24, &replace24.value, 0 },
5238    { &search25, &replace25.value, 0 },
5239    { &search26, &replace26.value, 0 },
5240    { &search220, &replace220.value, 0 },
5241    { &search228, &replace228.value, 0 },
5242    { &search232, &replace232.value, 0 },
5243 };
5244 
5245 static const nir_search_variable search252_0 = {
5246    { nir_search_value_variable, 0 },
5247    0, /* v */
5248    false,
5249    nir_type_invalid,
5250    NULL,
5251 };
5252 static const nir_search_expression search252 = {
5253    { nir_search_value_expression, 0 },
5254    false,
5255    nir_op_pack_unorm_2x16,
5256    { &search252_0.value },
5257    NULL,
5258 };
5259 
5260 static const nir_search_variable replace252_0_0_0_0_0 = {
5261    { nir_search_value_variable, 0 },
5262    0, /* v */
5263    false,
5264    nir_type_invalid,
5265    NULL,
5266 };
5267 static const nir_search_expression replace252_0_0_0_0 = {
5268    { nir_search_value_expression, 0 },
5269    false,
5270    nir_op_fsat,
5271    { &replace252_0_0_0_0_0.value },
5272    NULL,
5273 };
5274 
5275 static const nir_search_constant replace252_0_0_0_1 = {
5276    { nir_search_value_constant, 0 },
5277    nir_type_float, { 0x40efffe000000000 /* 65535.0 */ },
5278 };
5279 static const nir_search_expression replace252_0_0_0 = {
5280    { nir_search_value_expression, 0 },
5281    false,
5282    nir_op_fmul,
5283    { &replace252_0_0_0_0.value, &replace252_0_0_0_1.value },
5284    NULL,
5285 };
5286 static const nir_search_expression replace252_0_0 = {
5287    { nir_search_value_expression, 0 },
5288    false,
5289    nir_op_fround_even,
5290    { &replace252_0_0_0.value },
5291    NULL,
5292 };
5293 static const nir_search_expression replace252_0 = {
5294    { nir_search_value_expression, 0 },
5295    false,
5296    nir_op_f2u32,
5297    { &replace252_0_0.value },
5298    NULL,
5299 };
5300 static const nir_search_expression replace252 = {
5301    { nir_search_value_expression, 0 },
5302    false,
5303    nir_op_pack_uvec2_to_uint,
5304    { &replace252_0.value },
5305    NULL,
5306 };
5307 
5308 static const struct transform nir_opt_algebraic_pack_unorm_2x16_xforms[] = {
5309    { &search252, &replace252.value, 29 },
5310 };
5311 
5312 static const nir_search_variable search253_0 = {
5313    { nir_search_value_variable, 0 },
5314    0, /* v */
5315    false,
5316    nir_type_invalid,
5317    NULL,
5318 };
5319 static const nir_search_expression search253 = {
5320    { nir_search_value_expression, 0 },
5321    false,
5322    nir_op_pack_unorm_4x8,
5323    { &search253_0.value },
5324    NULL,
5325 };
5326 
5327 static const nir_search_variable replace253_0_0_0_0_0 = {
5328    { nir_search_value_variable, 0 },
5329    0, /* v */
5330    false,
5331    nir_type_invalid,
5332    NULL,
5333 };
5334 static const nir_search_expression replace253_0_0_0_0 = {
5335    { nir_search_value_expression, 0 },
5336    false,
5337    nir_op_fsat,
5338    { &replace253_0_0_0_0_0.value },
5339    NULL,
5340 };
5341 
5342 static const nir_search_constant replace253_0_0_0_1 = {
5343    { nir_search_value_constant, 0 },
5344    nir_type_float, { 0x406fe00000000000 /* 255.0 */ },
5345 };
5346 static const nir_search_expression replace253_0_0_0 = {
5347    { nir_search_value_expression, 0 },
5348    false,
5349    nir_op_fmul,
5350    { &replace253_0_0_0_0.value, &replace253_0_0_0_1.value },
5351    NULL,
5352 };
5353 static const nir_search_expression replace253_0_0 = {
5354    { nir_search_value_expression, 0 },
5355    false,
5356    nir_op_fround_even,
5357    { &replace253_0_0_0.value },
5358    NULL,
5359 };
5360 static const nir_search_expression replace253_0 = {
5361    { nir_search_value_expression, 0 },
5362    false,
5363    nir_op_f2u32,
5364    { &replace253_0_0.value },
5365    NULL,
5366 };
5367 static const nir_search_expression replace253 = {
5368    { nir_search_value_expression, 0 },
5369    false,
5370    nir_op_pack_uvec4_to_uint,
5371    { &replace253_0.value },
5372    NULL,
5373 };
5374 
5375 static const struct transform nir_opt_algebraic_pack_unorm_4x8_xforms[] = {
5376    { &search253, &replace253.value, 30 },
5377 };
5378 
5379 static const nir_search_variable search255_0 = {
5380    { nir_search_value_variable, 0 },
5381    0, /* v */
5382    false,
5383    nir_type_invalid,
5384    NULL,
5385 };
5386 static const nir_search_expression search255 = {
5387    { nir_search_value_expression, 0 },
5388    false,
5389    nir_op_pack_snorm_4x8,
5390    { &search255_0.value },
5391    NULL,
5392 };
5393 
5394 static const nir_search_constant replace255_0_0_0_0_0 = {
5395    { nir_search_value_constant, 0 },
5396    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
5397 };
5398 
5399 static const nir_search_constant replace255_0_0_0_0_1_0 = {
5400    { nir_search_value_constant, 0 },
5401    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
5402 };
5403 
5404 static const nir_search_variable replace255_0_0_0_0_1_1 = {
5405    { nir_search_value_variable, 0 },
5406    0, /* v */
5407    false,
5408    nir_type_invalid,
5409    NULL,
5410 };
5411 static const nir_search_expression replace255_0_0_0_0_1 = {
5412    { nir_search_value_expression, 0 },
5413    false,
5414    nir_op_fmax,
5415    { &replace255_0_0_0_0_1_0.value, &replace255_0_0_0_0_1_1.value },
5416    NULL,
5417 };
5418 static const nir_search_expression replace255_0_0_0_0 = {
5419    { nir_search_value_expression, 0 },
5420    false,
5421    nir_op_fmin,
5422    { &replace255_0_0_0_0_0.value, &replace255_0_0_0_0_1.value },
5423    NULL,
5424 };
5425 
5426 static const nir_search_constant replace255_0_0_0_1 = {
5427    { nir_search_value_constant, 0 },
5428    nir_type_float, { 0x405fc00000000000 /* 127.0 */ },
5429 };
5430 static const nir_search_expression replace255_0_0_0 = {
5431    { nir_search_value_expression, 0 },
5432    false,
5433    nir_op_fmul,
5434    { &replace255_0_0_0_0.value, &replace255_0_0_0_1.value },
5435    NULL,
5436 };
5437 static const nir_search_expression replace255_0_0 = {
5438    { nir_search_value_expression, 0 },
5439    false,
5440    nir_op_fround_even,
5441    { &replace255_0_0_0.value },
5442    NULL,
5443 };
5444 static const nir_search_expression replace255_0 = {
5445    { nir_search_value_expression, 0 },
5446    false,
5447    nir_op_f2i32,
5448    { &replace255_0_0.value },
5449    NULL,
5450 };
5451 static const nir_search_expression replace255 = {
5452    { nir_search_value_expression, 0 },
5453    false,
5454    nir_op_pack_uvec4_to_uint,
5455    { &replace255_0.value },
5456    NULL,
5457 };
5458 
5459 static const struct transform nir_opt_algebraic_pack_snorm_4x8_xforms[] = {
5460    { &search255, &replace255.value, 32 },
5461 };
5462 
5463 static const nir_search_variable search134_0 = {
5464    { nir_search_value_variable, 0 },
5465    0, /* a */
5466    false,
5467    nir_type_invalid,
5468    NULL,
5469 };
5470 
5471 static const nir_search_constant search134_1 = {
5472    { nir_search_value_constant, 0 },
5473    nir_type_float, { 0x0 /* 0.0 */ },
5474 };
5475 static const nir_search_expression search134 = {
5476    { nir_search_value_expression, 0 },
5477    false,
5478    nir_op_fand,
5479    { &search134_0.value, &search134_1.value },
5480    NULL,
5481 };
5482 
5483 static const nir_search_constant replace134 = {
5484    { nir_search_value_constant, 0 },
5485    nir_type_float, { 0x0 /* 0.0 */ },
5486 };
5487 
5488 static const struct transform nir_opt_algebraic_fand_xforms[] = {
5489    { &search134, &replace134.value, 0 },
5490 };
5491 
5492 static const nir_search_variable search12_0_0 = {
5493    { nir_search_value_variable, 0 },
5494    0, /* a */
5495    false,
5496    nir_type_invalid,
5497    NULL,
5498 };
5499 static const nir_search_expression search12_0 = {
5500    { nir_search_value_expression, 0 },
5501    false,
5502    nir_op_fabs,
5503    { &search12_0_0.value },
5504    NULL,
5505 };
5506 static const nir_search_expression search12 = {
5507    { nir_search_value_expression, 0 },
5508    false,
5509    nir_op_fabs,
5510    { &search12_0.value },
5511    NULL,
5512 };
5513 
5514 static const nir_search_variable replace12_0 = {
5515    { nir_search_value_variable, 0 },
5516    0, /* a */
5517    false,
5518    nir_type_invalid,
5519    NULL,
5520 };
5521 static const nir_search_expression replace12 = {
5522    { nir_search_value_expression, 0 },
5523    false,
5524    nir_op_fabs,
5525    { &replace12_0.value },
5526    NULL,
5527 };
5528 
5529 static const nir_search_variable search13_0_0 = {
5530    { nir_search_value_variable, 0 },
5531    0, /* a */
5532    false,
5533    nir_type_invalid,
5534    NULL,
5535 };
5536 static const nir_search_expression search13_0 = {
5537    { nir_search_value_expression, 0 },
5538    false,
5539    nir_op_fneg,
5540    { &search13_0_0.value },
5541    NULL,
5542 };
5543 static const nir_search_expression search13 = {
5544    { nir_search_value_expression, 0 },
5545    false,
5546    nir_op_fabs,
5547    { &search13_0.value },
5548    NULL,
5549 };
5550 
5551 static const nir_search_variable replace13_0 = {
5552    { nir_search_value_variable, 0 },
5553    0, /* a */
5554    false,
5555    nir_type_invalid,
5556    NULL,
5557 };
5558 static const nir_search_expression replace13 = {
5559    { nir_search_value_expression, 0 },
5560    false,
5561    nir_op_fabs,
5562    { &replace13_0.value },
5563    NULL,
5564 };
5565 
5566 static const nir_search_variable search14_0_0 = {
5567    { nir_search_value_variable, 0 },
5568    0, /* a */
5569    false,
5570    nir_type_invalid,
5571    NULL,
5572 };
5573 static const nir_search_expression search14_0 = {
5574    { nir_search_value_expression, 0 },
5575    false,
5576    nir_op_u2f32,
5577    { &search14_0_0.value },
5578    NULL,
5579 };
5580 static const nir_search_expression search14 = {
5581    { nir_search_value_expression, 0 },
5582    false,
5583    nir_op_fabs,
5584    { &search14_0.value },
5585    NULL,
5586 };
5587 
5588 static const nir_search_variable replace14_0 = {
5589    { nir_search_value_variable, 0 },
5590    0, /* a */
5591    false,
5592    nir_type_invalid,
5593    NULL,
5594 };
5595 static const nir_search_expression replace14 = {
5596    { nir_search_value_expression, 0 },
5597    false,
5598    nir_op_u2f32,
5599    { &replace14_0.value },
5600    NULL,
5601 };
5602 
5603 static const nir_search_variable search111_0_0 = {
5604    { nir_search_value_variable, 0 },
5605    0, /* a */
5606    false,
5607    nir_type_invalid,
5608    NULL,
5609 };
5610 
5611 static const nir_search_variable search111_0_1 = {
5612    { nir_search_value_variable, 0 },
5613    1, /* b */
5614    false,
5615    nir_type_invalid,
5616    NULL,
5617 };
5618 static const nir_search_expression search111_0 = {
5619    { nir_search_value_expression, 0 },
5620    false,
5621    nir_op_slt,
5622    { &search111_0_0.value, &search111_0_1.value },
5623    NULL,
5624 };
5625 static const nir_search_expression search111 = {
5626    { nir_search_value_expression, 0 },
5627    false,
5628    nir_op_fabs,
5629    { &search111_0.value },
5630    NULL,
5631 };
5632 
5633 static const nir_search_variable replace111_0 = {
5634    { nir_search_value_variable, 0 },
5635    0, /* a */
5636    false,
5637    nir_type_invalid,
5638    NULL,
5639 };
5640 
5641 static const nir_search_variable replace111_1 = {
5642    { nir_search_value_variable, 0 },
5643    1, /* b */
5644    false,
5645    nir_type_invalid,
5646    NULL,
5647 };
5648 static const nir_search_expression replace111 = {
5649    { nir_search_value_expression, 0 },
5650    false,
5651    nir_op_slt,
5652    { &replace111_0.value, &replace111_1.value },
5653    NULL,
5654 };
5655 
5656 static const nir_search_variable search112_0_0 = {
5657    { nir_search_value_variable, 0 },
5658    0, /* a */
5659    false,
5660    nir_type_invalid,
5661    NULL,
5662 };
5663 
5664 static const nir_search_variable search112_0_1 = {
5665    { nir_search_value_variable, 0 },
5666    1, /* b */
5667    false,
5668    nir_type_invalid,
5669    NULL,
5670 };
5671 static const nir_search_expression search112_0 = {
5672    { nir_search_value_expression, 0 },
5673    false,
5674    nir_op_sge,
5675    { &search112_0_0.value, &search112_0_1.value },
5676    NULL,
5677 };
5678 static const nir_search_expression search112 = {
5679    { nir_search_value_expression, 0 },
5680    false,
5681    nir_op_fabs,
5682    { &search112_0.value },
5683    NULL,
5684 };
5685 
5686 static const nir_search_variable replace112_0 = {
5687    { nir_search_value_variable, 0 },
5688    0, /* a */
5689    false,
5690    nir_type_invalid,
5691    NULL,
5692 };
5693 
5694 static const nir_search_variable replace112_1 = {
5695    { nir_search_value_variable, 0 },
5696    1, /* b */
5697    false,
5698    nir_type_invalid,
5699    NULL,
5700 };
5701 static const nir_search_expression replace112 = {
5702    { nir_search_value_expression, 0 },
5703    false,
5704    nir_op_sge,
5705    { &replace112_0.value, &replace112_1.value },
5706    NULL,
5707 };
5708 
5709 static const nir_search_variable search113_0_0 = {
5710    { nir_search_value_variable, 0 },
5711    0, /* a */
5712    false,
5713    nir_type_invalid,
5714    NULL,
5715 };
5716 
5717 static const nir_search_variable search113_0_1 = {
5718    { nir_search_value_variable, 0 },
5719    1, /* b */
5720    false,
5721    nir_type_invalid,
5722    NULL,
5723 };
5724 static const nir_search_expression search113_0 = {
5725    { nir_search_value_expression, 0 },
5726    false,
5727    nir_op_seq,
5728    { &search113_0_0.value, &search113_0_1.value },
5729    NULL,
5730 };
5731 static const nir_search_expression search113 = {
5732    { nir_search_value_expression, 0 },
5733    false,
5734    nir_op_fabs,
5735    { &search113_0.value },
5736    NULL,
5737 };
5738 
5739 static const nir_search_variable replace113_0 = {
5740    { nir_search_value_variable, 0 },
5741    0, /* a */
5742    false,
5743    nir_type_invalid,
5744    NULL,
5745 };
5746 
5747 static const nir_search_variable replace113_1 = {
5748    { nir_search_value_variable, 0 },
5749    1, /* b */
5750    false,
5751    nir_type_invalid,
5752    NULL,
5753 };
5754 static const nir_search_expression replace113 = {
5755    { nir_search_value_expression, 0 },
5756    false,
5757    nir_op_seq,
5758    { &replace113_0.value, &replace113_1.value },
5759    NULL,
5760 };
5761 
5762 static const nir_search_variable search114_0_0 = {
5763    { nir_search_value_variable, 0 },
5764    0, /* a */
5765    false,
5766    nir_type_invalid,
5767    NULL,
5768 };
5769 
5770 static const nir_search_variable search114_0_1 = {
5771    { nir_search_value_variable, 0 },
5772    1, /* b */
5773    false,
5774    nir_type_invalid,
5775    NULL,
5776 };
5777 static const nir_search_expression search114_0 = {
5778    { nir_search_value_expression, 0 },
5779    false,
5780    nir_op_sne,
5781    { &search114_0_0.value, &search114_0_1.value },
5782    NULL,
5783 };
5784 static const nir_search_expression search114 = {
5785    { nir_search_value_expression, 0 },
5786    false,
5787    nir_op_fabs,
5788    { &search114_0.value },
5789    NULL,
5790 };
5791 
5792 static const nir_search_variable replace114_0 = {
5793    { nir_search_value_variable, 0 },
5794    0, /* a */
5795    false,
5796    nir_type_invalid,
5797    NULL,
5798 };
5799 
5800 static const nir_search_variable replace114_1 = {
5801    { nir_search_value_variable, 0 },
5802    1, /* b */
5803    false,
5804    nir_type_invalid,
5805    NULL,
5806 };
5807 static const nir_search_expression replace114 = {
5808    { nir_search_value_expression, 0 },
5809    false,
5810    nir_op_sne,
5811    { &replace114_0.value, &replace114_1.value },
5812    NULL,
5813 };
5814 
5815 static const nir_search_variable search200_0_0 = {
5816    { nir_search_value_variable, 0 },
5817    0, /* a */
5818    false,
5819    nir_type_invalid,
5820    NULL,
5821 };
5822 static const nir_search_expression search200_0 = {
5823    { nir_search_value_expression, 0 },
5824    false,
5825    nir_op_b2f,
5826    { &search200_0_0.value },
5827    NULL,
5828 };
5829 static const nir_search_expression search200 = {
5830    { nir_search_value_expression, 0 },
5831    false,
5832    nir_op_fabs,
5833    { &search200_0.value },
5834    NULL,
5835 };
5836 
5837 static const nir_search_variable replace200_0 = {
5838    { nir_search_value_variable, 0 },
5839    0, /* a */
5840    false,
5841    nir_type_invalid,
5842    NULL,
5843 };
5844 static const nir_search_expression replace200 = {
5845    { nir_search_value_expression, 0 },
5846    false,
5847    nir_op_b2f,
5848    { &replace200_0.value },
5849    NULL,
5850 };
5851 
5852 static const nir_search_constant search221_0_0 = {
5853    { nir_search_value_constant, 0 },
5854    nir_type_float, { 0x0 /* 0.0 */ },
5855 };
5856 
5857 static const nir_search_variable search221_0_1 = {
5858    { nir_search_value_variable, 0 },
5859    0, /* a */
5860    false,
5861    nir_type_invalid,
5862    NULL,
5863 };
5864 static const nir_search_expression search221_0 = {
5865    { nir_search_value_expression, 0 },
5866    false,
5867    nir_op_fsub,
5868    { &search221_0_0.value, &search221_0_1.value },
5869    NULL,
5870 };
5871 static const nir_search_expression search221 = {
5872    { nir_search_value_expression, 0 },
5873    false,
5874    nir_op_fabs,
5875    { &search221_0.value },
5876    NULL,
5877 };
5878 
5879 static const nir_search_variable replace221_0 = {
5880    { nir_search_value_variable, 0 },
5881    0, /* a */
5882    false,
5883    nir_type_invalid,
5884    NULL,
5885 };
5886 static const nir_search_expression replace221 = {
5887    { nir_search_value_expression, 0 },
5888    false,
5889    nir_op_fabs,
5890    { &replace221_0.value },
5891    NULL,
5892 };
5893 
5894 static const struct transform nir_opt_algebraic_fabs_xforms[] = {
5895    { &search12, &replace12.value, 0 },
5896    { &search13, &replace13.value, 0 },
5897    { &search14, &replace14.value, 0 },
5898    { &search111, &replace111.value, 0 },
5899    { &search112, &replace112.value, 0 },
5900    { &search113, &replace113.value, 0 },
5901    { &search114, &replace114.value, 0 },
5902    { &search200, &replace200.value, 0 },
5903    { &search221, &replace221.value, 0 },
5904 };
5905 
5906 static const nir_search_variable search5_0 = {
5907    { nir_search_value_variable, 0 },
5908    0, /* a */
5909    false,
5910    nir_type_invalid,
5911    NULL,
5912 };
5913 
5914 static const nir_search_constant search5_1 = {
5915    { nir_search_value_constant, 0 },
5916    nir_type_int, { 0x1 /* 1 */ },
5917 };
5918 static const nir_search_expression search5 = {
5919    { nir_search_value_expression, 0 },
5920    false,
5921    nir_op_imod,
5922    { &search5_0.value, &search5_1.value },
5923    NULL,
5924 };
5925 
5926 static const nir_search_constant replace5 = {
5927    { nir_search_value_constant, 0 },
5928    nir_type_int, { 0x0 /* 0 */ },
5929 };
5930 
5931 static const struct transform nir_opt_algebraic_imod_xforms[] = {
5932    { &search5, &replace5.value, 0 },
5933 };
5934 
5935 static const nir_search_variable search130_0 = {
5936    { nir_search_value_variable, 0 },
5937    0, /* a */
5938    false,
5939    nir_type_invalid,
5940    NULL,
5941 };
5942 
5943 static const nir_search_variable search130_1 = {
5944    { nir_search_value_variable, 0 },
5945    0, /* a */
5946    false,
5947    nir_type_invalid,
5948    NULL,
5949 };
5950 static const nir_search_expression search130 = {
5951    { nir_search_value_expression, 0 },
5952    false,
5953    nir_op_ieq,
5954    { &search130_0.value, &search130_1.value },
5955    NULL,
5956 };
5957 
5958 static const nir_search_constant replace130 = {
5959    { nir_search_value_constant, 32 },
5960    nir_type_bool32, { NIR_TRUE /* True */ },
5961 };
5962 
5963 static const nir_search_variable search180_0 = {
5964    { nir_search_value_variable, 32 },
5965    0, /* a */
5966    false,
5967    nir_type_bool32,
5968    NULL,
5969 };
5970 
5971 static const nir_search_constant search180_1 = {
5972    { nir_search_value_constant, 32 },
5973    nir_type_bool32, { NIR_TRUE /* True */ },
5974 };
5975 static const nir_search_expression search180 = {
5976    { nir_search_value_expression, 0 },
5977    false,
5978    nir_op_ieq,
5979    { &search180_0.value, &search180_1.value },
5980    NULL,
5981 };
5982 
5983 static const nir_search_variable replace180 = {
5984    { nir_search_value_variable, 0 },
5985    0, /* a */
5986    false,
5987    nir_type_invalid,
5988    NULL,
5989 };
5990 
5991 static const nir_search_variable search183_0 = {
5992    { nir_search_value_variable, 32 },
5993    0, /* a */
5994    false,
5995    nir_type_bool32,
5996    NULL,
5997 };
5998 
5999 static const nir_search_constant search183_1 = {
6000    { nir_search_value_constant, 32 },
6001    nir_type_bool32, { NIR_FALSE /* False */ },
6002 };
6003 static const nir_search_expression search183 = {
6004    { nir_search_value_expression, 0 },
6005    false,
6006    nir_op_ieq,
6007    { &search183_0.value, &search183_1.value },
6008    (is_not_used_by_if),
6009 };
6010 
6011 static const nir_search_variable replace183_0 = {
6012    { nir_search_value_variable, 0 },
6013    0, /* a */
6014    false,
6015    nir_type_invalid,
6016    NULL,
6017 };
6018 static const nir_search_expression replace183 = {
6019    { nir_search_value_expression, 0 },
6020    false,
6021    nir_op_inot,
6022    { &replace183_0.value },
6023    NULL,
6024 };
6025 
6026 static const nir_search_variable search281_0_0 = {
6027    { nir_search_value_variable, 0 },
6028    0, /* a */
6029    false,
6030    nir_type_invalid,
6031    NULL,
6032 };
6033 
6034 static const nir_search_variable search281_0_1 = {
6035    { nir_search_value_variable, 0 },
6036    1, /* b */
6037    true,
6038    nir_type_invalid,
6039    NULL,
6040 };
6041 
6042 static const nir_search_variable search281_0_2 = {
6043    { nir_search_value_variable, 0 },
6044    2, /* c */
6045    true,
6046    nir_type_invalid,
6047    NULL,
6048 };
6049 static const nir_search_expression search281_0 = {
6050    { nir_search_value_expression, 0 },
6051    false,
6052    nir_op_bcsel,
6053    { &search281_0_0.value, &search281_0_1.value, &search281_0_2.value },
6054    NULL,
6055 };
6056 
6057 static const nir_search_variable search281_1 = {
6058    { nir_search_value_variable, 0 },
6059    3, /* d */
6060    true,
6061    nir_type_invalid,
6062    NULL,
6063 };
6064 static const nir_search_expression search281 = {
6065    { nir_search_value_expression, 0 },
6066    false,
6067    nir_op_ieq,
6068    { &search281_0.value, &search281_1.value },
6069    NULL,
6070 };
6071 
6072 static const nir_search_variable replace281_0 = {
6073    { nir_search_value_variable, 0 },
6074    0, /* a */
6075    false,
6076    nir_type_invalid,
6077    NULL,
6078 };
6079 
6080 static const nir_search_variable replace281_1_0 = {
6081    { nir_search_value_variable, 0 },
6082    1, /* b */
6083    false,
6084    nir_type_invalid,
6085    NULL,
6086 };
6087 
6088 static const nir_search_variable replace281_1_1 = {
6089    { nir_search_value_variable, 0 },
6090    3, /* d */
6091    false,
6092    nir_type_invalid,
6093    NULL,
6094 };
6095 static const nir_search_expression replace281_1 = {
6096    { nir_search_value_expression, 0 },
6097    false,
6098    nir_op_ieq,
6099    { &replace281_1_0.value, &replace281_1_1.value },
6100    NULL,
6101 };
6102 
6103 static const nir_search_variable replace281_2_0 = {
6104    { nir_search_value_variable, 0 },
6105    2, /* c */
6106    false,
6107    nir_type_invalid,
6108    NULL,
6109 };
6110 
6111 static const nir_search_variable replace281_2_1 = {
6112    { nir_search_value_variable, 0 },
6113    3, /* d */
6114    false,
6115    nir_type_invalid,
6116    NULL,
6117 };
6118 static const nir_search_expression replace281_2 = {
6119    { nir_search_value_expression, 0 },
6120    false,
6121    nir_op_ieq,
6122    { &replace281_2_0.value, &replace281_2_1.value },
6123    NULL,
6124 };
6125 static const nir_search_expression replace281 = {
6126    { nir_search_value_expression, 0 },
6127    false,
6128    nir_op_bcsel,
6129    { &replace281_0.value, &replace281_1.value, &replace281_2.value },
6130    NULL,
6131 };
6132 
6133 static const nir_search_variable search282_0 = {
6134    { nir_search_value_variable, 0 },
6135    0, /* d */
6136    true,
6137    nir_type_invalid,
6138    NULL,
6139 };
6140 
6141 static const nir_search_variable search282_1_0 = {
6142    { nir_search_value_variable, 0 },
6143    1, /* a */
6144    false,
6145    nir_type_invalid,
6146    NULL,
6147 };
6148 
6149 static const nir_search_variable search282_1_1 = {
6150    { nir_search_value_variable, 0 },
6151    2, /* b */
6152    true,
6153    nir_type_invalid,
6154    NULL,
6155 };
6156 
6157 static const nir_search_variable search282_1_2 = {
6158    { nir_search_value_variable, 0 },
6159    3, /* c */
6160    true,
6161    nir_type_invalid,
6162    NULL,
6163 };
6164 static const nir_search_expression search282_1 = {
6165    { nir_search_value_expression, 0 },
6166    false,
6167    nir_op_bcsel,
6168    { &search282_1_0.value, &search282_1_1.value, &search282_1_2.value },
6169    NULL,
6170 };
6171 static const nir_search_expression search282 = {
6172    { nir_search_value_expression, 0 },
6173    false,
6174    nir_op_ieq,
6175    { &search282_0.value, &search282_1.value },
6176    NULL,
6177 };
6178 
6179 static const nir_search_variable replace282_0 = {
6180    { nir_search_value_variable, 0 },
6181    1, /* a */
6182    false,
6183    nir_type_invalid,
6184    NULL,
6185 };
6186 
6187 static const nir_search_variable replace282_1_0 = {
6188    { nir_search_value_variable, 0 },
6189    0, /* d */
6190    false,
6191    nir_type_invalid,
6192    NULL,
6193 };
6194 
6195 static const nir_search_variable replace282_1_1 = {
6196    { nir_search_value_variable, 0 },
6197    2, /* b */
6198    false,
6199    nir_type_invalid,
6200    NULL,
6201 };
6202 static const nir_search_expression replace282_1 = {
6203    { nir_search_value_expression, 0 },
6204    false,
6205    nir_op_ieq,
6206    { &replace282_1_0.value, &replace282_1_1.value },
6207    NULL,
6208 };
6209 
6210 static const nir_search_variable replace282_2_0 = {
6211    { nir_search_value_variable, 0 },
6212    0, /* d */
6213    false,
6214    nir_type_invalid,
6215    NULL,
6216 };
6217 
6218 static const nir_search_variable replace282_2_1 = {
6219    { nir_search_value_variable, 0 },
6220    3, /* c */
6221    false,
6222    nir_type_invalid,
6223    NULL,
6224 };
6225 static const nir_search_expression replace282_2 = {
6226    { nir_search_value_expression, 0 },
6227    false,
6228    nir_op_ieq,
6229    { &replace282_2_0.value, &replace282_2_1.value },
6230    NULL,
6231 };
6232 static const nir_search_expression replace282 = {
6233    { nir_search_value_expression, 0 },
6234    false,
6235    nir_op_bcsel,
6236    { &replace282_0.value, &replace282_1.value, &replace282_2.value },
6237    NULL,
6238 };
6239 
6240 static const struct transform nir_opt_algebraic_ieq_xforms[] = {
6241    { &search130, &replace130.value, 0 },
6242    { &search180, &replace180.value, 0 },
6243    { &search183, &replace183.value, 0 },
6244    { &search281, &replace281.value, 0 },
6245    { &search282, &replace282.value, 0 },
6246 };
6247 
6248 static const nir_search_variable search244_0 = {
6249    { nir_search_value_variable, 0 },
6250    0, /* a */
6251    false,
6252    nir_type_invalid,
6253    NULL,
6254 };
6255 
6256 static const nir_search_variable search244_1 = {
6257    { nir_search_value_variable, 0 },
6258    1, /* b */
6259    false,
6260    nir_type_invalid,
6261    NULL,
6262 };
6263 static const nir_search_expression search244 = {
6264    { nir_search_value_expression, 32 },
6265    false,
6266    nir_op_usub_borrow,
6267    { &search244_0.value, &search244_1.value },
6268    NULL,
6269 };
6270 
6271 static const nir_search_variable replace244_0_0 = {
6272    { nir_search_value_variable, 0 },
6273    0, /* a */
6274    false,
6275    nir_type_invalid,
6276    NULL,
6277 };
6278 
6279 static const nir_search_variable replace244_0_1 = {
6280    { nir_search_value_variable, 0 },
6281    1, /* b */
6282    false,
6283    nir_type_invalid,
6284    NULL,
6285 };
6286 static const nir_search_expression replace244_0 = {
6287    { nir_search_value_expression, 0 },
6288    false,
6289    nir_op_ult,
6290    { &replace244_0_0.value, &replace244_0_1.value },
6291    NULL,
6292 };
6293 static const nir_search_expression replace244 = {
6294    { nir_search_value_expression, 0 },
6295    false,
6296    nir_op_b2i,
6297    { &replace244_0.value },
6298    NULL,
6299 };
6300 
6301 static const struct transform nir_opt_algebraic_usub_borrow_xforms[] = {
6302    { &search244, &replace244.value, 24 },
6303 };
6304 
6305 static const nir_search_variable search81_0 = {
6306    { nir_search_value_variable, 0 },
6307    0, /* a */
6308    false,
6309    nir_type_invalid,
6310    NULL,
6311 };
6312 
6313 static const nir_search_variable search81_1 = {
6314    { nir_search_value_variable, 0 },
6315    0, /* a */
6316    false,
6317    nir_type_invalid,
6318    NULL,
6319 };
6320 static const nir_search_expression search81 = {
6321    { nir_search_value_expression, 0 },
6322    false,
6323    nir_op_imin,
6324    { &search81_0.value, &search81_1.value },
6325    NULL,
6326 };
6327 
6328 static const nir_search_variable replace81 = {
6329    { nir_search_value_variable, 0 },
6330    0, /* a */
6331    false,
6332    nir_type_invalid,
6333    NULL,
6334 };
6335 
6336 static const nir_search_variable search86_0 = {
6337    { nir_search_value_variable, 0 },
6338    0, /* a */
6339    false,
6340    nir_type_invalid,
6341    NULL,
6342 };
6343 
6344 static const nir_search_variable search86_1_0 = {
6345    { nir_search_value_variable, 0 },
6346    0, /* a */
6347    false,
6348    nir_type_invalid,
6349    NULL,
6350 };
6351 static const nir_search_expression search86_1 = {
6352    { nir_search_value_expression, 0 },
6353    false,
6354    nir_op_ineg,
6355    { &search86_1_0.value },
6356    NULL,
6357 };
6358 static const nir_search_expression search86 = {
6359    { nir_search_value_expression, 0 },
6360    false,
6361    nir_op_imin,
6362    { &search86_0.value, &search86_1.value },
6363    NULL,
6364 };
6365 
6366 static const nir_search_variable replace86_0_0 = {
6367    { nir_search_value_variable, 0 },
6368    0, /* a */
6369    false,
6370    nir_type_invalid,
6371    NULL,
6372 };
6373 static const nir_search_expression replace86_0 = {
6374    { nir_search_value_expression, 0 },
6375    false,
6376    nir_op_iabs,
6377    { &replace86_0_0.value },
6378    NULL,
6379 };
6380 static const nir_search_expression replace86 = {
6381    { nir_search_value_expression, 0 },
6382    false,
6383    nir_op_ineg,
6384    { &replace86_0.value },
6385    NULL,
6386 };
6387 
6388 static const nir_search_variable search88_0 = {
6389    { nir_search_value_variable, 0 },
6390    0, /* a */
6391    false,
6392    nir_type_invalid,
6393    NULL,
6394 };
6395 
6396 static const nir_search_variable search88_1_0_0 = {
6397    { nir_search_value_variable, 0 },
6398    0, /* a */
6399    false,
6400    nir_type_invalid,
6401    NULL,
6402 };
6403 static const nir_search_expression search88_1_0 = {
6404    { nir_search_value_expression, 0 },
6405    false,
6406    nir_op_iabs,
6407    { &search88_1_0_0.value },
6408    NULL,
6409 };
6410 static const nir_search_expression search88_1 = {
6411    { nir_search_value_expression, 0 },
6412    false,
6413    nir_op_ineg,
6414    { &search88_1_0.value },
6415    NULL,
6416 };
6417 static const nir_search_expression search88 = {
6418    { nir_search_value_expression, 0 },
6419    false,
6420    nir_op_imin,
6421    { &search88_0.value, &search88_1.value },
6422    NULL,
6423 };
6424 
6425 static const nir_search_variable replace88_0_0 = {
6426    { nir_search_value_variable, 0 },
6427    0, /* a */
6428    false,
6429    nir_type_invalid,
6430    NULL,
6431 };
6432 static const nir_search_expression replace88_0 = {
6433    { nir_search_value_expression, 0 },
6434    false,
6435    nir_op_iabs,
6436    { &replace88_0_0.value },
6437    NULL,
6438 };
6439 static const nir_search_expression replace88 = {
6440    { nir_search_value_expression, 0 },
6441    false,
6442    nir_op_ineg,
6443    { &replace88_0.value },
6444    NULL,
6445 };
6446 
6447 static const nir_search_variable search90_0 = {
6448    { nir_search_value_variable, 0 },
6449    0, /* a */
6450    false,
6451    nir_type_invalid,
6452    NULL,
6453 };
6454 
6455 static const nir_search_variable search90_1_0 = {
6456    { nir_search_value_variable, 0 },
6457    0, /* a */
6458    false,
6459    nir_type_invalid,
6460    NULL,
6461 };
6462 static const nir_search_expression search90_1 = {
6463    { nir_search_value_expression, 0 },
6464    false,
6465    nir_op_iabs,
6466    { &search90_1_0.value },
6467    NULL,
6468 };
6469 static const nir_search_expression search90 = {
6470    { nir_search_value_expression, 0 },
6471    false,
6472    nir_op_imin,
6473    { &search90_0.value, &search90_1.value },
6474    NULL,
6475 };
6476 
6477 static const nir_search_variable replace90 = {
6478    { nir_search_value_variable, 0 },
6479    0, /* a */
6480    false,
6481    nir_type_invalid,
6482    NULL,
6483 };
6484 
6485 static const nir_search_variable search102_0_0_0_0 = {
6486    { nir_search_value_variable, 0 },
6487    0, /* a */
6488    false,
6489    nir_type_invalid,
6490    NULL,
6491 };
6492 
6493 static const nir_search_variable search102_0_0_0_1 = {
6494    { nir_search_value_variable, 0 },
6495    1, /* b */
6496    false,
6497    nir_type_invalid,
6498    NULL,
6499 };
6500 static const nir_search_expression search102_0_0_0 = {
6501    { nir_search_value_expression, 0 },
6502    false,
6503    nir_op_imax,
6504    { &search102_0_0_0_0.value, &search102_0_0_0_1.value },
6505    NULL,
6506 };
6507 
6508 static const nir_search_variable search102_0_0_1 = {
6509    { nir_search_value_variable, 0 },
6510    2, /* c */
6511    false,
6512    nir_type_invalid,
6513    NULL,
6514 };
6515 static const nir_search_expression search102_0_0 = {
6516    { nir_search_value_expression, 0 },
6517    false,
6518    nir_op_imin,
6519    { &search102_0_0_0.value, &search102_0_0_1.value },
6520    NULL,
6521 };
6522 
6523 static const nir_search_variable search102_0_1 = {
6524    { nir_search_value_variable, 0 },
6525    1, /* b */
6526    false,
6527    nir_type_invalid,
6528    NULL,
6529 };
6530 static const nir_search_expression search102_0 = {
6531    { nir_search_value_expression, 0 },
6532    false,
6533    nir_op_imax,
6534    { &search102_0_0.value, &search102_0_1.value },
6535    NULL,
6536 };
6537 
6538 static const nir_search_variable search102_1 = {
6539    { nir_search_value_variable, 0 },
6540    2, /* c */
6541    false,
6542    nir_type_invalid,
6543    NULL,
6544 };
6545 static const nir_search_expression search102 = {
6546    { nir_search_value_expression, 0 },
6547    false,
6548    nir_op_imin,
6549    { &search102_0.value, &search102_1.value },
6550    NULL,
6551 };
6552 
6553 static const nir_search_variable replace102_0_0 = {
6554    { nir_search_value_variable, 0 },
6555    0, /* a */
6556    false,
6557    nir_type_invalid,
6558    NULL,
6559 };
6560 
6561 static const nir_search_variable replace102_0_1 = {
6562    { nir_search_value_variable, 0 },
6563    1, /* b */
6564    false,
6565    nir_type_invalid,
6566    NULL,
6567 };
6568 static const nir_search_expression replace102_0 = {
6569    { nir_search_value_expression, 0 },
6570    false,
6571    nir_op_imax,
6572    { &replace102_0_0.value, &replace102_0_1.value },
6573    NULL,
6574 };
6575 
6576 static const nir_search_variable replace102_1 = {
6577    { nir_search_value_variable, 0 },
6578    2, /* c */
6579    false,
6580    nir_type_invalid,
6581    NULL,
6582 };
6583 static const nir_search_expression replace102 = {
6584    { nir_search_value_expression, 0 },
6585    false,
6586    nir_op_imin,
6587    { &replace102_0.value, &replace102_1.value },
6588    NULL,
6589 };
6590 
6591 static const struct transform nir_opt_algebraic_imin_xforms[] = {
6592    { &search81, &replace81.value, 0 },
6593    { &search86, &replace86.value, 0 },
6594    { &search88, &replace88.value, 0 },
6595    { &search90, &replace90.value, 0 },
6596    { &search102, &replace102.value, 0 },
6597 };
6598 
6599 static const nir_search_variable search168_0_0 = {
6600    { nir_search_value_variable, 0 },
6601    0, /* a */
6602    false,
6603    nir_type_invalid,
6604    NULL,
6605 };
6606 static const nir_search_expression search168_0 = {
6607    { nir_search_value_expression, 0 },
6608    false,
6609    nir_op_fexp2,
6610    { &search168_0_0.value },
6611    NULL,
6612 };
6613 static const nir_search_expression search168 = {
6614    { nir_search_value_expression, 0 },
6615    true,
6616    nir_op_frsq,
6617    { &search168_0.value },
6618    NULL,
6619 };
6620 
6621 static const nir_search_constant replace168_0_0 = {
6622    { nir_search_value_constant, 0 },
6623    nir_type_float, { 0xbfe0000000000000L /* -0.5 */ },
6624 };
6625 
6626 static const nir_search_variable replace168_0_1 = {
6627    { nir_search_value_variable, 0 },
6628    0, /* a */
6629    false,
6630    nir_type_invalid,
6631    NULL,
6632 };
6633 static const nir_search_expression replace168_0 = {
6634    { nir_search_value_expression, 0 },
6635    false,
6636    nir_op_fmul,
6637    { &replace168_0_0.value, &replace168_0_1.value },
6638    NULL,
6639 };
6640 static const nir_search_expression replace168 = {
6641    { nir_search_value_expression, 0 },
6642    false,
6643    nir_op_fexp2,
6644    { &replace168_0.value },
6645    NULL,
6646 };
6647 
6648 static const struct transform nir_opt_algebraic_frsq_xforms[] = {
6649    { &search168, &replace168.value, 0 },
6650 };
6651 
6652 static const nir_search_variable search19_0 = {
6653    { nir_search_value_variable, 0 },
6654    0, /* a */
6655    false,
6656    nir_type_invalid,
6657    NULL,
6658 };
6659 
6660 static const nir_search_constant search19_1 = {
6661    { nir_search_value_constant, 0 },
6662    nir_type_int, { 0x0 /* 0 */ },
6663 };
6664 static const nir_search_expression search19 = {
6665    { nir_search_value_expression, 0 },
6666    false,
6667    nir_op_usadd_4x8,
6668    { &search19_0.value, &search19_1.value },
6669    NULL,
6670 };
6671 
6672 static const nir_search_variable replace19 = {
6673    { nir_search_value_variable, 0 },
6674    0, /* a */
6675    false,
6676    nir_type_invalid,
6677    NULL,
6678 };
6679 
6680 static const nir_search_variable search20_0 = {
6681    { nir_search_value_variable, 0 },
6682    0, /* a */
6683    false,
6684    nir_type_invalid,
6685    NULL,
6686 };
6687 
6688 static const nir_search_constant search20_1 = {
6689    { nir_search_value_constant, 0 },
6690    nir_type_int, { -0x1 /* -1 */ },
6691 };
6692 static const nir_search_expression search20 = {
6693    { nir_search_value_expression, 0 },
6694    false,
6695    nir_op_usadd_4x8,
6696    { &search20_0.value, &search20_1.value },
6697    NULL,
6698 };
6699 
6700 static const nir_search_constant replace20 = {
6701    { nir_search_value_constant, 0 },
6702    nir_type_int, { -0x1 /* -1 */ },
6703 };
6704 
6705 static const struct transform nir_opt_algebraic_usadd_4x8_xforms[] = {
6706    { &search19, &replace19.value, 0 },
6707    { &search20, &replace20.value, 0 },
6708 };
6709 
6710 static const nir_search_variable search3_0 = {
6711    { nir_search_value_variable, 0 },
6712    0, /* a */
6713    false,
6714    nir_type_invalid,
6715    NULL,
6716 };
6717 
6718 static const nir_search_constant search3_1 = {
6719    { nir_search_value_constant, 0 },
6720    nir_type_int, { 0x1 /* 1 */ },
6721 };
6722 static const nir_search_expression search3 = {
6723    { nir_search_value_expression, 0 },
6724    false,
6725    nir_op_idiv,
6726    { &search3_0.value, &search3_1.value },
6727    NULL,
6728 };
6729 
6730 static const nir_search_variable replace3 = {
6731    { nir_search_value_variable, 0 },
6732    0, /* a */
6733    false,
6734    nir_type_invalid,
6735    NULL,
6736 };
6737 
6738 static const nir_search_variable search7_0 = {
6739    { nir_search_value_variable, 0 },
6740    0, /* a */
6741    false,
6742    nir_type_invalid,
6743    NULL,
6744 };
6745 
6746 static const nir_search_variable search7_1 = {
6747    { nir_search_value_variable, 32 },
6748    1, /* b */
6749    true,
6750    nir_type_invalid,
6751    (is_pos_power_of_two),
6752 };
6753 static const nir_search_expression search7 = {
6754    { nir_search_value_expression, 0 },
6755    false,
6756    nir_op_idiv,
6757    { &search7_0.value, &search7_1.value },
6758    NULL,
6759 };
6760 
6761 static const nir_search_variable replace7_0_0 = {
6762    { nir_search_value_variable, 0 },
6763    0, /* a */
6764    false,
6765    nir_type_invalid,
6766    NULL,
6767 };
6768 static const nir_search_expression replace7_0 = {
6769    { nir_search_value_expression, 0 },
6770    false,
6771    nir_op_isign,
6772    { &replace7_0_0.value },
6773    NULL,
6774 };
6775 
6776 static const nir_search_variable replace7_1_0_0 = {
6777    { nir_search_value_variable, 0 },
6778    0, /* a */
6779    false,
6780    nir_type_invalid,
6781    NULL,
6782 };
6783 static const nir_search_expression replace7_1_0 = {
6784    { nir_search_value_expression, 0 },
6785    false,
6786    nir_op_iabs,
6787    { &replace7_1_0_0.value },
6788    NULL,
6789 };
6790 
6791 static const nir_search_variable replace7_1_1_0 = {
6792    { nir_search_value_variable, 0 },
6793    1, /* b */
6794    false,
6795    nir_type_invalid,
6796    NULL,
6797 };
6798 static const nir_search_expression replace7_1_1 = {
6799    { nir_search_value_expression, 0 },
6800    false,
6801    nir_op_find_lsb,
6802    { &replace7_1_1_0.value },
6803    NULL,
6804 };
6805 static const nir_search_expression replace7_1 = {
6806    { nir_search_value_expression, 0 },
6807    false,
6808    nir_op_ushr,
6809    { &replace7_1_0.value, &replace7_1_1.value },
6810    NULL,
6811 };
6812 static const nir_search_expression replace7 = {
6813    { nir_search_value_expression, 0 },
6814    false,
6815    nir_op_imul,
6816    { &replace7_0.value, &replace7_1.value },
6817    NULL,
6818 };
6819 
6820 static const nir_search_variable search8_0 = {
6821    { nir_search_value_variable, 0 },
6822    0, /* a */
6823    false,
6824    nir_type_invalid,
6825    NULL,
6826 };
6827 
6828 static const nir_search_variable search8_1 = {
6829    { nir_search_value_variable, 32 },
6830    1, /* b */
6831    true,
6832    nir_type_invalid,
6833    (is_neg_power_of_two),
6834 };
6835 static const nir_search_expression search8 = {
6836    { nir_search_value_expression, 0 },
6837    false,
6838    nir_op_idiv,
6839    { &search8_0.value, &search8_1.value },
6840    NULL,
6841 };
6842 
6843 static const nir_search_variable replace8_0_0_0 = {
6844    { nir_search_value_variable, 0 },
6845    0, /* a */
6846    false,
6847    nir_type_invalid,
6848    NULL,
6849 };
6850 static const nir_search_expression replace8_0_0 = {
6851    { nir_search_value_expression, 0 },
6852    false,
6853    nir_op_isign,
6854    { &replace8_0_0_0.value },
6855    NULL,
6856 };
6857 
6858 static const nir_search_variable replace8_0_1_0_0 = {
6859    { nir_search_value_variable, 0 },
6860    0, /* a */
6861    false,
6862    nir_type_invalid,
6863    NULL,
6864 };
6865 static const nir_search_expression replace8_0_1_0 = {
6866    { nir_search_value_expression, 0 },
6867    false,
6868    nir_op_iabs,
6869    { &replace8_0_1_0_0.value },
6870    NULL,
6871 };
6872 
6873 static const nir_search_variable replace8_0_1_1_0_0 = {
6874    { nir_search_value_variable, 0 },
6875    1, /* b */
6876    false,
6877    nir_type_invalid,
6878    NULL,
6879 };
6880 static const nir_search_expression replace8_0_1_1_0 = {
6881    { nir_search_value_expression, 0 },
6882    false,
6883    nir_op_iabs,
6884    { &replace8_0_1_1_0_0.value },
6885    NULL,
6886 };
6887 static const nir_search_expression replace8_0_1_1 = {
6888    { nir_search_value_expression, 0 },
6889    false,
6890    nir_op_find_lsb,
6891    { &replace8_0_1_1_0.value },
6892    NULL,
6893 };
6894 static const nir_search_expression replace8_0_1 = {
6895    { nir_search_value_expression, 0 },
6896    false,
6897    nir_op_ushr,
6898    { &replace8_0_1_0.value, &replace8_0_1_1.value },
6899    NULL,
6900 };
6901 static const nir_search_expression replace8_0 = {
6902    { nir_search_value_expression, 0 },
6903    false,
6904    nir_op_imul,
6905    { &replace8_0_0.value, &replace8_0_1.value },
6906    NULL,
6907 };
6908 static const nir_search_expression replace8 = {
6909    { nir_search_value_expression, 0 },
6910    false,
6911    nir_op_ineg,
6912    { &replace8_0.value },
6913    NULL,
6914 };
6915 
6916 static const struct transform nir_opt_algebraic_idiv_xforms[] = {
6917    { &search3, &replace3.value, 0 },
6918    { &search7, &replace7.value, 1 },
6919    { &search8, &replace8.value, 1 },
6920 };
6921 
6922 static const nir_search_variable search106_0_0_0 = {
6923    { nir_search_value_variable, 0 },
6924    0, /* a */
6925    false,
6926    nir_type_invalid,
6927    NULL,
6928 };
6929 
6930 static const nir_search_constant search106_0_0_1 = {
6931    { nir_search_value_constant, 0 },
6932    nir_type_int, { 0x0 /* 0 */ },
6933 };
6934 static const nir_search_expression search106_0_0 = {
6935    { nir_search_value_expression, 0 },
6936    false,
6937    nir_op_imax,
6938    { &search106_0_0_0.value, &search106_0_0_1.value },
6939    NULL,
6940 };
6941 
6942 static const nir_search_constant search106_0_1 = {
6943    { nir_search_value_constant, 0 },
6944    nir_type_int, { 0xff /* 255 */ },
6945 };
6946 static const nir_search_expression search106_0 = {
6947    { nir_search_value_expression, 0 },
6948    false,
6949    nir_op_imin,
6950    { &search106_0_0.value, &search106_0_1.value },
6951    NULL,
6952 };
6953 
6954 static const nir_search_constant search106_1 = {
6955    { nir_search_value_constant, 0 },
6956    nir_type_int, { 0x0 /* 0 */ },
6957 };
6958 static const nir_search_expression search106 = {
6959    { nir_search_value_expression, 0 },
6960    false,
6961    nir_op_extract_u8,
6962    { &search106_0.value, &search106_1.value },
6963    NULL,
6964 };
6965 
6966 static const nir_search_variable replace106_0_0 = {
6967    { nir_search_value_variable, 0 },
6968    0, /* a */
6969    false,
6970    nir_type_invalid,
6971    NULL,
6972 };
6973 
6974 static const nir_search_constant replace106_0_1 = {
6975    { nir_search_value_constant, 0 },
6976    nir_type_int, { 0x0 /* 0 */ },
6977 };
6978 static const nir_search_expression replace106_0 = {
6979    { nir_search_value_expression, 0 },
6980    false,
6981    nir_op_imax,
6982    { &replace106_0_0.value, &replace106_0_1.value },
6983    NULL,
6984 };
6985 
6986 static const nir_search_constant replace106_1 = {
6987    { nir_search_value_constant, 0 },
6988    nir_type_int, { 0xff /* 255 */ },
6989 };
6990 static const nir_search_expression replace106 = {
6991    { nir_search_value_expression, 0 },
6992    false,
6993    nir_op_imin,
6994    { &replace106_0.value, &replace106_1.value },
6995    NULL,
6996 };
6997 
6998 static const nir_search_variable search249_0 = {
6999    { nir_search_value_variable, 0 },
7000    0, /* a */
7001    false,
7002    nir_type_invalid,
7003    NULL,
7004 };
7005 
7006 static const nir_search_variable search249_1 = {
7007    { nir_search_value_variable, 32 },
7008    1, /* b */
7009    false,
7010    nir_type_invalid,
7011    NULL,
7012 };
7013 static const nir_search_expression search249 = {
7014    { nir_search_value_expression, 0 },
7015    false,
7016    nir_op_extract_u8,
7017    { &search249_0.value, &search249_1.value },
7018    NULL,
7019 };
7020 
7021 static const nir_search_variable replace249_0_0 = {
7022    { nir_search_value_variable, 0 },
7023    0, /* a */
7024    false,
7025    nir_type_invalid,
7026    NULL,
7027 };
7028 
7029 static const nir_search_variable replace249_0_1_0 = {
7030    { nir_search_value_variable, 0 },
7031    1, /* b */
7032    false,
7033    nir_type_invalid,
7034    NULL,
7035 };
7036 
7037 static const nir_search_constant replace249_0_1_1 = {
7038    { nir_search_value_constant, 0 },
7039    nir_type_int, { 0x8 /* 8 */ },
7040 };
7041 static const nir_search_expression replace249_0_1 = {
7042    { nir_search_value_expression, 0 },
7043    false,
7044    nir_op_imul,
7045    { &replace249_0_1_0.value, &replace249_0_1_1.value },
7046    NULL,
7047 };
7048 static const nir_search_expression replace249_0 = {
7049    { nir_search_value_expression, 0 },
7050    false,
7051    nir_op_ushr,
7052    { &replace249_0_0.value, &replace249_0_1.value },
7053    NULL,
7054 };
7055 
7056 static const nir_search_constant replace249_1 = {
7057    { nir_search_value_constant, 0 },
7058    nir_type_int, { 0xff /* 255 */ },
7059 };
7060 static const nir_search_expression replace249 = {
7061    { nir_search_value_expression, 0 },
7062    false,
7063    nir_op_iand,
7064    { &replace249_0.value, &replace249_1.value },
7065    NULL,
7066 };
7067 
7068 static const struct transform nir_opt_algebraic_extract_u8_xforms[] = {
7069    { &search106, &replace106.value, 0 },
7070    { &search249, &replace249.value, 27 },
7071 };
7072 
7073 static const nir_search_variable search254_0 = {
7074    { nir_search_value_variable, 0 },
7075    0, /* v */
7076    false,
7077    nir_type_invalid,
7078    NULL,
7079 };
7080 static const nir_search_expression search254 = {
7081    { nir_search_value_expression, 0 },
7082    false,
7083    nir_op_pack_snorm_2x16,
7084    { &search254_0.value },
7085    NULL,
7086 };
7087 
7088 static const nir_search_constant replace254_0_0_0_0_0 = {
7089    { nir_search_value_constant, 0 },
7090    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
7091 };
7092 
7093 static const nir_search_constant replace254_0_0_0_0_1_0 = {
7094    { nir_search_value_constant, 0 },
7095    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
7096 };
7097 
7098 static const nir_search_variable replace254_0_0_0_0_1_1 = {
7099    { nir_search_value_variable, 0 },
7100    0, /* v */
7101    false,
7102    nir_type_invalid,
7103    NULL,
7104 };
7105 static const nir_search_expression replace254_0_0_0_0_1 = {
7106    { nir_search_value_expression, 0 },
7107    false,
7108    nir_op_fmax,
7109    { &replace254_0_0_0_0_1_0.value, &replace254_0_0_0_0_1_1.value },
7110    NULL,
7111 };
7112 static const nir_search_expression replace254_0_0_0_0 = {
7113    { nir_search_value_expression, 0 },
7114    false,
7115    nir_op_fmin,
7116    { &replace254_0_0_0_0_0.value, &replace254_0_0_0_0_1.value },
7117    NULL,
7118 };
7119 
7120 static const nir_search_constant replace254_0_0_0_1 = {
7121    { nir_search_value_constant, 0 },
7122    nir_type_float, { 0x40dfffc000000000 /* 32767.0 */ },
7123 };
7124 static const nir_search_expression replace254_0_0_0 = {
7125    { nir_search_value_expression, 0 },
7126    false,
7127    nir_op_fmul,
7128    { &replace254_0_0_0_0.value, &replace254_0_0_0_1.value },
7129    NULL,
7130 };
7131 static const nir_search_expression replace254_0_0 = {
7132    { nir_search_value_expression, 0 },
7133    false,
7134    nir_op_fround_even,
7135    { &replace254_0_0_0.value },
7136    NULL,
7137 };
7138 static const nir_search_expression replace254_0 = {
7139    { nir_search_value_expression, 0 },
7140    false,
7141    nir_op_f2i32,
7142    { &replace254_0_0.value },
7143    NULL,
7144 };
7145 static const nir_search_expression replace254 = {
7146    { nir_search_value_expression, 0 },
7147    false,
7148    nir_op_pack_uvec2_to_uint,
7149    { &replace254_0.value },
7150    NULL,
7151 };
7152 
7153 static const struct transform nir_opt_algebraic_pack_snorm_2x16_xforms[] = {
7154    { &search254, &replace254.value, 31 },
7155 };
7156 
7157 static const nir_search_variable search157_0 = {
7158    { nir_search_value_variable, 0 },
7159    0, /* a */
7160    false,
7161    nir_type_invalid,
7162    NULL,
7163 };
7164 
7165 static const nir_search_variable search157_1 = {
7166    { nir_search_value_variable, 0 },
7167    1, /* b */
7168    false,
7169    nir_type_invalid,
7170    NULL,
7171 };
7172 static const nir_search_expression search157 = {
7173    { nir_search_value_expression, 0 },
7174    false,
7175    nir_op_fpow,
7176    { &search157_0.value, &search157_1.value },
7177    NULL,
7178 };
7179 
7180 static const nir_search_variable replace157_0_0_0 = {
7181    { nir_search_value_variable, 0 },
7182    0, /* a */
7183    false,
7184    nir_type_invalid,
7185    NULL,
7186 };
7187 static const nir_search_expression replace157_0_0 = {
7188    { nir_search_value_expression, 0 },
7189    false,
7190    nir_op_flog2,
7191    { &replace157_0_0_0.value },
7192    NULL,
7193 };
7194 
7195 static const nir_search_variable replace157_0_1 = {
7196    { nir_search_value_variable, 0 },
7197    1, /* b */
7198    false,
7199    nir_type_invalid,
7200    NULL,
7201 };
7202 static const nir_search_expression replace157_0 = {
7203    { nir_search_value_expression, 0 },
7204    false,
7205    nir_op_fmul,
7206    { &replace157_0_0.value, &replace157_0_1.value },
7207    NULL,
7208 };
7209 static const nir_search_expression replace157 = {
7210    { nir_search_value_expression, 0 },
7211    false,
7212    nir_op_fexp2,
7213    { &replace157_0.value },
7214    NULL,
7215 };
7216 
7217 static const nir_search_variable search160_0 = {
7218    { nir_search_value_variable, 0 },
7219    0, /* a */
7220    false,
7221    nir_type_invalid,
7222    NULL,
7223 };
7224 
7225 static const nir_search_constant search160_1 = {
7226    { nir_search_value_constant, 0 },
7227    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
7228 };
7229 static const nir_search_expression search160 = {
7230    { nir_search_value_expression, 0 },
7231    true,
7232    nir_op_fpow,
7233    { &search160_0.value, &search160_1.value },
7234    NULL,
7235 };
7236 
7237 static const nir_search_variable replace160 = {
7238    { nir_search_value_variable, 0 },
7239    0, /* a */
7240    false,
7241    nir_type_invalid,
7242    NULL,
7243 };
7244 
7245 static const nir_search_variable search161_0 = {
7246    { nir_search_value_variable, 0 },
7247    0, /* a */
7248    false,
7249    nir_type_invalid,
7250    NULL,
7251 };
7252 
7253 static const nir_search_constant search161_1 = {
7254    { nir_search_value_constant, 0 },
7255    nir_type_float, { 0x4000000000000000 /* 2.0 */ },
7256 };
7257 static const nir_search_expression search161 = {
7258    { nir_search_value_expression, 0 },
7259    true,
7260    nir_op_fpow,
7261    { &search161_0.value, &search161_1.value },
7262    NULL,
7263 };
7264 
7265 static const nir_search_variable replace161_0 = {
7266    { nir_search_value_variable, 0 },
7267    0, /* a */
7268    false,
7269    nir_type_invalid,
7270    NULL,
7271 };
7272 
7273 static const nir_search_variable replace161_1 = {
7274    { nir_search_value_variable, 0 },
7275    0, /* a */
7276    false,
7277    nir_type_invalid,
7278    NULL,
7279 };
7280 static const nir_search_expression replace161 = {
7281    { nir_search_value_expression, 0 },
7282    false,
7283    nir_op_fmul,
7284    { &replace161_0.value, &replace161_1.value },
7285    NULL,
7286 };
7287 
7288 static const nir_search_variable search162_0 = {
7289    { nir_search_value_variable, 0 },
7290    0, /* a */
7291    false,
7292    nir_type_invalid,
7293    NULL,
7294 };
7295 
7296 static const nir_search_constant search162_1 = {
7297    { nir_search_value_constant, 0 },
7298    nir_type_float, { 0x4010000000000000 /* 4.0 */ },
7299 };
7300 static const nir_search_expression search162 = {
7301    { nir_search_value_expression, 0 },
7302    true,
7303    nir_op_fpow,
7304    { &search162_0.value, &search162_1.value },
7305    NULL,
7306 };
7307 
7308 static const nir_search_variable replace162_0_0 = {
7309    { nir_search_value_variable, 0 },
7310    0, /* a */
7311    false,
7312    nir_type_invalid,
7313    NULL,
7314 };
7315 
7316 static const nir_search_variable replace162_0_1 = {
7317    { nir_search_value_variable, 0 },
7318    0, /* a */
7319    false,
7320    nir_type_invalid,
7321    NULL,
7322 };
7323 static const nir_search_expression replace162_0 = {
7324    { nir_search_value_expression, 0 },
7325    false,
7326    nir_op_fmul,
7327    { &replace162_0_0.value, &replace162_0_1.value },
7328    NULL,
7329 };
7330 
7331 static const nir_search_variable replace162_1_0 = {
7332    { nir_search_value_variable, 0 },
7333    0, /* a */
7334    false,
7335    nir_type_invalid,
7336    NULL,
7337 };
7338 
7339 static const nir_search_variable replace162_1_1 = {
7340    { nir_search_value_variable, 0 },
7341    0, /* a */
7342    false,
7343    nir_type_invalid,
7344    NULL,
7345 };
7346 static const nir_search_expression replace162_1 = {
7347    { nir_search_value_expression, 0 },
7348    false,
7349    nir_op_fmul,
7350    { &replace162_1_0.value, &replace162_1_1.value },
7351    NULL,
7352 };
7353 static const nir_search_expression replace162 = {
7354    { nir_search_value_expression, 0 },
7355    false,
7356    nir_op_fmul,
7357    { &replace162_0.value, &replace162_1.value },
7358    NULL,
7359 };
7360 
7361 static const nir_search_constant search163_0 = {
7362    { nir_search_value_constant, 0 },
7363    nir_type_float, { 0x4000000000000000 /* 2.0 */ },
7364 };
7365 
7366 static const nir_search_variable search163_1 = {
7367    { nir_search_value_variable, 0 },
7368    0, /* a */
7369    false,
7370    nir_type_invalid,
7371    NULL,
7372 };
7373 static const nir_search_expression search163 = {
7374    { nir_search_value_expression, 0 },
7375    true,
7376    nir_op_fpow,
7377    { &search163_0.value, &search163_1.value },
7378    NULL,
7379 };
7380 
7381 static const nir_search_variable replace163_0 = {
7382    { nir_search_value_variable, 0 },
7383    0, /* a */
7384    false,
7385    nir_type_invalid,
7386    NULL,
7387 };
7388 static const nir_search_expression replace163 = {
7389    { nir_search_value_expression, 0 },
7390    false,
7391    nir_op_fexp2,
7392    { &replace163_0.value },
7393    NULL,
7394 };
7395 
7396 static const nir_search_variable search164_0_0 = {
7397    { nir_search_value_variable, 0 },
7398    0, /* a */
7399    false,
7400    nir_type_invalid,
7401    NULL,
7402 };
7403 
7404 static const nir_search_constant search164_0_1 = {
7405    { nir_search_value_constant, 0 },
7406    nir_type_float, { 0x400199999999999a /* 2.2 */ },
7407 };
7408 static const nir_search_expression search164_0 = {
7409    { nir_search_value_expression, 0 },
7410    false,
7411    nir_op_fpow,
7412    { &search164_0_0.value, &search164_0_1.value },
7413    NULL,
7414 };
7415 
7416 static const nir_search_constant search164_1 = {
7417    { nir_search_value_constant, 0 },
7418    nir_type_float, { 0x3fdd1743e963dc48 /* 0.454545 */ },
7419 };
7420 static const nir_search_expression search164 = {
7421    { nir_search_value_expression, 0 },
7422    true,
7423    nir_op_fpow,
7424    { &search164_0.value, &search164_1.value },
7425    NULL,
7426 };
7427 
7428 static const nir_search_variable replace164 = {
7429    { nir_search_value_variable, 0 },
7430    0, /* a */
7431    false,
7432    nir_type_invalid,
7433    NULL,
7434 };
7435 
7436 static const nir_search_variable search165_0_0_0 = {
7437    { nir_search_value_variable, 0 },
7438    0, /* a */
7439    false,
7440    nir_type_invalid,
7441    NULL,
7442 };
7443 
7444 static const nir_search_constant search165_0_0_1 = {
7445    { nir_search_value_constant, 0 },
7446    nir_type_float, { 0x400199999999999a /* 2.2 */ },
7447 };
7448 static const nir_search_expression search165_0_0 = {
7449    { nir_search_value_expression, 0 },
7450    false,
7451    nir_op_fpow,
7452    { &search165_0_0_0.value, &search165_0_0_1.value },
7453    NULL,
7454 };
7455 static const nir_search_expression search165_0 = {
7456    { nir_search_value_expression, 0 },
7457    false,
7458    nir_op_fabs,
7459    { &search165_0_0.value },
7460    NULL,
7461 };
7462 
7463 static const nir_search_constant search165_1 = {
7464    { nir_search_value_constant, 0 },
7465    nir_type_float, { 0x3fdd1743e963dc48 /* 0.454545 */ },
7466 };
7467 static const nir_search_expression search165 = {
7468    { nir_search_value_expression, 0 },
7469    true,
7470    nir_op_fpow,
7471    { &search165_0.value, &search165_1.value },
7472    NULL,
7473 };
7474 
7475 static const nir_search_variable replace165_0 = {
7476    { nir_search_value_variable, 0 },
7477    0, /* a */
7478    false,
7479    nir_type_invalid,
7480    NULL,
7481 };
7482 static const nir_search_expression replace165 = {
7483    { nir_search_value_expression, 0 },
7484    false,
7485    nir_op_fabs,
7486    { &replace165_0.value },
7487    NULL,
7488 };
7489 
7490 static const struct transform nir_opt_algebraic_fpow_xforms[] = {
7491    { &search157, &replace157.value, 12 },
7492    { &search160, &replace160.value, 0 },
7493    { &search161, &replace161.value, 0 },
7494    { &search162, &replace162.value, 0 },
7495    { &search163, &replace163.value, 0 },
7496    { &search164, &replace164.value, 0 },
7497    { &search165, &replace165.value, 0 },
7498 };
7499 
7500 static const nir_search_variable search129_0 = {
7501    { nir_search_value_variable, 0 },
7502    0, /* a */
7503    false,
7504    nir_type_invalid,
7505    NULL,
7506 };
7507 
7508 static const nir_search_variable search129_1 = {
7509    { nir_search_value_variable, 0 },
7510    0, /* a */
7511    false,
7512    nir_type_invalid,
7513    NULL,
7514 };
7515 static const nir_search_expression search129 = {
7516    { nir_search_value_expression, 0 },
7517    false,
7518    nir_op_ige,
7519    { &search129_0.value, &search129_1.value },
7520    NULL,
7521 };
7522 
7523 static const nir_search_constant replace129 = {
7524    { nir_search_value_constant, 32 },
7525    nir_type_bool32, { NIR_TRUE /* True */ },
7526 };
7527 
7528 static const nir_search_variable search279_0_0 = {
7529    { nir_search_value_variable, 0 },
7530    0, /* a */
7531    false,
7532    nir_type_invalid,
7533    NULL,
7534 };
7535 
7536 static const nir_search_variable search279_0_1 = {
7537    { nir_search_value_variable, 0 },
7538    1, /* b */
7539    true,
7540    nir_type_invalid,
7541    NULL,
7542 };
7543 
7544 static const nir_search_variable search279_0_2 = {
7545    { nir_search_value_variable, 0 },
7546    2, /* c */
7547    true,
7548    nir_type_invalid,
7549    NULL,
7550 };
7551 static const nir_search_expression search279_0 = {
7552    { nir_search_value_expression, 0 },
7553    false,
7554    nir_op_bcsel,
7555    { &search279_0_0.value, &search279_0_1.value, &search279_0_2.value },
7556    NULL,
7557 };
7558 
7559 static const nir_search_variable search279_1 = {
7560    { nir_search_value_variable, 0 },
7561    3, /* d */
7562    true,
7563    nir_type_invalid,
7564    NULL,
7565 };
7566 static const nir_search_expression search279 = {
7567    { nir_search_value_expression, 0 },
7568    false,
7569    nir_op_ige,
7570    { &search279_0.value, &search279_1.value },
7571    NULL,
7572 };
7573 
7574 static const nir_search_variable replace279_0 = {
7575    { nir_search_value_variable, 0 },
7576    0, /* a */
7577    false,
7578    nir_type_invalid,
7579    NULL,
7580 };
7581 
7582 static const nir_search_variable replace279_1_0 = {
7583    { nir_search_value_variable, 0 },
7584    1, /* b */
7585    false,
7586    nir_type_invalid,
7587    NULL,
7588 };
7589 
7590 static const nir_search_variable replace279_1_1 = {
7591    { nir_search_value_variable, 0 },
7592    3, /* d */
7593    false,
7594    nir_type_invalid,
7595    NULL,
7596 };
7597 static const nir_search_expression replace279_1 = {
7598    { nir_search_value_expression, 0 },
7599    false,
7600    nir_op_ige,
7601    { &replace279_1_0.value, &replace279_1_1.value },
7602    NULL,
7603 };
7604 
7605 static const nir_search_variable replace279_2_0 = {
7606    { nir_search_value_variable, 0 },
7607    2, /* c */
7608    false,
7609    nir_type_invalid,
7610    NULL,
7611 };
7612 
7613 static const nir_search_variable replace279_2_1 = {
7614    { nir_search_value_variable, 0 },
7615    3, /* d */
7616    false,
7617    nir_type_invalid,
7618    NULL,
7619 };
7620 static const nir_search_expression replace279_2 = {
7621    { nir_search_value_expression, 0 },
7622    false,
7623    nir_op_ige,
7624    { &replace279_2_0.value, &replace279_2_1.value },
7625    NULL,
7626 };
7627 static const nir_search_expression replace279 = {
7628    { nir_search_value_expression, 0 },
7629    false,
7630    nir_op_bcsel,
7631    { &replace279_0.value, &replace279_1.value, &replace279_2.value },
7632    NULL,
7633 };
7634 
7635 static const nir_search_variable search280_0 = {
7636    { nir_search_value_variable, 0 },
7637    0, /* d */
7638    true,
7639    nir_type_invalid,
7640    NULL,
7641 };
7642 
7643 static const nir_search_variable search280_1_0 = {
7644    { nir_search_value_variable, 0 },
7645    1, /* a */
7646    false,
7647    nir_type_invalid,
7648    NULL,
7649 };
7650 
7651 static const nir_search_variable search280_1_1 = {
7652    { nir_search_value_variable, 0 },
7653    2, /* b */
7654    true,
7655    nir_type_invalid,
7656    NULL,
7657 };
7658 
7659 static const nir_search_variable search280_1_2 = {
7660    { nir_search_value_variable, 0 },
7661    3, /* c */
7662    true,
7663    nir_type_invalid,
7664    NULL,
7665 };
7666 static const nir_search_expression search280_1 = {
7667    { nir_search_value_expression, 0 },
7668    false,
7669    nir_op_bcsel,
7670    { &search280_1_0.value, &search280_1_1.value, &search280_1_2.value },
7671    NULL,
7672 };
7673 static const nir_search_expression search280 = {
7674    { nir_search_value_expression, 0 },
7675    false,
7676    nir_op_ige,
7677    { &search280_0.value, &search280_1.value },
7678    NULL,
7679 };
7680 
7681 static const nir_search_variable replace280_0 = {
7682    { nir_search_value_variable, 0 },
7683    1, /* a */
7684    false,
7685    nir_type_invalid,
7686    NULL,
7687 };
7688 
7689 static const nir_search_variable replace280_1_0 = {
7690    { nir_search_value_variable, 0 },
7691    0, /* d */
7692    false,
7693    nir_type_invalid,
7694    NULL,
7695 };
7696 
7697 static const nir_search_variable replace280_1_1 = {
7698    { nir_search_value_variable, 0 },
7699    2, /* b */
7700    false,
7701    nir_type_invalid,
7702    NULL,
7703 };
7704 static const nir_search_expression replace280_1 = {
7705    { nir_search_value_expression, 0 },
7706    false,
7707    nir_op_ige,
7708    { &replace280_1_0.value, &replace280_1_1.value },
7709    NULL,
7710 };
7711 
7712 static const nir_search_variable replace280_2_0 = {
7713    { nir_search_value_variable, 0 },
7714    0, /* d */
7715    false,
7716    nir_type_invalid,
7717    NULL,
7718 };
7719 
7720 static const nir_search_variable replace280_2_1 = {
7721    { nir_search_value_variable, 0 },
7722    3, /* c */
7723    false,
7724    nir_type_invalid,
7725    NULL,
7726 };
7727 static const nir_search_expression replace280_2 = {
7728    { nir_search_value_expression, 0 },
7729    false,
7730    nir_op_ige,
7731    { &replace280_2_0.value, &replace280_2_1.value },
7732    NULL,
7733 };
7734 static const nir_search_expression replace280 = {
7735    { nir_search_value_expression, 0 },
7736    false,
7737    nir_op_bcsel,
7738    { &replace280_0.value, &replace280_1.value, &replace280_2.value },
7739    NULL,
7740 };
7741 
7742 static const struct transform nir_opt_algebraic_ige_xforms[] = {
7743    { &search129, &replace129.value, 0 },
7744    { &search279, &replace279.value, 0 },
7745    { &search280, &replace280.value, 0 },
7746 };
7747 
7748 static const nir_search_constant search174_0 = {
7749    { nir_search_value_constant, 0 },
7750    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
7751 };
7752 
7753 static const nir_search_variable search174_1 = {
7754    { nir_search_value_variable, 0 },
7755    0, /* a */
7756    false,
7757    nir_type_invalid,
7758    NULL,
7759 };
7760 static const nir_search_expression search174 = {
7761    { nir_search_value_expression, 0 },
7762    true,
7763    nir_op_fdiv,
7764    { &search174_0.value, &search174_1.value },
7765    NULL,
7766 };
7767 
7768 static const nir_search_variable replace174_0 = {
7769    { nir_search_value_variable, 0 },
7770    0, /* a */
7771    false,
7772    nir_type_invalid,
7773    NULL,
7774 };
7775 static const nir_search_expression replace174 = {
7776    { nir_search_value_expression, 0 },
7777    false,
7778    nir_op_frcp,
7779    { &replace174_0.value },
7780    NULL,
7781 };
7782 
7783 static const nir_search_variable search175_0 = {
7784    { nir_search_value_variable, 0 },
7785    0, /* a */
7786    false,
7787    nir_type_invalid,
7788    NULL,
7789 };
7790 
7791 static const nir_search_variable search175_1 = {
7792    { nir_search_value_variable, 0 },
7793    1, /* b */
7794    false,
7795    nir_type_invalid,
7796    NULL,
7797 };
7798 static const nir_search_expression search175 = {
7799    { nir_search_value_expression, 0 },
7800    false,
7801    nir_op_fdiv,
7802    { &search175_0.value, &search175_1.value },
7803    NULL,
7804 };
7805 
7806 static const nir_search_variable replace175_0 = {
7807    { nir_search_value_variable, 0 },
7808    0, /* a */
7809    false,
7810    nir_type_invalid,
7811    NULL,
7812 };
7813 
7814 static const nir_search_variable replace175_1_0 = {
7815    { nir_search_value_variable, 0 },
7816    1, /* b */
7817    false,
7818    nir_type_invalid,
7819    NULL,
7820 };
7821 static const nir_search_expression replace175_1 = {
7822    { nir_search_value_expression, 0 },
7823    false,
7824    nir_op_frcp,
7825    { &replace175_1_0.value },
7826    NULL,
7827 };
7828 static const nir_search_expression replace175 = {
7829    { nir_search_value_expression, 0 },
7830    false,
7831    nir_op_fmul,
7832    { &replace175_0.value, &replace175_1.value },
7833    NULL,
7834 };
7835 
7836 static const struct transform nir_opt_algebraic_fdiv_xforms[] = {
7837    { &search174, &replace174.value, 0 },
7838    { &search175, &replace175.value, 14 },
7839 };
7840 
7841 static const nir_search_variable search50_0 = {
7842    { nir_search_value_variable, 0 },
7843    0, /* a */
7844    false,
7845    nir_type_invalid,
7846    NULL,
7847 };
7848 static const nir_search_expression search50 = {
7849    { nir_search_value_expression, 0 },
7850    false,
7851    nir_op_ffract,
7852    { &search50_0.value },
7853    NULL,
7854 };
7855 
7856 static const nir_search_variable replace50_0 = {
7857    { nir_search_value_variable, 0 },
7858    0, /* a */
7859    false,
7860    nir_type_invalid,
7861    NULL,
7862 };
7863 
7864 static const nir_search_variable replace50_1_0 = {
7865    { nir_search_value_variable, 0 },
7866    0, /* a */
7867    false,
7868    nir_type_invalid,
7869    NULL,
7870 };
7871 static const nir_search_expression replace50_1 = {
7872    { nir_search_value_expression, 0 },
7873    false,
7874    nir_op_ffloor,
7875    { &replace50_1_0.value },
7876    NULL,
7877 };
7878 static const nir_search_expression replace50 = {
7879    { nir_search_value_expression, 0 },
7880    false,
7881    nir_op_fsub,
7882    { &replace50_0.value, &replace50_1.value },
7883    NULL,
7884 };
7885 
7886 static const struct transform nir_opt_algebraic_ffract_xforms[] = {
7887    { &search50, &replace50.value, 4 },
7888 };
7889 
7890 static const nir_search_variable search17_0 = {
7891    { nir_search_value_variable, 0 },
7892    0, /* a */
7893    false,
7894    nir_type_invalid,
7895    NULL,
7896 };
7897 
7898 static const nir_search_constant search17_1 = {
7899    { nir_search_value_constant, 0 },
7900    nir_type_float, { 0x0 /* 0.0 */ },
7901 };
7902 static const nir_search_expression search17 = {
7903    { nir_search_value_expression, 0 },
7904    true,
7905    nir_op_fadd,
7906    { &search17_0.value, &search17_1.value },
7907    NULL,
7908 };
7909 
7910 static const nir_search_variable replace17 = {
7911    { nir_search_value_variable, 0 },
7912    0, /* a */
7913    false,
7914    nir_type_invalid,
7915    NULL,
7916 };
7917 
7918 static const nir_search_variable search21_0_0 = {
7919    { nir_search_value_variable, 0 },
7920    0, /* a */
7921    false,
7922    nir_type_invalid,
7923    NULL,
7924 };
7925 
7926 static const nir_search_variable search21_0_1 = {
7927    { nir_search_value_variable, 0 },
7928    1, /* b */
7929    false,
7930    nir_type_invalid,
7931    NULL,
7932 };
7933 static const nir_search_expression search21_0 = {
7934    { nir_search_value_expression, 0 },
7935    false,
7936    nir_op_fmul,
7937    { &search21_0_0.value, &search21_0_1.value },
7938    NULL,
7939 };
7940 
7941 static const nir_search_variable search21_1_0 = {
7942    { nir_search_value_variable, 0 },
7943    0, /* a */
7944    false,
7945    nir_type_invalid,
7946    NULL,
7947 };
7948 
7949 static const nir_search_variable search21_1_1 = {
7950    { nir_search_value_variable, 0 },
7951    2, /* c */
7952    false,
7953    nir_type_invalid,
7954    NULL,
7955 };
7956 static const nir_search_expression search21_1 = {
7957    { nir_search_value_expression, 0 },
7958    false,
7959    nir_op_fmul,
7960    { &search21_1_0.value, &search21_1_1.value },
7961    NULL,
7962 };
7963 static const nir_search_expression search21 = {
7964    { nir_search_value_expression, 0 },
7965    true,
7966    nir_op_fadd,
7967    { &search21_0.value, &search21_1.value },
7968    NULL,
7969 };
7970 
7971 static const nir_search_variable replace21_0 = {
7972    { nir_search_value_variable, 0 },
7973    0, /* a */
7974    false,
7975    nir_type_invalid,
7976    NULL,
7977 };
7978 
7979 static const nir_search_variable replace21_1_0 = {
7980    { nir_search_value_variable, 0 },
7981    1, /* b */
7982    false,
7983    nir_type_invalid,
7984    NULL,
7985 };
7986 
7987 static const nir_search_variable replace21_1_1 = {
7988    { nir_search_value_variable, 0 },
7989    2, /* c */
7990    false,
7991    nir_type_invalid,
7992    NULL,
7993 };
7994 static const nir_search_expression replace21_1 = {
7995    { nir_search_value_expression, 0 },
7996    false,
7997    nir_op_fadd,
7998    { &replace21_1_0.value, &replace21_1_1.value },
7999    NULL,
8000 };
8001 static const nir_search_expression replace21 = {
8002    { nir_search_value_expression, 0 },
8003    false,
8004    nir_op_fmul,
8005    { &replace21_0.value, &replace21_1.value },
8006    NULL,
8007 };
8008 
8009 static const nir_search_variable search23_0_0 = {
8010    { nir_search_value_variable, 0 },
8011    0, /* a */
8012    false,
8013    nir_type_invalid,
8014    NULL,
8015 };
8016 static const nir_search_expression search23_0 = {
8017    { nir_search_value_expression, 0 },
8018    false,
8019    nir_op_fneg,
8020    { &search23_0_0.value },
8021    NULL,
8022 };
8023 
8024 static const nir_search_variable search23_1 = {
8025    { nir_search_value_variable, 0 },
8026    0, /* a */
8027    false,
8028    nir_type_invalid,
8029    NULL,
8030 };
8031 static const nir_search_expression search23 = {
8032    { nir_search_value_expression, 0 },
8033    true,
8034    nir_op_fadd,
8035    { &search23_0.value, &search23_1.value },
8036    NULL,
8037 };
8038 
8039 static const nir_search_constant replace23 = {
8040    { nir_search_value_constant, 0 },
8041    nir_type_float, { 0x0 /* 0.0 */ },
8042 };
8043 
8044 static const nir_search_variable search27_0_0 = {
8045    { nir_search_value_variable, 0 },
8046    0, /* a */
8047    false,
8048    nir_type_invalid,
8049    NULL,
8050 };
8051 static const nir_search_expression search27_0 = {
8052    { nir_search_value_expression, 0 },
8053    false,
8054    nir_op_fneg,
8055    { &search27_0_0.value },
8056    NULL,
8057 };
8058 
8059 static const nir_search_variable search27_1_0 = {
8060    { nir_search_value_variable, 0 },
8061    0, /* a */
8062    false,
8063    nir_type_invalid,
8064    NULL,
8065 };
8066 
8067 static const nir_search_variable search27_1_1 = {
8068    { nir_search_value_variable, 0 },
8069    1, /* b */
8070    false,
8071    nir_type_invalid,
8072    NULL,
8073 };
8074 static const nir_search_expression search27_1 = {
8075    { nir_search_value_expression, 0 },
8076    false,
8077    nir_op_fadd,
8078    { &search27_1_0.value, &search27_1_1.value },
8079    NULL,
8080 };
8081 static const nir_search_expression search27 = {
8082    { nir_search_value_expression, 0 },
8083    true,
8084    nir_op_fadd,
8085    { &search27_0.value, &search27_1.value },
8086    NULL,
8087 };
8088 
8089 static const nir_search_variable replace27 = {
8090    { nir_search_value_variable, 0 },
8091    1, /* b */
8092    false,
8093    nir_type_invalid,
8094    NULL,
8095 };
8096 
8097 static const nir_search_variable search28_0 = {
8098    { nir_search_value_variable, 0 },
8099    0, /* a */
8100    false,
8101    nir_type_invalid,
8102    NULL,
8103 };
8104 
8105 static const nir_search_variable search28_1_0_0 = {
8106    { nir_search_value_variable, 0 },
8107    0, /* a */
8108    false,
8109    nir_type_invalid,
8110    NULL,
8111 };
8112 static const nir_search_expression search28_1_0 = {
8113    { nir_search_value_expression, 0 },
8114    false,
8115    nir_op_fneg,
8116    { &search28_1_0_0.value },
8117    NULL,
8118 };
8119 
8120 static const nir_search_variable search28_1_1 = {
8121    { nir_search_value_variable, 0 },
8122    1, /* b */
8123    false,
8124    nir_type_invalid,
8125    NULL,
8126 };
8127 static const nir_search_expression search28_1 = {
8128    { nir_search_value_expression, 0 },
8129    false,
8130    nir_op_fadd,
8131    { &search28_1_0.value, &search28_1_1.value },
8132    NULL,
8133 };
8134 static const nir_search_expression search28 = {
8135    { nir_search_value_expression, 0 },
8136    true,
8137    nir_op_fadd,
8138    { &search28_0.value, &search28_1.value },
8139    NULL,
8140 };
8141 
8142 static const nir_search_variable replace28 = {
8143    { nir_search_value_variable, 0 },
8144    1, /* b */
8145    false,
8146    nir_type_invalid,
8147    NULL,
8148 };
8149 
8150 static const nir_search_variable search51_0_0 = {
8151    { nir_search_value_variable, 0 },
8152    0, /* a */
8153    false,
8154    nir_type_invalid,
8155    NULL,
8156 };
8157 
8158 static const nir_search_constant search51_0_1_0 = {
8159    { nir_search_value_constant, 0 },
8160    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
8161 };
8162 
8163 static const nir_search_variable search51_0_1_1_0_0 = {
8164    { nir_search_value_variable, 0 },
8165    1, /* c */
8166    false,
8167    nir_type_invalid,
8168    NULL,
8169 };
8170 static const nir_search_expression search51_0_1_1_0 = {
8171    { nir_search_value_expression, 0 },
8172    false,
8173    nir_op_b2f,
8174    { &search51_0_1_1_0_0.value },
8175    NULL,
8176 };
8177 static const nir_search_expression search51_0_1_1 = {
8178    { nir_search_value_expression, 0 },
8179    false,
8180    nir_op_fneg,
8181    { &search51_0_1_1_0.value },
8182    NULL,
8183 };
8184 static const nir_search_expression search51_0_1 = {
8185    { nir_search_value_expression, 0 },
8186    false,
8187    nir_op_fadd,
8188    { &search51_0_1_0.value, &search51_0_1_1.value },
8189    NULL,
8190 };
8191 static const nir_search_expression search51_0 = {
8192    { nir_search_value_expression, 0 },
8193    false,
8194    nir_op_fmul,
8195    { &search51_0_0.value, &search51_0_1.value },
8196    NULL,
8197 };
8198 
8199 static const nir_search_variable search51_1_0 = {
8200    { nir_search_value_variable, 0 },
8201    2, /* b */
8202    false,
8203    nir_type_invalid,
8204    NULL,
8205 };
8206 
8207 static const nir_search_variable search51_1_1_0 = {
8208    { nir_search_value_variable, 0 },
8209    1, /* c */
8210    false,
8211    nir_type_invalid,
8212    NULL,
8213 };
8214 static const nir_search_expression search51_1_1 = {
8215    { nir_search_value_expression, 0 },
8216    false,
8217    nir_op_b2f,
8218    { &search51_1_1_0.value },
8219    NULL,
8220 };
8221 static const nir_search_expression search51_1 = {
8222    { nir_search_value_expression, 0 },
8223    false,
8224    nir_op_fmul,
8225    { &search51_1_0.value, &search51_1_1.value },
8226    NULL,
8227 };
8228 static const nir_search_expression search51 = {
8229    { nir_search_value_expression, 0 },
8230    true,
8231    nir_op_fadd,
8232    { &search51_0.value, &search51_1.value },
8233    NULL,
8234 };
8235 
8236 static const nir_search_variable replace51_0 = {
8237    { nir_search_value_variable, 0 },
8238    1, /* c */
8239    false,
8240    nir_type_invalid,
8241    NULL,
8242 };
8243 
8244 static const nir_search_variable replace51_1 = {
8245    { nir_search_value_variable, 0 },
8246    2, /* b */
8247    false,
8248    nir_type_invalid,
8249    NULL,
8250 };
8251 
8252 static const nir_search_variable replace51_2 = {
8253    { nir_search_value_variable, 0 },
8254    0, /* a */
8255    false,
8256    nir_type_invalid,
8257    NULL,
8258 };
8259 static const nir_search_expression replace51 = {
8260    { nir_search_value_expression, 0 },
8261    false,
8262    nir_op_bcsel,
8263    { &replace51_0.value, &replace51_1.value, &replace51_2.value },
8264    NULL,
8265 };
8266 
8267 static const nir_search_variable search52_0_0 = {
8268    { nir_search_value_variable, 0 },
8269    0, /* a */
8270    false,
8271    nir_type_invalid,
8272    NULL,
8273 };
8274 
8275 static const nir_search_constant search52_0_1_0 = {
8276    { nir_search_value_constant, 0 },
8277    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
8278 };
8279 
8280 static const nir_search_variable search52_0_1_1_0 = {
8281    { nir_search_value_variable, 0 },
8282    1, /* c */
8283    false,
8284    nir_type_invalid,
8285    NULL,
8286 };
8287 static const nir_search_expression search52_0_1_1 = {
8288    { nir_search_value_expression, 0 },
8289    false,
8290    nir_op_fneg,
8291    { &search52_0_1_1_0.value },
8292    NULL,
8293 };
8294 static const nir_search_expression search52_0_1 = {
8295    { nir_search_value_expression, 0 },
8296    false,
8297    nir_op_fadd,
8298    { &search52_0_1_0.value, &search52_0_1_1.value },
8299    NULL,
8300 };
8301 static const nir_search_expression search52_0 = {
8302    { nir_search_value_expression, 0 },
8303    false,
8304    nir_op_fmul,
8305    { &search52_0_0.value, &search52_0_1.value },
8306    NULL,
8307 };
8308 
8309 static const nir_search_variable search52_1_0 = {
8310    { nir_search_value_variable, 0 },
8311    2, /* b */
8312    false,
8313    nir_type_invalid,
8314    NULL,
8315 };
8316 
8317 static const nir_search_variable search52_1_1 = {
8318    { nir_search_value_variable, 0 },
8319    1, /* c */
8320    false,
8321    nir_type_invalid,
8322    NULL,
8323 };
8324 static const nir_search_expression search52_1 = {
8325    { nir_search_value_expression, 0 },
8326    false,
8327    nir_op_fmul,
8328    { &search52_1_0.value, &search52_1_1.value },
8329    NULL,
8330 };
8331 static const nir_search_expression search52 = {
8332    { nir_search_value_expression, 32 },
8333    true,
8334    nir_op_fadd,
8335    { &search52_0.value, &search52_1.value },
8336    NULL,
8337 };
8338 
8339 static const nir_search_variable replace52_0 = {
8340    { nir_search_value_variable, 0 },
8341    0, /* a */
8342    false,
8343    nir_type_invalid,
8344    NULL,
8345 };
8346 
8347 static const nir_search_variable replace52_1 = {
8348    { nir_search_value_variable, 0 },
8349    2, /* b */
8350    false,
8351    nir_type_invalid,
8352    NULL,
8353 };
8354 
8355 static const nir_search_variable replace52_2 = {
8356    { nir_search_value_variable, 0 },
8357    1, /* c */
8358    false,
8359    nir_type_invalid,
8360    NULL,
8361 };
8362 static const nir_search_expression replace52 = {
8363    { nir_search_value_expression, 0 },
8364    false,
8365    nir_op_flrp,
8366    { &replace52_0.value, &replace52_1.value, &replace52_2.value },
8367    NULL,
8368 };
8369 
8370 static const nir_search_variable search53_0_0 = {
8371    { nir_search_value_variable, 0 },
8372    0, /* a */
8373    false,
8374    nir_type_invalid,
8375    NULL,
8376 };
8377 
8378 static const nir_search_constant search53_0_1_0 = {
8379    { nir_search_value_constant, 0 },
8380    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
8381 };
8382 
8383 static const nir_search_variable search53_0_1_1_0 = {
8384    { nir_search_value_variable, 0 },
8385    1, /* c */
8386    false,
8387    nir_type_invalid,
8388    NULL,
8389 };
8390 static const nir_search_expression search53_0_1_1 = {
8391    { nir_search_value_expression, 0 },
8392    false,
8393    nir_op_fneg,
8394    { &search53_0_1_1_0.value },
8395    NULL,
8396 };
8397 static const nir_search_expression search53_0_1 = {
8398    { nir_search_value_expression, 0 },
8399    false,
8400    nir_op_fadd,
8401    { &search53_0_1_0.value, &search53_0_1_1.value },
8402    NULL,
8403 };
8404 static const nir_search_expression search53_0 = {
8405    { nir_search_value_expression, 0 },
8406    false,
8407    nir_op_fmul,
8408    { &search53_0_0.value, &search53_0_1.value },
8409    NULL,
8410 };
8411 
8412 static const nir_search_variable search53_1_0 = {
8413    { nir_search_value_variable, 0 },
8414    2, /* b */
8415    false,
8416    nir_type_invalid,
8417    NULL,
8418 };
8419 
8420 static const nir_search_variable search53_1_1 = {
8421    { nir_search_value_variable, 0 },
8422    1, /* c */
8423    false,
8424    nir_type_invalid,
8425    NULL,
8426 };
8427 static const nir_search_expression search53_1 = {
8428    { nir_search_value_expression, 0 },
8429    false,
8430    nir_op_fmul,
8431    { &search53_1_0.value, &search53_1_1.value },
8432    NULL,
8433 };
8434 static const nir_search_expression search53 = {
8435    { nir_search_value_expression, 64 },
8436    true,
8437    nir_op_fadd,
8438    { &search53_0.value, &search53_1.value },
8439    NULL,
8440 };
8441 
8442 static const nir_search_variable replace53_0 = {
8443    { nir_search_value_variable, 0 },
8444    0, /* a */
8445    false,
8446    nir_type_invalid,
8447    NULL,
8448 };
8449 
8450 static const nir_search_variable replace53_1 = {
8451    { nir_search_value_variable, 0 },
8452    2, /* b */
8453    false,
8454    nir_type_invalid,
8455    NULL,
8456 };
8457 
8458 static const nir_search_variable replace53_2 = {
8459    { nir_search_value_variable, 0 },
8460    1, /* c */
8461    false,
8462    nir_type_invalid,
8463    NULL,
8464 };
8465 static const nir_search_expression replace53 = {
8466    { nir_search_value_expression, 0 },
8467    false,
8468    nir_op_flrp,
8469    { &replace53_0.value, &replace53_1.value, &replace53_2.value },
8470    NULL,
8471 };
8472 
8473 static const nir_search_variable search54_0 = {
8474    { nir_search_value_variable, 0 },
8475    0, /* a */
8476    false,
8477    nir_type_invalid,
8478    NULL,
8479 };
8480 
8481 static const nir_search_variable search54_1_0_0 = {
8482    { nir_search_value_variable, 0 },
8483    1, /* c */
8484    false,
8485    nir_type_invalid,
8486    NULL,
8487 };
8488 static const nir_search_expression search54_1_0 = {
8489    { nir_search_value_expression, 0 },
8490    false,
8491    nir_op_b2f,
8492    { &search54_1_0_0.value },
8493    NULL,
8494 };
8495 
8496 static const nir_search_variable search54_1_1_0 = {
8497    { nir_search_value_variable, 0 },
8498    2, /* b */
8499    false,
8500    nir_type_invalid,
8501    NULL,
8502 };
8503 
8504 static const nir_search_variable search54_1_1_1_0 = {
8505    { nir_search_value_variable, 0 },
8506    0, /* a */
8507    false,
8508    nir_type_invalid,
8509    NULL,
8510 };
8511 static const nir_search_expression search54_1_1_1 = {
8512    { nir_search_value_expression, 0 },
8513    false,
8514    nir_op_fneg,
8515    { &search54_1_1_1_0.value },
8516    NULL,
8517 };
8518 static const nir_search_expression search54_1_1 = {
8519    { nir_search_value_expression, 0 },
8520    false,
8521    nir_op_fadd,
8522    { &search54_1_1_0.value, &search54_1_1_1.value },
8523    NULL,
8524 };
8525 static const nir_search_expression search54_1 = {
8526    { nir_search_value_expression, 0 },
8527    false,
8528    nir_op_fmul,
8529    { &search54_1_0.value, &search54_1_1.value },
8530    NULL,
8531 };
8532 static const nir_search_expression search54 = {
8533    { nir_search_value_expression, 0 },
8534    true,
8535    nir_op_fadd,
8536    { &search54_0.value, &search54_1.value },
8537    NULL,
8538 };
8539 
8540 static const nir_search_variable replace54_0 = {
8541    { nir_search_value_variable, 0 },
8542    1, /* c */
8543    false,
8544    nir_type_invalid,
8545    NULL,
8546 };
8547 
8548 static const nir_search_variable replace54_1 = {
8549    { nir_search_value_variable, 0 },
8550    2, /* b */
8551    false,
8552    nir_type_invalid,
8553    NULL,
8554 };
8555 
8556 static const nir_search_variable replace54_2 = {
8557    { nir_search_value_variable, 0 },
8558    0, /* a */
8559    false,
8560    nir_type_invalid,
8561    NULL,
8562 };
8563 static const nir_search_expression replace54 = {
8564    { nir_search_value_expression, 0 },
8565    false,
8566    nir_op_bcsel,
8567    { &replace54_0.value, &replace54_1.value, &replace54_2.value },
8568    NULL,
8569 };
8570 
8571 static const nir_search_variable search55_0 = {
8572    { nir_search_value_variable, 0 },
8573    0, /* a */
8574    false,
8575    nir_type_invalid,
8576    NULL,
8577 };
8578 
8579 static const nir_search_variable search55_1_0 = {
8580    { nir_search_value_variable, 0 },
8581    1, /* c */
8582    false,
8583    nir_type_invalid,
8584    NULL,
8585 };
8586 
8587 static const nir_search_variable search55_1_1_0 = {
8588    { nir_search_value_variable, 0 },
8589    2, /* b */
8590    false,
8591    nir_type_invalid,
8592    NULL,
8593 };
8594 
8595 static const nir_search_variable search55_1_1_1_0 = {
8596    { nir_search_value_variable, 0 },
8597    0, /* a */
8598    false,
8599    nir_type_invalid,
8600    NULL,
8601 };
8602 static const nir_search_expression search55_1_1_1 = {
8603    { nir_search_value_expression, 0 },
8604    false,
8605    nir_op_fneg,
8606    { &search55_1_1_1_0.value },
8607    NULL,
8608 };
8609 static const nir_search_expression search55_1_1 = {
8610    { nir_search_value_expression, 0 },
8611    false,
8612    nir_op_fadd,
8613    { &search55_1_1_0.value, &search55_1_1_1.value },
8614    NULL,
8615 };
8616 static const nir_search_expression search55_1 = {
8617    { nir_search_value_expression, 0 },
8618    false,
8619    nir_op_fmul,
8620    { &search55_1_0.value, &search55_1_1.value },
8621    NULL,
8622 };
8623 static const nir_search_expression search55 = {
8624    { nir_search_value_expression, 32 },
8625    true,
8626    nir_op_fadd,
8627    { &search55_0.value, &search55_1.value },
8628    NULL,
8629 };
8630 
8631 static const nir_search_variable replace55_0 = {
8632    { nir_search_value_variable, 0 },
8633    0, /* a */
8634    false,
8635    nir_type_invalid,
8636    NULL,
8637 };
8638 
8639 static const nir_search_variable replace55_1 = {
8640    { nir_search_value_variable, 0 },
8641    2, /* b */
8642    false,
8643    nir_type_invalid,
8644    NULL,
8645 };
8646 
8647 static const nir_search_variable replace55_2 = {
8648    { nir_search_value_variable, 0 },
8649    1, /* c */
8650    false,
8651    nir_type_invalid,
8652    NULL,
8653 };
8654 static const nir_search_expression replace55 = {
8655    { nir_search_value_expression, 0 },
8656    false,
8657    nir_op_flrp,
8658    { &replace55_0.value, &replace55_1.value, &replace55_2.value },
8659    NULL,
8660 };
8661 
8662 static const nir_search_variable search56_0 = {
8663    { nir_search_value_variable, 0 },
8664    0, /* a */
8665    false,
8666    nir_type_invalid,
8667    NULL,
8668 };
8669 
8670 static const nir_search_variable search56_1_0 = {
8671    { nir_search_value_variable, 0 },
8672    1, /* c */
8673    false,
8674    nir_type_invalid,
8675    NULL,
8676 };
8677 
8678 static const nir_search_variable search56_1_1_0 = {
8679    { nir_search_value_variable, 0 },
8680    2, /* b */
8681    false,
8682    nir_type_invalid,
8683    NULL,
8684 };
8685 
8686 static const nir_search_variable search56_1_1_1_0 = {
8687    { nir_search_value_variable, 0 },
8688    0, /* a */
8689    false,
8690    nir_type_invalid,
8691    NULL,
8692 };
8693 static const nir_search_expression search56_1_1_1 = {
8694    { nir_search_value_expression, 0 },
8695    false,
8696    nir_op_fneg,
8697    { &search56_1_1_1_0.value },
8698    NULL,
8699 };
8700 static const nir_search_expression search56_1_1 = {
8701    { nir_search_value_expression, 0 },
8702    false,
8703    nir_op_fadd,
8704    { &search56_1_1_0.value, &search56_1_1_1.value },
8705    NULL,
8706 };
8707 static const nir_search_expression search56_1 = {
8708    { nir_search_value_expression, 0 },
8709    false,
8710    nir_op_fmul,
8711    { &search56_1_0.value, &search56_1_1.value },
8712    NULL,
8713 };
8714 static const nir_search_expression search56 = {
8715    { nir_search_value_expression, 64 },
8716    true,
8717    nir_op_fadd,
8718    { &search56_0.value, &search56_1.value },
8719    NULL,
8720 };
8721 
8722 static const nir_search_variable replace56_0 = {
8723    { nir_search_value_variable, 0 },
8724    0, /* a */
8725    false,
8726    nir_type_invalid,
8727    NULL,
8728 };
8729 
8730 static const nir_search_variable replace56_1 = {
8731    { nir_search_value_variable, 0 },
8732    2, /* b */
8733    false,
8734    nir_type_invalid,
8735    NULL,
8736 };
8737 
8738 static const nir_search_variable replace56_2 = {
8739    { nir_search_value_variable, 0 },
8740    1, /* c */
8741    false,
8742    nir_type_invalid,
8743    NULL,
8744 };
8745 static const nir_search_expression replace56 = {
8746    { nir_search_value_expression, 0 },
8747    false,
8748    nir_op_flrp,
8749    { &replace56_0.value, &replace56_1.value, &replace56_2.value },
8750    NULL,
8751 };
8752 
8753 static const nir_search_variable search58_0_0 = {
8754    { nir_search_value_variable, 0 },
8755    0, /* a */
8756    false,
8757    nir_type_invalid,
8758    NULL,
8759 };
8760 
8761 static const nir_search_variable search58_0_1 = {
8762    { nir_search_value_variable, 0 },
8763    1, /* b */
8764    false,
8765    nir_type_invalid,
8766    NULL,
8767 };
8768 static const nir_search_expression search58_0 = {
8769    { nir_search_value_expression, 0 },
8770    false,
8771    nir_op_fmul,
8772    { &search58_0_0.value, &search58_0_1.value },
8773    NULL,
8774 };
8775 
8776 static const nir_search_variable search58_1 = {
8777    { nir_search_value_variable, 0 },
8778    2, /* c */
8779    false,
8780    nir_type_invalid,
8781    NULL,
8782 };
8783 static const nir_search_expression search58 = {
8784    { nir_search_value_expression, 0 },
8785    true,
8786    nir_op_fadd,
8787    { &search58_0.value, &search58_1.value },
8788    NULL,
8789 };
8790 
8791 static const nir_search_variable replace58_0 = {
8792    { nir_search_value_variable, 0 },
8793    0, /* a */
8794    false,
8795    nir_type_invalid,
8796    NULL,
8797 };
8798 
8799 static const nir_search_variable replace58_1 = {
8800    { nir_search_value_variable, 0 },
8801    1, /* b */
8802    false,
8803    nir_type_invalid,
8804    NULL,
8805 };
8806 
8807 static const nir_search_variable replace58_2 = {
8808    { nir_search_value_variable, 0 },
8809    2, /* c */
8810    false,
8811    nir_type_invalid,
8812    NULL,
8813 };
8814 static const nir_search_expression replace58 = {
8815    { nir_search_value_expression, 0 },
8816    false,
8817    nir_op_ffma,
8818    { &replace58_0.value, &replace58_1.value, &replace58_2.value },
8819    NULL,
8820 };
8821 
8822 static const nir_search_variable search219_0 = {
8823    { nir_search_value_variable, 0 },
8824    0, /* a */
8825    false,
8826    nir_type_invalid,
8827    NULL,
8828 };
8829 
8830 static const nir_search_constant search219_1_0 = {
8831    { nir_search_value_constant, 0 },
8832    nir_type_float, { 0x0 /* 0.0 */ },
8833 };
8834 
8835 static const nir_search_variable search219_1_1 = {
8836    { nir_search_value_variable, 0 },
8837    1, /* b */
8838    false,
8839    nir_type_invalid,
8840    NULL,
8841 };
8842 static const nir_search_expression search219_1 = {
8843    { nir_search_value_expression, 0 },
8844    false,
8845    nir_op_fsub,
8846    { &search219_1_0.value, &search219_1_1.value },
8847    NULL,
8848 };
8849 static const nir_search_expression search219 = {
8850    { nir_search_value_expression, 0 },
8851    true,
8852    nir_op_fadd,
8853    { &search219_0.value, &search219_1.value },
8854    NULL,
8855 };
8856 
8857 static const nir_search_variable replace219_0 = {
8858    { nir_search_value_variable, 0 },
8859    0, /* a */
8860    false,
8861    nir_type_invalid,
8862    NULL,
8863 };
8864 
8865 static const nir_search_variable replace219_1 = {
8866    { nir_search_value_variable, 0 },
8867    1, /* b */
8868    false,
8869    nir_type_invalid,
8870    NULL,
8871 };
8872 static const nir_search_expression replace219 = {
8873    { nir_search_value_expression, 0 },
8874    false,
8875    nir_op_fsub,
8876    { &replace219_0.value, &replace219_1.value },
8877    NULL,
8878 };
8879 
8880 static const nir_search_variable search227_0_0 = {
8881    { nir_search_value_variable, 0 },
8882    0, /* a */
8883    false,
8884    nir_type_invalid,
8885    (is_not_const),
8886 };
8887 
8888 static const nir_search_variable search227_0_1 = {
8889    { nir_search_value_variable, 0 },
8890    1, /* b */
8891    false,
8892    nir_type_invalid,
8893    (is_not_const),
8894 };
8895 static const nir_search_expression search227_0 = {
8896    { nir_search_value_expression, 0 },
8897    false,
8898    nir_op_fadd,
8899    { &search227_0_0.value, &search227_0_1.value },
8900    (is_used_once),
8901 };
8902 
8903 static const nir_search_variable search227_1 = {
8904    { nir_search_value_variable, 0 },
8905    2, /* c */
8906    true,
8907    nir_type_invalid,
8908    NULL,
8909 };
8910 static const nir_search_expression search227 = {
8911    { nir_search_value_expression, 0 },
8912    true,
8913    nir_op_fadd,
8914    { &search227_0.value, &search227_1.value },
8915    (is_used_once),
8916 };
8917 
8918 static const nir_search_variable replace227_0_0 = {
8919    { nir_search_value_variable, 0 },
8920    0, /* a */
8921    false,
8922    nir_type_invalid,
8923    NULL,
8924 };
8925 
8926 static const nir_search_variable replace227_0_1 = {
8927    { nir_search_value_variable, 0 },
8928    2, /* c */
8929    false,
8930    nir_type_invalid,
8931    NULL,
8932 };
8933 static const nir_search_expression replace227_0 = {
8934    { nir_search_value_expression, 0 },
8935    false,
8936    nir_op_fadd,
8937    { &replace227_0_0.value, &replace227_0_1.value },
8938    NULL,
8939 };
8940 
8941 static const nir_search_variable replace227_1 = {
8942    { nir_search_value_variable, 0 },
8943    1, /* b */
8944    false,
8945    nir_type_invalid,
8946    NULL,
8947 };
8948 static const nir_search_expression replace227 = {
8949    { nir_search_value_expression, 0 },
8950    false,
8951    nir_op_fadd,
8952    { &replace227_0.value, &replace227_1.value },
8953    NULL,
8954 };
8955 
8956 static const nir_search_variable search231_0 = {
8957    { nir_search_value_variable, 0 },
8958    0, /* a */
8959    true,
8960    nir_type_invalid,
8961    NULL,
8962 };
8963 
8964 static const nir_search_variable search231_1_0 = {
8965    { nir_search_value_variable, 0 },
8966    1, /* b */
8967    false,
8968    nir_type_invalid,
8969    NULL,
8970 };
8971 
8972 static const nir_search_variable search231_1_1 = {
8973    { nir_search_value_variable, 0 },
8974    2, /* c */
8975    true,
8976    nir_type_invalid,
8977    NULL,
8978 };
8979 static const nir_search_expression search231_1 = {
8980    { nir_search_value_expression, 0 },
8981    false,
8982    nir_op_fadd,
8983    { &search231_1_0.value, &search231_1_1.value },
8984    NULL,
8985 };
8986 static const nir_search_expression search231 = {
8987    { nir_search_value_expression, 0 },
8988    true,
8989    nir_op_fadd,
8990    { &search231_0.value, &search231_1.value },
8991    NULL,
8992 };
8993 
8994 static const nir_search_variable replace231_0_0 = {
8995    { nir_search_value_variable, 0 },
8996    0, /* a */
8997    false,
8998    nir_type_invalid,
8999    NULL,
9000 };
9001 
9002 static const nir_search_variable replace231_0_1 = {
9003    { nir_search_value_variable, 0 },
9004    2, /* c */
9005    false,
9006    nir_type_invalid,
9007    NULL,
9008 };
9009 static const nir_search_expression replace231_0 = {
9010    { nir_search_value_expression, 0 },
9011    false,
9012    nir_op_fadd,
9013    { &replace231_0_0.value, &replace231_0_1.value },
9014    NULL,
9015 };
9016 
9017 static const nir_search_variable replace231_1 = {
9018    { nir_search_value_variable, 0 },
9019    1, /* b */
9020    false,
9021    nir_type_invalid,
9022    NULL,
9023 };
9024 static const nir_search_expression replace231 = {
9025    { nir_search_value_expression, 0 },
9026    false,
9027    nir_op_fadd,
9028    { &replace231_0.value, &replace231_1.value },
9029    NULL,
9030 };
9031 
9032 static const struct transform nir_opt_algebraic_fadd_xforms[] = {
9033    { &search17, &replace17.value, 0 },
9034    { &search21, &replace21.value, 0 },
9035    { &search23, &replace23.value, 0 },
9036    { &search27, &replace27.value, 0 },
9037    { &search28, &replace28.value, 0 },
9038    { &search51, &replace51.value, 2 },
9039    { &search52, &replace52.value, 5 },
9040    { &search53, &replace53.value, 6 },
9041    { &search54, &replace54.value, 2 },
9042    { &search55, &replace55.value, 5 },
9043    { &search56, &replace56.value, 6 },
9044    { &search58, &replace58.value, 8 },
9045    { &search219, &replace219.value, 0 },
9046    { &search227, &replace227.value, 0 },
9047    { &search231, &replace231.value, 0 },
9048 };
9049 
9050 static const nir_search_variable search59_0_0_0 = {
9051    { nir_search_value_variable, 0 },
9052    0, /* a */
9053    false,
9054    nir_type_invalid,
9055    NULL,
9056 };
9057 
9058 static const nir_search_variable search59_0_0_1 = {
9059    { nir_search_value_variable, 0 },
9060    1, /* b */
9061    true,
9062    nir_type_invalid,
9063    NULL,
9064 };
9065 static const nir_search_expression search59_0_0 = {
9066    { nir_search_value_expression, 0 },
9067    false,
9068    nir_op_imul,
9069    { &search59_0_0_0.value, &search59_0_0_1.value },
9070    NULL,
9071 };
9072 
9073 static const nir_search_variable search59_0_1 = {
9074    { nir_search_value_variable, 0 },
9075    2, /* c */
9076    true,
9077    nir_type_invalid,
9078    NULL,
9079 };
9080 static const nir_search_expression search59_0 = {
9081    { nir_search_value_expression, 0 },
9082    false,
9083    nir_op_iadd,
9084    { &search59_0_0.value, &search59_0_1.value },
9085    NULL,
9086 };
9087 
9088 static const nir_search_variable search59_1 = {
9089    { nir_search_value_variable, 0 },
9090    3, /* d */
9091    true,
9092    nir_type_invalid,
9093    NULL,
9094 };
9095 static const nir_search_expression search59 = {
9096    { nir_search_value_expression, 0 },
9097    false,
9098    nir_op_ishl,
9099    { &search59_0.value, &search59_1.value },
9100    NULL,
9101 };
9102 
9103 static const nir_search_variable replace59_0_0 = {
9104    { nir_search_value_variable, 0 },
9105    0, /* a */
9106    false,
9107    nir_type_invalid,
9108    NULL,
9109 };
9110 
9111 static const nir_search_variable replace59_0_1_0 = {
9112    { nir_search_value_variable, 0 },
9113    1, /* b */
9114    false,
9115    nir_type_invalid,
9116    NULL,
9117 };
9118 
9119 static const nir_search_variable replace59_0_1_1 = {
9120    { nir_search_value_variable, 0 },
9121    3, /* d */
9122    false,
9123    nir_type_invalid,
9124    NULL,
9125 };
9126 static const nir_search_expression replace59_0_1 = {
9127    { nir_search_value_expression, 0 },
9128    false,
9129    nir_op_ishl,
9130    { &replace59_0_1_0.value, &replace59_0_1_1.value },
9131    NULL,
9132 };
9133 static const nir_search_expression replace59_0 = {
9134    { nir_search_value_expression, 0 },
9135    false,
9136    nir_op_imul,
9137    { &replace59_0_0.value, &replace59_0_1.value },
9138    NULL,
9139 };
9140 
9141 static const nir_search_variable replace59_1_0 = {
9142    { nir_search_value_variable, 0 },
9143    2, /* c */
9144    false,
9145    nir_type_invalid,
9146    NULL,
9147 };
9148 
9149 static const nir_search_variable replace59_1_1 = {
9150    { nir_search_value_variable, 0 },
9151    3, /* d */
9152    false,
9153    nir_type_invalid,
9154    NULL,
9155 };
9156 static const nir_search_expression replace59_1 = {
9157    { nir_search_value_expression, 0 },
9158    false,
9159    nir_op_ishl,
9160    { &replace59_1_0.value, &replace59_1_1.value },
9161    NULL,
9162 };
9163 static const nir_search_expression replace59 = {
9164    { nir_search_value_expression, 0 },
9165    false,
9166    nir_op_iadd,
9167    { &replace59_0.value, &replace59_1.value },
9168    NULL,
9169 };
9170 
9171 static const nir_search_variable search60_0_0 = {
9172    { nir_search_value_variable, 0 },
9173    0, /* a */
9174    false,
9175    nir_type_invalid,
9176    NULL,
9177 };
9178 
9179 static const nir_search_variable search60_0_1 = {
9180    { nir_search_value_variable, 0 },
9181    1, /* b */
9182    true,
9183    nir_type_invalid,
9184    NULL,
9185 };
9186 static const nir_search_expression search60_0 = {
9187    { nir_search_value_expression, 0 },
9188    false,
9189    nir_op_imul,
9190    { &search60_0_0.value, &search60_0_1.value },
9191    NULL,
9192 };
9193 
9194 static const nir_search_variable search60_1 = {
9195    { nir_search_value_variable, 0 },
9196    2, /* c */
9197    true,
9198    nir_type_invalid,
9199    NULL,
9200 };
9201 static const nir_search_expression search60 = {
9202    { nir_search_value_expression, 0 },
9203    false,
9204    nir_op_ishl,
9205    { &search60_0.value, &search60_1.value },
9206    NULL,
9207 };
9208 
9209 static const nir_search_variable replace60_0 = {
9210    { nir_search_value_variable, 0 },
9211    0, /* a */
9212    false,
9213    nir_type_invalid,
9214    NULL,
9215 };
9216 
9217 static const nir_search_variable replace60_1_0 = {
9218    { nir_search_value_variable, 0 },
9219    1, /* b */
9220    false,
9221    nir_type_invalid,
9222    NULL,
9223 };
9224 
9225 static const nir_search_variable replace60_1_1 = {
9226    { nir_search_value_variable, 0 },
9227    2, /* c */
9228    false,
9229    nir_type_invalid,
9230    NULL,
9231 };
9232 static const nir_search_expression replace60_1 = {
9233    { nir_search_value_expression, 0 },
9234    false,
9235    nir_op_ishl,
9236    { &replace60_1_0.value, &replace60_1_1.value },
9237    NULL,
9238 };
9239 static const nir_search_expression replace60 = {
9240    { nir_search_value_expression, 0 },
9241    false,
9242    nir_op_imul,
9243    { &replace60_0.value, &replace60_1.value },
9244    NULL,
9245 };
9246 
9247 static const nir_search_constant search147_0 = {
9248    { nir_search_value_constant, 0 },
9249    nir_type_int, { 0x0 /* 0 */ },
9250 };
9251 
9252 static const nir_search_variable search147_1 = {
9253    { nir_search_value_variable, 0 },
9254    0, /* a */
9255    false,
9256    nir_type_invalid,
9257    NULL,
9258 };
9259 static const nir_search_expression search147 = {
9260    { nir_search_value_expression, 0 },
9261    false,
9262    nir_op_ishl,
9263    { &search147_0.value, &search147_1.value },
9264    NULL,
9265 };
9266 
9267 static const nir_search_constant replace147 = {
9268    { nir_search_value_constant, 0 },
9269    nir_type_int, { 0x0 /* 0 */ },
9270 };
9271 
9272 static const nir_search_variable search148_0 = {
9273    { nir_search_value_variable, 0 },
9274    0, /* a */
9275    false,
9276    nir_type_invalid,
9277    NULL,
9278 };
9279 
9280 static const nir_search_constant search148_1 = {
9281    { nir_search_value_constant, 0 },
9282    nir_type_int, { 0x0 /* 0 */ },
9283 };
9284 static const nir_search_expression search148 = {
9285    { nir_search_value_expression, 0 },
9286    false,
9287    nir_op_ishl,
9288    { &search148_0.value, &search148_1.value },
9289    NULL,
9290 };
9291 
9292 static const nir_search_variable replace148 = {
9293    { nir_search_value_variable, 0 },
9294    0, /* a */
9295    false,
9296    nir_type_invalid,
9297    NULL,
9298 };
9299 
9300 static const struct transform nir_opt_algebraic_ishl_xforms[] = {
9301    { &search59, &replace59.value, 0 },
9302    { &search60, &replace60.value, 0 },
9303    { &search147, &replace147.value, 0 },
9304    { &search148, &replace148.value, 0 },
9305 };
9306 
9307 static const nir_search_variable search197_0_0 = {
9308    { nir_search_value_variable, 0 },
9309    0, /* a */
9310    false,
9311    nir_type_invalid,
9312    NULL,
9313 };
9314 static const nir_search_expression search197_0 = {
9315    { nir_search_value_expression, 0 },
9316    false,
9317    nir_op_ftrunc,
9318    { &search197_0_0.value },
9319    NULL,
9320 };
9321 static const nir_search_expression search197 = {
9322    { nir_search_value_expression, 0 },
9323    false,
9324    nir_op_f2u32,
9325    { &search197_0.value },
9326    NULL,
9327 };
9328 
9329 static const nir_search_variable replace197_0 = {
9330    { nir_search_value_variable, 0 },
9331    0, /* a */
9332    false,
9333    nir_type_invalid,
9334    NULL,
9335 };
9336 static const nir_search_expression replace197 = {
9337    { nir_search_value_expression, 0 },
9338    false,
9339    nir_op_f2u32,
9340    { &replace197_0.value },
9341    NULL,
9342 };
9343 
9344 static const struct transform nir_opt_algebraic_f2u32_xforms[] = {
9345    { &search197, &replace197.value, 0 },
9346 };
9347 
9348 static const nir_search_variable search156_0_0 = {
9349    { nir_search_value_variable, 0 },
9350    0, /* a */
9351    false,
9352    nir_type_invalid,
9353    NULL,
9354 };
9355 static const nir_search_expression search156_0 = {
9356    { nir_search_value_expression, 0 },
9357    false,
9358    nir_op_fexp2,
9359    { &search156_0_0.value },
9360    NULL,
9361 };
9362 static const nir_search_expression search156 = {
9363    { nir_search_value_expression, 0 },
9364    true,
9365    nir_op_flog2,
9366    { &search156_0.value },
9367    NULL,
9368 };
9369 
9370 static const nir_search_variable replace156 = {
9371    { nir_search_value_variable, 0 },
9372    0, /* a */
9373    false,
9374    nir_type_invalid,
9375    NULL,
9376 };
9377 
9378 static const nir_search_variable search169_0_0 = {
9379    { nir_search_value_variable, 0 },
9380    0, /* a */
9381    false,
9382    nir_type_invalid,
9383    NULL,
9384 };
9385 static const nir_search_expression search169_0 = {
9386    { nir_search_value_expression, 0 },
9387    false,
9388    nir_op_fsqrt,
9389    { &search169_0_0.value },
9390    NULL,
9391 };
9392 static const nir_search_expression search169 = {
9393    { nir_search_value_expression, 0 },
9394    true,
9395    nir_op_flog2,
9396    { &search169_0.value },
9397    NULL,
9398 };
9399 
9400 static const nir_search_constant replace169_0 = {
9401    { nir_search_value_constant, 0 },
9402    nir_type_float, { 0x3fe0000000000000 /* 0.5 */ },
9403 };
9404 
9405 static const nir_search_variable replace169_1_0 = {
9406    { nir_search_value_variable, 0 },
9407    0, /* a */
9408    false,
9409    nir_type_invalid,
9410    NULL,
9411 };
9412 static const nir_search_expression replace169_1 = {
9413    { nir_search_value_expression, 0 },
9414    false,
9415    nir_op_flog2,
9416    { &replace169_1_0.value },
9417    NULL,
9418 };
9419 static const nir_search_expression replace169 = {
9420    { nir_search_value_expression, 0 },
9421    false,
9422    nir_op_fmul,
9423    { &replace169_0.value, &replace169_1.value },
9424    NULL,
9425 };
9426 
9427 static const nir_search_variable search170_0_0 = {
9428    { nir_search_value_variable, 0 },
9429    0, /* a */
9430    false,
9431    nir_type_invalid,
9432    NULL,
9433 };
9434 static const nir_search_expression search170_0 = {
9435    { nir_search_value_expression, 0 },
9436    false,
9437    nir_op_frcp,
9438    { &search170_0_0.value },
9439    NULL,
9440 };
9441 static const nir_search_expression search170 = {
9442    { nir_search_value_expression, 0 },
9443    true,
9444    nir_op_flog2,
9445    { &search170_0.value },
9446    NULL,
9447 };
9448 
9449 static const nir_search_variable replace170_0_0 = {
9450    { nir_search_value_variable, 0 },
9451    0, /* a */
9452    false,
9453    nir_type_invalid,
9454    NULL,
9455 };
9456 static const nir_search_expression replace170_0 = {
9457    { nir_search_value_expression, 0 },
9458    false,
9459    nir_op_flog2,
9460    { &replace170_0_0.value },
9461    NULL,
9462 };
9463 static const nir_search_expression replace170 = {
9464    { nir_search_value_expression, 0 },
9465    false,
9466    nir_op_fneg,
9467    { &replace170_0.value },
9468    NULL,
9469 };
9470 
9471 static const nir_search_variable search171_0_0 = {
9472    { nir_search_value_variable, 0 },
9473    0, /* a */
9474    false,
9475    nir_type_invalid,
9476    NULL,
9477 };
9478 static const nir_search_expression search171_0 = {
9479    { nir_search_value_expression, 0 },
9480    false,
9481    nir_op_frsq,
9482    { &search171_0_0.value },
9483    NULL,
9484 };
9485 static const nir_search_expression search171 = {
9486    { nir_search_value_expression, 0 },
9487    true,
9488    nir_op_flog2,
9489    { &search171_0.value },
9490    NULL,
9491 };
9492 
9493 static const nir_search_constant replace171_0 = {
9494    { nir_search_value_constant, 0 },
9495    nir_type_float, { 0xbfe0000000000000L /* -0.5 */ },
9496 };
9497 
9498 static const nir_search_variable replace171_1_0 = {
9499    { nir_search_value_variable, 0 },
9500    0, /* a */
9501    false,
9502    nir_type_invalid,
9503    NULL,
9504 };
9505 static const nir_search_expression replace171_1 = {
9506    { nir_search_value_expression, 0 },
9507    false,
9508    nir_op_flog2,
9509    { &replace171_1_0.value },
9510    NULL,
9511 };
9512 static const nir_search_expression replace171 = {
9513    { nir_search_value_expression, 0 },
9514    false,
9515    nir_op_fmul,
9516    { &replace171_0.value, &replace171_1.value },
9517    NULL,
9518 };
9519 
9520 static const nir_search_variable search172_0_0 = {
9521    { nir_search_value_variable, 0 },
9522    0, /* a */
9523    false,
9524    nir_type_invalid,
9525    NULL,
9526 };
9527 
9528 static const nir_search_variable search172_0_1 = {
9529    { nir_search_value_variable, 0 },
9530    1, /* b */
9531    false,
9532    nir_type_invalid,
9533    NULL,
9534 };
9535 static const nir_search_expression search172_0 = {
9536    { nir_search_value_expression, 0 },
9537    false,
9538    nir_op_fpow,
9539    { &search172_0_0.value, &search172_0_1.value },
9540    NULL,
9541 };
9542 static const nir_search_expression search172 = {
9543    { nir_search_value_expression, 0 },
9544    true,
9545    nir_op_flog2,
9546    { &search172_0.value },
9547    NULL,
9548 };
9549 
9550 static const nir_search_variable replace172_0 = {
9551    { nir_search_value_variable, 0 },
9552    1, /* b */
9553    false,
9554    nir_type_invalid,
9555    NULL,
9556 };
9557 
9558 static const nir_search_variable replace172_1_0 = {
9559    { nir_search_value_variable, 0 },
9560    0, /* a */
9561    false,
9562    nir_type_invalid,
9563    NULL,
9564 };
9565 static const nir_search_expression replace172_1 = {
9566    { nir_search_value_expression, 0 },
9567    false,
9568    nir_op_flog2,
9569    { &replace172_1_0.value },
9570    NULL,
9571 };
9572 static const nir_search_expression replace172 = {
9573    { nir_search_value_expression, 0 },
9574    false,
9575    nir_op_fmul,
9576    { &replace172_0.value, &replace172_1.value },
9577    NULL,
9578 };
9579 
9580 static const struct transform nir_opt_algebraic_flog2_xforms[] = {
9581    { &search156, &replace156.value, 0 },
9582    { &search169, &replace169.value, 0 },
9583    { &search170, &replace170.value, 0 },
9584    { &search171, &replace171.value, 0 },
9585    { &search172, &replace172.value, 0 },
9586 };
9587 
9588 static const nir_search_variable search61_0_0 = {
9589    { nir_search_value_variable, 0 },
9590    0, /* a */
9591    false,
9592    nir_type_invalid,
9593    NULL,
9594 };
9595 
9596 static const nir_search_variable search61_0_1 = {
9597    { nir_search_value_variable, 0 },
9598    1, /* b */
9599    false,
9600    nir_type_invalid,
9601    NULL,
9602 };
9603 static const nir_search_expression search61_0 = {
9604    { nir_search_value_expression, 0 },
9605    false,
9606    nir_op_flt,
9607    { &search61_0_0.value, &search61_0_1.value },
9608    NULL,
9609 };
9610 static const nir_search_expression search61 = {
9611    { nir_search_value_expression, 0 },
9612    true,
9613    nir_op_inot,
9614    { &search61_0.value },
9615    NULL,
9616 };
9617 
9618 static const nir_search_variable replace61_0 = {
9619    { nir_search_value_variable, 0 },
9620    0, /* a */
9621    false,
9622    nir_type_invalid,
9623    NULL,
9624 };
9625 
9626 static const nir_search_variable replace61_1 = {
9627    { nir_search_value_variable, 0 },
9628    1, /* b */
9629    false,
9630    nir_type_invalid,
9631    NULL,
9632 };
9633 static const nir_search_expression replace61 = {
9634    { nir_search_value_expression, 0 },
9635    false,
9636    nir_op_fge,
9637    { &replace61_0.value, &replace61_1.value },
9638    NULL,
9639 };
9640 
9641 static const nir_search_variable search62_0_0 = {
9642    { nir_search_value_variable, 0 },
9643    0, /* a */
9644    false,
9645    nir_type_invalid,
9646    NULL,
9647 };
9648 
9649 static const nir_search_variable search62_0_1 = {
9650    { nir_search_value_variable, 0 },
9651    1, /* b */
9652    false,
9653    nir_type_invalid,
9654    NULL,
9655 };
9656 static const nir_search_expression search62_0 = {
9657    { nir_search_value_expression, 0 },
9658    false,
9659    nir_op_fge,
9660    { &search62_0_0.value, &search62_0_1.value },
9661    NULL,
9662 };
9663 static const nir_search_expression search62 = {
9664    { nir_search_value_expression, 0 },
9665    true,
9666    nir_op_inot,
9667    { &search62_0.value },
9668    NULL,
9669 };
9670 
9671 static const nir_search_variable replace62_0 = {
9672    { nir_search_value_variable, 0 },
9673    0, /* a */
9674    false,
9675    nir_type_invalid,
9676    NULL,
9677 };
9678 
9679 static const nir_search_variable replace62_1 = {
9680    { nir_search_value_variable, 0 },
9681    1, /* b */
9682    false,
9683    nir_type_invalid,
9684    NULL,
9685 };
9686 static const nir_search_expression replace62 = {
9687    { nir_search_value_expression, 0 },
9688    false,
9689    nir_op_flt,
9690    { &replace62_0.value, &replace62_1.value },
9691    NULL,
9692 };
9693 
9694 static const nir_search_variable search63_0_0 = {
9695    { nir_search_value_variable, 0 },
9696    0, /* a */
9697    false,
9698    nir_type_invalid,
9699    NULL,
9700 };
9701 
9702 static const nir_search_variable search63_0_1 = {
9703    { nir_search_value_variable, 0 },
9704    1, /* b */
9705    false,
9706    nir_type_invalid,
9707    NULL,
9708 };
9709 static const nir_search_expression search63_0 = {
9710    { nir_search_value_expression, 0 },
9711    false,
9712    nir_op_feq,
9713    { &search63_0_0.value, &search63_0_1.value },
9714    NULL,
9715 };
9716 static const nir_search_expression search63 = {
9717    { nir_search_value_expression, 0 },
9718    true,
9719    nir_op_inot,
9720    { &search63_0.value },
9721    NULL,
9722 };
9723 
9724 static const nir_search_variable replace63_0 = {
9725    { nir_search_value_variable, 0 },
9726    0, /* a */
9727    false,
9728    nir_type_invalid,
9729    NULL,
9730 };
9731 
9732 static const nir_search_variable replace63_1 = {
9733    { nir_search_value_variable, 0 },
9734    1, /* b */
9735    false,
9736    nir_type_invalid,
9737    NULL,
9738 };
9739 static const nir_search_expression replace63 = {
9740    { nir_search_value_expression, 0 },
9741    false,
9742    nir_op_fne,
9743    { &replace63_0.value, &replace63_1.value },
9744    NULL,
9745 };
9746 
9747 static const nir_search_variable search64_0_0 = {
9748    { nir_search_value_variable, 0 },
9749    0, /* a */
9750    false,
9751    nir_type_invalid,
9752    NULL,
9753 };
9754 
9755 static const nir_search_variable search64_0_1 = {
9756    { nir_search_value_variable, 0 },
9757    1, /* b */
9758    false,
9759    nir_type_invalid,
9760    NULL,
9761 };
9762 static const nir_search_expression search64_0 = {
9763    { nir_search_value_expression, 0 },
9764    false,
9765    nir_op_fne,
9766    { &search64_0_0.value, &search64_0_1.value },
9767    NULL,
9768 };
9769 static const nir_search_expression search64 = {
9770    { nir_search_value_expression, 0 },
9771    true,
9772    nir_op_inot,
9773    { &search64_0.value },
9774    NULL,
9775 };
9776 
9777 static const nir_search_variable replace64_0 = {
9778    { nir_search_value_variable, 0 },
9779    0, /* a */
9780    false,
9781    nir_type_invalid,
9782    NULL,
9783 };
9784 
9785 static const nir_search_variable replace64_1 = {
9786    { nir_search_value_variable, 0 },
9787    1, /* b */
9788    false,
9789    nir_type_invalid,
9790    NULL,
9791 };
9792 static const nir_search_expression replace64 = {
9793    { nir_search_value_expression, 0 },
9794    false,
9795    nir_op_feq,
9796    { &replace64_0.value, &replace64_1.value },
9797    NULL,
9798 };
9799 
9800 static const nir_search_variable search65_0_0 = {
9801    { nir_search_value_variable, 0 },
9802    0, /* a */
9803    false,
9804    nir_type_invalid,
9805    NULL,
9806 };
9807 
9808 static const nir_search_variable search65_0_1 = {
9809    { nir_search_value_variable, 0 },
9810    1, /* b */
9811    false,
9812    nir_type_invalid,
9813    NULL,
9814 };
9815 static const nir_search_expression search65_0 = {
9816    { nir_search_value_expression, 0 },
9817    false,
9818    nir_op_ilt,
9819    { &search65_0_0.value, &search65_0_1.value },
9820    NULL,
9821 };
9822 static const nir_search_expression search65 = {
9823    { nir_search_value_expression, 0 },
9824    false,
9825    nir_op_inot,
9826    { &search65_0.value },
9827    NULL,
9828 };
9829 
9830 static const nir_search_variable replace65_0 = {
9831    { nir_search_value_variable, 0 },
9832    0, /* a */
9833    false,
9834    nir_type_invalid,
9835    NULL,
9836 };
9837 
9838 static const nir_search_variable replace65_1 = {
9839    { nir_search_value_variable, 0 },
9840    1, /* b */
9841    false,
9842    nir_type_invalid,
9843    NULL,
9844 };
9845 static const nir_search_expression replace65 = {
9846    { nir_search_value_expression, 0 },
9847    false,
9848    nir_op_ige,
9849    { &replace65_0.value, &replace65_1.value },
9850    NULL,
9851 };
9852 
9853 static const nir_search_variable search66_0_0 = {
9854    { nir_search_value_variable, 0 },
9855    0, /* a */
9856    false,
9857    nir_type_invalid,
9858    NULL,
9859 };
9860 
9861 static const nir_search_variable search66_0_1 = {
9862    { nir_search_value_variable, 0 },
9863    1, /* b */
9864    false,
9865    nir_type_invalid,
9866    NULL,
9867 };
9868 static const nir_search_expression search66_0 = {
9869    { nir_search_value_expression, 0 },
9870    false,
9871    nir_op_ige,
9872    { &search66_0_0.value, &search66_0_1.value },
9873    NULL,
9874 };
9875 static const nir_search_expression search66 = {
9876    { nir_search_value_expression, 0 },
9877    false,
9878    nir_op_inot,
9879    { &search66_0.value },
9880    NULL,
9881 };
9882 
9883 static const nir_search_variable replace66_0 = {
9884    { nir_search_value_variable, 0 },
9885    0, /* a */
9886    false,
9887    nir_type_invalid,
9888    NULL,
9889 };
9890 
9891 static const nir_search_variable replace66_1 = {
9892    { nir_search_value_variable, 0 },
9893    1, /* b */
9894    false,
9895    nir_type_invalid,
9896    NULL,
9897 };
9898 static const nir_search_expression replace66 = {
9899    { nir_search_value_expression, 0 },
9900    false,
9901    nir_op_ilt,
9902    { &replace66_0.value, &replace66_1.value },
9903    NULL,
9904 };
9905 
9906 static const nir_search_variable search67_0_0 = {
9907    { nir_search_value_variable, 0 },
9908    0, /* a */
9909    false,
9910    nir_type_invalid,
9911    NULL,
9912 };
9913 
9914 static const nir_search_variable search67_0_1 = {
9915    { nir_search_value_variable, 0 },
9916    1, /* b */
9917    false,
9918    nir_type_invalid,
9919    NULL,
9920 };
9921 static const nir_search_expression search67_0 = {
9922    { nir_search_value_expression, 0 },
9923    false,
9924    nir_op_ieq,
9925    { &search67_0_0.value, &search67_0_1.value },
9926    NULL,
9927 };
9928 static const nir_search_expression search67 = {
9929    { nir_search_value_expression, 0 },
9930    false,
9931    nir_op_inot,
9932    { &search67_0.value },
9933    NULL,
9934 };
9935 
9936 static const nir_search_variable replace67_0 = {
9937    { nir_search_value_variable, 0 },
9938    0, /* a */
9939    false,
9940    nir_type_invalid,
9941    NULL,
9942 };
9943 
9944 static const nir_search_variable replace67_1 = {
9945    { nir_search_value_variable, 0 },
9946    1, /* b */
9947    false,
9948    nir_type_invalid,
9949    NULL,
9950 };
9951 static const nir_search_expression replace67 = {
9952    { nir_search_value_expression, 0 },
9953    false,
9954    nir_op_ine,
9955    { &replace67_0.value, &replace67_1.value },
9956    NULL,
9957 };
9958 
9959 static const nir_search_variable search68_0_0 = {
9960    { nir_search_value_variable, 0 },
9961    0, /* a */
9962    false,
9963    nir_type_invalid,
9964    NULL,
9965 };
9966 
9967 static const nir_search_variable search68_0_1 = {
9968    { nir_search_value_variable, 0 },
9969    1, /* b */
9970    false,
9971    nir_type_invalid,
9972    NULL,
9973 };
9974 static const nir_search_expression search68_0 = {
9975    { nir_search_value_expression, 0 },
9976    false,
9977    nir_op_ine,
9978    { &search68_0_0.value, &search68_0_1.value },
9979    NULL,
9980 };
9981 static const nir_search_expression search68 = {
9982    { nir_search_value_expression, 0 },
9983    false,
9984    nir_op_inot,
9985    { &search68_0.value },
9986    NULL,
9987 };
9988 
9989 static const nir_search_variable replace68_0 = {
9990    { nir_search_value_variable, 0 },
9991    0, /* a */
9992    false,
9993    nir_type_invalid,
9994    NULL,
9995 };
9996 
9997 static const nir_search_variable replace68_1 = {
9998    { nir_search_value_variable, 0 },
9999    1, /* b */
10000    false,
10001    nir_type_invalid,
10002    NULL,
10003 };
10004 static const nir_search_expression replace68 = {
10005    { nir_search_value_expression, 0 },
10006    false,
10007    nir_op_ieq,
10008    { &replace68_0.value, &replace68_1.value },
10009    NULL,
10010 };
10011 
10012 static const nir_search_variable search144_0_0 = {
10013    { nir_search_value_variable, 0 },
10014    0, /* a */
10015    false,
10016    nir_type_invalid,
10017    NULL,
10018 };
10019 static const nir_search_expression search144_0 = {
10020    { nir_search_value_expression, 0 },
10021    false,
10022    nir_op_inot,
10023    { &search144_0_0.value },
10024    NULL,
10025 };
10026 static const nir_search_expression search144 = {
10027    { nir_search_value_expression, 0 },
10028    false,
10029    nir_op_inot,
10030    { &search144_0.value },
10031    NULL,
10032 };
10033 
10034 static const nir_search_variable replace144 = {
10035    { nir_search_value_variable, 0 },
10036    0, /* a */
10037    false,
10038    nir_type_invalid,
10039    NULL,
10040 };
10041 
10042 static const struct transform nir_opt_algebraic_inot_xforms[] = {
10043    { &search61, &replace61.value, 0 },
10044    { &search62, &replace62.value, 0 },
10045    { &search63, &replace63.value, 0 },
10046    { &search64, &replace64.value, 0 },
10047    { &search65, &replace65.value, 0 },
10048    { &search66, &replace66.value, 0 },
10049    { &search67, &replace67.value, 0 },
10050    { &search68, &replace68.value, 0 },
10051    { &search144, &replace144.value, 0 },
10052 };
10053 
10054 static const nir_search_variable search118_0 = {
10055    { nir_search_value_variable, 0 },
10056    0, /* a */
10057    false,
10058    nir_type_invalid,
10059    NULL,
10060 };
10061 
10062 static const nir_search_variable search118_1 = {
10063    { nir_search_value_variable, 0 },
10064    1, /* b */
10065    false,
10066    nir_type_invalid,
10067    NULL,
10068 };
10069 static const nir_search_expression search118 = {
10070    { nir_search_value_expression, 0 },
10071    false,
10072    nir_op_sne,
10073    { &search118_0.value, &search118_1.value },
10074    NULL,
10075 };
10076 
10077 static const nir_search_variable replace118_0_0 = {
10078    { nir_search_value_variable, 0 },
10079    0, /* a */
10080    false,
10081    nir_type_invalid,
10082    NULL,
10083 };
10084 
10085 static const nir_search_variable replace118_0_1 = {
10086    { nir_search_value_variable, 0 },
10087    1, /* b */
10088    false,
10089    nir_type_invalid,
10090    NULL,
10091 };
10092 static const nir_search_expression replace118_0 = {
10093    { nir_search_value_expression, 0 },
10094    false,
10095    nir_op_fne,
10096    { &replace118_0_0.value, &replace118_0_1.value },
10097    NULL,
10098 };
10099 static const nir_search_expression replace118 = {
10100    { nir_search_value_expression, 0 },
10101    false,
10102    nir_op_b2f,
10103    { &replace118_0.value },
10104    NULL,
10105 };
10106 
10107 static const struct transform nir_opt_algebraic_sne_xforms[] = {
10108    { &search118, &replace118.value, 11 },
10109 };
10110 
10111 static const nir_search_variable search240_0 = {
10112    { nir_search_value_variable, 0 },
10113    0, /* a */
10114    false,
10115    nir_type_invalid,
10116    NULL,
10117 };
10118 
10119 static const nir_search_variable search240_1 = {
10120    { nir_search_value_variable, 0 },
10121    1, /* b */
10122    false,
10123    nir_type_invalid,
10124    NULL,
10125 };
10126 static const nir_search_expression search240 = {
10127    { nir_search_value_expression, 32 },
10128    false,
10129    nir_op_fmod,
10130    { &search240_0.value, &search240_1.value },
10131    NULL,
10132 };
10133 
10134 static const nir_search_variable replace240_0 = {
10135    { nir_search_value_variable, 0 },
10136    0, /* a */
10137    false,
10138    nir_type_invalid,
10139    NULL,
10140 };
10141 
10142 static const nir_search_variable replace240_1_0 = {
10143    { nir_search_value_variable, 0 },
10144    1, /* b */
10145    false,
10146    nir_type_invalid,
10147    NULL,
10148 };
10149 
10150 static const nir_search_variable replace240_1_1_0_0 = {
10151    { nir_search_value_variable, 0 },
10152    0, /* a */
10153    false,
10154    nir_type_invalid,
10155    NULL,
10156 };
10157 
10158 static const nir_search_variable replace240_1_1_0_1 = {
10159    { nir_search_value_variable, 0 },
10160    1, /* b */
10161    false,
10162    nir_type_invalid,
10163    NULL,
10164 };
10165 static const nir_search_expression replace240_1_1_0 = {
10166    { nir_search_value_expression, 0 },
10167    false,
10168    nir_op_fdiv,
10169    { &replace240_1_1_0_0.value, &replace240_1_1_0_1.value },
10170    NULL,
10171 };
10172 static const nir_search_expression replace240_1_1 = {
10173    { nir_search_value_expression, 0 },
10174    false,
10175    nir_op_ffloor,
10176    { &replace240_1_1_0.value },
10177    NULL,
10178 };
10179 static const nir_search_expression replace240_1 = {
10180    { nir_search_value_expression, 0 },
10181    false,
10182    nir_op_fmul,
10183    { &replace240_1_0.value, &replace240_1_1.value },
10184    NULL,
10185 };
10186 static const nir_search_expression replace240 = {
10187    { nir_search_value_expression, 0 },
10188    false,
10189    nir_op_fsub,
10190    { &replace240_0.value, &replace240_1.value },
10191    NULL,
10192 };
10193 
10194 static const nir_search_variable search241_0 = {
10195    { nir_search_value_variable, 0 },
10196    0, /* a */
10197    false,
10198    nir_type_invalid,
10199    NULL,
10200 };
10201 
10202 static const nir_search_variable search241_1 = {
10203    { nir_search_value_variable, 0 },
10204    1, /* b */
10205    false,
10206    nir_type_invalid,
10207    NULL,
10208 };
10209 static const nir_search_expression search241 = {
10210    { nir_search_value_expression, 64 },
10211    false,
10212    nir_op_fmod,
10213    { &search241_0.value, &search241_1.value },
10214    NULL,
10215 };
10216 
10217 static const nir_search_variable replace241_0 = {
10218    { nir_search_value_variable, 0 },
10219    0, /* a */
10220    false,
10221    nir_type_invalid,
10222    NULL,
10223 };
10224 
10225 static const nir_search_variable replace241_1_0 = {
10226    { nir_search_value_variable, 0 },
10227    1, /* b */
10228    false,
10229    nir_type_invalid,
10230    NULL,
10231 };
10232 
10233 static const nir_search_variable replace241_1_1_0_0 = {
10234    { nir_search_value_variable, 0 },
10235    0, /* a */
10236    false,
10237    nir_type_invalid,
10238    NULL,
10239 };
10240 
10241 static const nir_search_variable replace241_1_1_0_1 = {
10242    { nir_search_value_variable, 0 },
10243    1, /* b */
10244    false,
10245    nir_type_invalid,
10246    NULL,
10247 };
10248 static const nir_search_expression replace241_1_1_0 = {
10249    { nir_search_value_expression, 0 },
10250    false,
10251    nir_op_fdiv,
10252    { &replace241_1_1_0_0.value, &replace241_1_1_0_1.value },
10253    NULL,
10254 };
10255 static const nir_search_expression replace241_1_1 = {
10256    { nir_search_value_expression, 0 },
10257    false,
10258    nir_op_ffloor,
10259    { &replace241_1_1_0.value },
10260    NULL,
10261 };
10262 static const nir_search_expression replace241_1 = {
10263    { nir_search_value_expression, 0 },
10264    false,
10265    nir_op_fmul,
10266    { &replace241_1_0.value, &replace241_1_1.value },
10267    NULL,
10268 };
10269 static const nir_search_expression replace241 = {
10270    { nir_search_value_expression, 0 },
10271    false,
10272    nir_op_fsub,
10273    { &replace241_0.value, &replace241_1.value },
10274    NULL,
10275 };
10276 
10277 static const struct transform nir_opt_algebraic_fmod_xforms[] = {
10278    { &search240, &replace240.value, 21 },
10279    { &search241, &replace241.value, 22 },
10280 };
10281 
10282 static const nir_search_variable search204_0_0 = {
10283    { nir_search_value_variable, 0 },
10284    0, /* a */
10285    false,
10286    nir_type_invalid,
10287    NULL,
10288 };
10289 static const nir_search_expression search204_0 = {
10290    { nir_search_value_expression, 0 },
10291    false,
10292    nir_op_unpack_64_2x32_split_x,
10293    { &search204_0_0.value },
10294    NULL,
10295 };
10296 
10297 static const nir_search_variable search204_1_0 = {
10298    { nir_search_value_variable, 0 },
10299    0, /* a */
10300    false,
10301    nir_type_invalid,
10302    NULL,
10303 };
10304 static const nir_search_expression search204_1 = {
10305    { nir_search_value_expression, 0 },
10306    false,
10307    nir_op_unpack_64_2x32_split_y,
10308    { &search204_1_0.value },
10309    NULL,
10310 };
10311 static const nir_search_expression search204 = {
10312    { nir_search_value_expression, 0 },
10313    false,
10314    nir_op_pack_64_2x32_split,
10315    { &search204_0.value, &search204_1.value },
10316    NULL,
10317 };
10318 
10319 static const nir_search_variable replace204 = {
10320    { nir_search_value_variable, 0 },
10321    0, /* a */
10322    false,
10323    nir_type_invalid,
10324    NULL,
10325 };
10326 
10327 static const struct transform nir_opt_algebraic_pack_64_2x32_split_xforms[] = {
10328    { &search204, &replace204.value, 0 },
10329 };
10330 
10331 static const nir_search_variable search194_0 = {
10332    { nir_search_value_variable, 0 },
10333    0, /* a */
10334    false,
10335    nir_type_invalid,
10336    NULL,
10337 };
10338 
10339 static const nir_search_variable search194_1 = {
10340    { nir_search_value_variable, 0 },
10341    1, /* b */
10342    false,
10343    nir_type_invalid,
10344    NULL,
10345 };
10346 
10347 static const nir_search_variable search194_2 = {
10348    { nir_search_value_variable, 0 },
10349    1, /* b */
10350    false,
10351    nir_type_invalid,
10352    NULL,
10353 };
10354 static const nir_search_expression search194 = {
10355    { nir_search_value_expression, 0 },
10356    false,
10357    nir_op_fcsel,
10358    { &search194_0.value, &search194_1.value, &search194_2.value },
10359    NULL,
10360 };
10361 
10362 static const nir_search_variable replace194 = {
10363    { nir_search_value_variable, 0 },
10364    1, /* b */
10365    false,
10366    nir_type_invalid,
10367    NULL,
10368 };
10369 
10370 static const struct transform nir_opt_algebraic_fcsel_xforms[] = {
10371    { &search194, &replace194.value, 0 },
10372 };
10373 
10374 static const nir_search_variable search212_0 = {
10375    { nir_search_value_variable, 0 },
10376    0, /* a */
10377    false,
10378    nir_type_invalid,
10379    NULL,
10380 };
10381 
10382 static const nir_search_constant search212_1_0 = {
10383    { nir_search_value_constant, 0 },
10384    nir_type_int, { 0x0 /* 0 */ },
10385 };
10386 
10387 static const nir_search_variable search212_1_1 = {
10388    { nir_search_value_variable, 0 },
10389    1, /* b */
10390    false,
10391    nir_type_invalid,
10392    NULL,
10393 };
10394 static const nir_search_expression search212_1 = {
10395    { nir_search_value_expression, 0 },
10396    false,
10397    nir_op_isub,
10398    { &search212_1_0.value, &search212_1_1.value },
10399    NULL,
10400 };
10401 static const nir_search_expression search212 = {
10402    { nir_search_value_expression, 0 },
10403    false,
10404    nir_op_isub,
10405    { &search212_0.value, &search212_1.value },
10406    NULL,
10407 };
10408 
10409 static const nir_search_variable replace212_0 = {
10410    { nir_search_value_variable, 0 },
10411    0, /* a */
10412    false,
10413    nir_type_invalid,
10414    NULL,
10415 };
10416 
10417 static const nir_search_variable replace212_1 = {
10418    { nir_search_value_variable, 0 },
10419    1, /* b */
10420    false,
10421    nir_type_invalid,
10422    NULL,
10423 };
10424 static const nir_search_expression replace212 = {
10425    { nir_search_value_expression, 0 },
10426    false,
10427    nir_op_iadd,
10428    { &replace212_0.value, &replace212_1.value },
10429    NULL,
10430 };
10431 
10432 static const nir_search_variable search216_0 = {
10433    { nir_search_value_variable, 0 },
10434    0, /* a */
10435    false,
10436    nir_type_invalid,
10437    NULL,
10438 };
10439 
10440 static const nir_search_variable search216_1 = {
10441    { nir_search_value_variable, 0 },
10442    1, /* b */
10443    false,
10444    nir_type_invalid,
10445    NULL,
10446 };
10447 static const nir_search_expression search216 = {
10448    { nir_search_value_expression, 0 },
10449    false,
10450    nir_op_isub,
10451    { &search216_0.value, &search216_1.value },
10452    NULL,
10453 };
10454 
10455 static const nir_search_variable replace216_0 = {
10456    { nir_search_value_variable, 0 },
10457    0, /* a */
10458    false,
10459    nir_type_invalid,
10460    NULL,
10461 };
10462 
10463 static const nir_search_variable replace216_1_0 = {
10464    { nir_search_value_variable, 0 },
10465    1, /* b */
10466    false,
10467    nir_type_invalid,
10468    NULL,
10469 };
10470 static const nir_search_expression replace216_1 = {
10471    { nir_search_value_expression, 0 },
10472    false,
10473    nir_op_ineg,
10474    { &replace216_1_0.value },
10475    NULL,
10476 };
10477 static const nir_search_expression replace216 = {
10478    { nir_search_value_expression, 0 },
10479    false,
10480    nir_op_iadd,
10481    { &replace216_0.value, &replace216_1.value },
10482    NULL,
10483 };
10484 
10485 static const struct transform nir_opt_algebraic_isub_xforms[] = {
10486    { &search212, &replace212.value, 0 },
10487    { &search216, &replace216.value, 19 },
10488 };
10489 
10490 static const nir_search_variable search80_0 = {
10491    { nir_search_value_variable, 0 },
10492    0, /* a */
10493    false,
10494    nir_type_invalid,
10495    NULL,
10496 };
10497 
10498 static const nir_search_variable search80_1 = {
10499    { nir_search_value_variable, 0 },
10500    0, /* a */
10501    false,
10502    nir_type_invalid,
10503    NULL,
10504 };
10505 static const nir_search_expression search80 = {
10506    { nir_search_value_expression, 0 },
10507    false,
10508    nir_op_fmax,
10509    { &search80_0.value, &search80_1.value },
10510    NULL,
10511 };
10512 
10513 static const nir_search_variable replace80 = {
10514    { nir_search_value_variable, 0 },
10515    0, /* a */
10516    false,
10517    nir_type_invalid,
10518    NULL,
10519 };
10520 
10521 static const nir_search_variable search91_0 = {
10522    { nir_search_value_variable, 0 },
10523    0, /* a */
10524    false,
10525    nir_type_invalid,
10526    NULL,
10527 };
10528 
10529 static const nir_search_variable search91_1_0_0 = {
10530    { nir_search_value_variable, 0 },
10531    0, /* a */
10532    false,
10533    nir_type_invalid,
10534    NULL,
10535 };
10536 static const nir_search_expression search91_1_0 = {
10537    { nir_search_value_expression, 0 },
10538    false,
10539    nir_op_fabs,
10540    { &search91_1_0_0.value },
10541    NULL,
10542 };
10543 static const nir_search_expression search91_1 = {
10544    { nir_search_value_expression, 0 },
10545    false,
10546    nir_op_fneg,
10547    { &search91_1_0.value },
10548    NULL,
10549 };
10550 static const nir_search_expression search91 = {
10551    { nir_search_value_expression, 0 },
10552    false,
10553    nir_op_fmax,
10554    { &search91_0.value, &search91_1.value },
10555    NULL,
10556 };
10557 
10558 static const nir_search_variable replace91 = {
10559    { nir_search_value_variable, 0 },
10560    0, /* a */
10561    false,
10562    nir_type_invalid,
10563    NULL,
10564 };
10565 
10566 static const nir_search_variable search93_0 = {
10567    { nir_search_value_variable, 0 },
10568    0, /* a */
10569    false,
10570    nir_type_invalid,
10571    NULL,
10572 };
10573 
10574 static const nir_search_variable search93_1_0 = {
10575    { nir_search_value_variable, 0 },
10576    0, /* a */
10577    false,
10578    nir_type_invalid,
10579    NULL,
10580 };
10581 static const nir_search_expression search93_1 = {
10582    { nir_search_value_expression, 0 },
10583    false,
10584    nir_op_fabs,
10585    { &search93_1_0.value },
10586    NULL,
10587 };
10588 static const nir_search_expression search93 = {
10589    { nir_search_value_expression, 0 },
10590    false,
10591    nir_op_fmax,
10592    { &search93_0.value, &search93_1.value },
10593    NULL,
10594 };
10595 
10596 static const nir_search_variable replace93_0 = {
10597    { nir_search_value_variable, 0 },
10598    0, /* a */
10599    false,
10600    nir_type_invalid,
10601    NULL,
10602 };
10603 static const nir_search_expression replace93 = {
10604    { nir_search_value_expression, 0 },
10605    false,
10606    nir_op_fabs,
10607    { &replace93_0.value },
10608    NULL,
10609 };
10610 
10611 static const nir_search_variable search95_0 = {
10612    { nir_search_value_variable, 0 },
10613    0, /* a */
10614    false,
10615    nir_type_invalid,
10616    NULL,
10617 };
10618 
10619 static const nir_search_variable search95_1_0 = {
10620    { nir_search_value_variable, 0 },
10621    0, /* a */
10622    false,
10623    nir_type_invalid,
10624    NULL,
10625 };
10626 static const nir_search_expression search95_1 = {
10627    { nir_search_value_expression, 0 },
10628    false,
10629    nir_op_fneg,
10630    { &search95_1_0.value },
10631    NULL,
10632 };
10633 static const nir_search_expression search95 = {
10634    { nir_search_value_expression, 0 },
10635    false,
10636    nir_op_fmax,
10637    { &search95_0.value, &search95_1.value },
10638    NULL,
10639 };
10640 
10641 static const nir_search_variable replace95_0 = {
10642    { nir_search_value_variable, 0 },
10643    0, /* a */
10644    false,
10645    nir_type_invalid,
10646    NULL,
10647 };
10648 static const nir_search_expression replace95 = {
10649    { nir_search_value_expression, 0 },
10650    false,
10651    nir_op_fabs,
10652    { &replace95_0.value },
10653    NULL,
10654 };
10655 
10656 static const nir_search_variable search98_0_0 = {
10657    { nir_search_value_variable, 0 },
10658    0, /* a */
10659    false,
10660    nir_type_invalid,
10661    NULL,
10662 };
10663 
10664 static const nir_search_constant search98_0_1 = {
10665    { nir_search_value_constant, 0 },
10666    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
10667 };
10668 static const nir_search_expression search98_0 = {
10669    { nir_search_value_expression, 0 },
10670    false,
10671    nir_op_fmin,
10672    { &search98_0_0.value, &search98_0_1.value },
10673    NULL,
10674 };
10675 
10676 static const nir_search_constant search98_1 = {
10677    { nir_search_value_constant, 0 },
10678    nir_type_float, { 0x0 /* 0.0 */ },
10679 };
10680 static const nir_search_expression search98 = {
10681    { nir_search_value_expression, 0 },
10682    true,
10683    nir_op_fmax,
10684    { &search98_0.value, &search98_1.value },
10685    NULL,
10686 };
10687 
10688 static const nir_search_variable replace98_0 = {
10689    { nir_search_value_variable, 0 },
10690    0, /* a */
10691    false,
10692    nir_type_invalid,
10693    NULL,
10694 };
10695 static const nir_search_expression replace98 = {
10696    { nir_search_value_expression, 0 },
10697    false,
10698    nir_op_fsat,
10699    { &replace98_0.value },
10700    NULL,
10701 };
10702 
10703 static const nir_search_variable search104_0_0 = {
10704    { nir_search_value_variable, 0 },
10705    0, /* a */
10706    false,
10707    nir_type_invalid,
10708    NULL,
10709 };
10710 static const nir_search_expression search104_0 = {
10711    { nir_search_value_expression, 0 },
10712    false,
10713    nir_op_fsat,
10714    { &search104_0_0.value },
10715    NULL,
10716 };
10717 
10718 static const nir_search_variable search104_1 = {
10719    { nir_search_value_variable, 32 },
10720    1, /* b */
10721    true,
10722    nir_type_invalid,
10723    (is_zero_to_one),
10724 };
10725 static const nir_search_expression search104 = {
10726    { nir_search_value_expression, 0 },
10727    false,
10728    nir_op_fmax,
10729    { &search104_0.value, &search104_1.value },
10730    NULL,
10731 };
10732 
10733 static const nir_search_variable replace104_0_0 = {
10734    { nir_search_value_variable, 0 },
10735    0, /* a */
10736    false,
10737    nir_type_invalid,
10738    NULL,
10739 };
10740 
10741 static const nir_search_variable replace104_0_1 = {
10742    { nir_search_value_variable, 0 },
10743    1, /* b */
10744    false,
10745    nir_type_invalid,
10746    NULL,
10747 };
10748 static const nir_search_expression replace104_0 = {
10749    { nir_search_value_expression, 0 },
10750    false,
10751    nir_op_fmax,
10752    { &replace104_0_0.value, &replace104_0_1.value },
10753    NULL,
10754 };
10755 static const nir_search_expression replace104 = {
10756    { nir_search_value_expression, 0 },
10757    false,
10758    nir_op_fsat,
10759    { &replace104_0.value },
10760    NULL,
10761 };
10762 
10763 static const struct transform nir_opt_algebraic_fmax_xforms[] = {
10764    { &search80, &replace80.value, 0 },
10765    { &search91, &replace91.value, 0 },
10766    { &search93, &replace93.value, 0 },
10767    { &search95, &replace95.value, 0 },
10768    { &search98, &replace98.value, 9 },
10769    { &search104, &replace104.value, 0 },
10770 };
10771 
10772 static const nir_search_variable search31_0 = {
10773    { nir_search_value_variable, 0 },
10774    0, /* a */
10775    false,
10776    nir_type_invalid,
10777    NULL,
10778 };
10779 
10780 static const nir_search_constant search31_1 = {
10781    { nir_search_value_constant, 0 },
10782    nir_type_int, { 0x0 /* 0 */ },
10783 };
10784 static const nir_search_expression search31 = {
10785    { nir_search_value_expression, 0 },
10786    false,
10787    nir_op_umul_unorm_4x8,
10788    { &search31_0.value, &search31_1.value },
10789    NULL,
10790 };
10791 
10792 static const nir_search_constant replace31 = {
10793    { nir_search_value_constant, 0 },
10794    nir_type_int, { 0x0 /* 0 */ },
10795 };
10796 
10797 static const nir_search_variable search32_0 = {
10798    { nir_search_value_variable, 0 },
10799    0, /* a */
10800    false,
10801    nir_type_invalid,
10802    NULL,
10803 };
10804 
10805 static const nir_search_constant search32_1 = {
10806    { nir_search_value_constant, 0 },
10807    nir_type_int, { -0x1 /* -1 */ },
10808 };
10809 static const nir_search_expression search32 = {
10810    { nir_search_value_expression, 0 },
10811    false,
10812    nir_op_umul_unorm_4x8,
10813    { &search32_0.value, &search32_1.value },
10814    NULL,
10815 };
10816 
10817 static const nir_search_variable replace32 = {
10818    { nir_search_value_variable, 0 },
10819    0, /* a */
10820    false,
10821    nir_type_invalid,
10822    NULL,
10823 };
10824 
10825 static const struct transform nir_opt_algebraic_umul_unorm_4x8_xforms[] = {
10826    { &search31, &replace31.value, 0 },
10827    { &search32, &replace32.value, 0 },
10828 };
10829 
10830 static const nir_search_variable search245_0 = {
10831    { nir_search_value_variable, 0 },
10832    0, /* base */
10833    false,
10834    nir_type_invalid,
10835    NULL,
10836 };
10837 
10838 static const nir_search_variable search245_1 = {
10839    { nir_search_value_variable, 0 },
10840    1, /* insert */
10841    false,
10842    nir_type_invalid,
10843    NULL,
10844 };
10845 
10846 static const nir_search_variable search245_2 = {
10847    { nir_search_value_variable, 0 },
10848    2, /* offset */
10849    false,
10850    nir_type_invalid,
10851    NULL,
10852 };
10853 
10854 static const nir_search_variable search245_3 = {
10855    { nir_search_value_variable, 0 },
10856    3, /* bits */
10857    false,
10858    nir_type_invalid,
10859    NULL,
10860 };
10861 static const nir_search_expression search245 = {
10862    { nir_search_value_expression, 0 },
10863    false,
10864    nir_op_bitfield_insert,
10865    { &search245_0.value, &search245_1.value, &search245_2.value, &search245_3.value },
10866    NULL,
10867 };
10868 
10869 static const nir_search_constant replace245_0_0 = {
10870    { nir_search_value_constant, 0 },
10871    nir_type_int, { 0x1f /* 31 */ },
10872 };
10873 
10874 static const nir_search_variable replace245_0_1 = {
10875    { nir_search_value_variable, 0 },
10876    3, /* bits */
10877    false,
10878    nir_type_invalid,
10879    NULL,
10880 };
10881 static const nir_search_expression replace245_0 = {
10882    { nir_search_value_expression, 0 },
10883    false,
10884    nir_op_ilt,
10885    { &replace245_0_0.value, &replace245_0_1.value },
10886    NULL,
10887 };
10888 
10889 static const nir_search_variable replace245_1 = {
10890    { nir_search_value_variable, 0 },
10891    1, /* insert */
10892    false,
10893    nir_type_invalid,
10894    NULL,
10895 };
10896 
10897 static const nir_search_variable replace245_2_0_0 = {
10898    { nir_search_value_variable, 0 },
10899    3, /* bits */
10900    false,
10901    nir_type_invalid,
10902    NULL,
10903 };
10904 
10905 static const nir_search_variable replace245_2_0_1 = {
10906    { nir_search_value_variable, 0 },
10907    2, /* offset */
10908    false,
10909    nir_type_invalid,
10910    NULL,
10911 };
10912 static const nir_search_expression replace245_2_0 = {
10913    { nir_search_value_expression, 0 },
10914    false,
10915    nir_op_bfm,
10916    { &replace245_2_0_0.value, &replace245_2_0_1.value },
10917    NULL,
10918 };
10919 
10920 static const nir_search_variable replace245_2_1 = {
10921    { nir_search_value_variable, 0 },
10922    1, /* insert */
10923    false,
10924    nir_type_invalid,
10925    NULL,
10926 };
10927 
10928 static const nir_search_variable replace245_2_2 = {
10929    { nir_search_value_variable, 0 },
10930    0, /* base */
10931    false,
10932    nir_type_invalid,
10933    NULL,
10934 };
10935 static const nir_search_expression replace245_2 = {
10936    { nir_search_value_expression, 0 },
10937    false,
10938    nir_op_bfi,
10939    { &replace245_2_0.value, &replace245_2_1.value, &replace245_2_2.value },
10940    NULL,
10941 };
10942 static const nir_search_expression replace245 = {
10943    { nir_search_value_expression, 0 },
10944    false,
10945    nir_op_bcsel,
10946    { &replace245_0.value, &replace245_1.value, &replace245_2.value },
10947    NULL,
10948 };
10949 
10950 static const struct transform nir_opt_algebraic_bitfield_insert_xforms[] = {
10951    { &search245, &replace245.value, 25 },
10952 };
10953 
10954 static const nir_search_variable search120_0_0 = {
10955    { nir_search_value_variable, 0 },
10956    0, /* a */
10957    false,
10958    nir_type_invalid,
10959    NULL,
10960 };
10961 static const nir_search_expression search120_0 = {
10962    { nir_search_value_expression, 0 },
10963    false,
10964    nir_op_fneg,
10965    { &search120_0_0.value },
10966    NULL,
10967 };
10968 
10969 static const nir_search_variable search120_1 = {
10970    { nir_search_value_variable, 0 },
10971    0, /* a */
10972    false,
10973    nir_type_invalid,
10974    NULL,
10975 };
10976 static const nir_search_expression search120 = {
10977    { nir_search_value_expression, 0 },
10978    false,
10979    nir_op_feq,
10980    { &search120_0.value, &search120_1.value },
10981    NULL,
10982 };
10983 
10984 static const nir_search_variable replace120_0 = {
10985    { nir_search_value_variable, 0 },
10986    0, /* a */
10987    false,
10988    nir_type_invalid,
10989    NULL,
10990 };
10991 
10992 static const nir_search_constant replace120_1 = {
10993    { nir_search_value_constant, 0 },
10994    nir_type_float, { 0x0 /* 0.0 */ },
10995 };
10996 static const nir_search_expression replace120 = {
10997    { nir_search_value_expression, 0 },
10998    false,
10999    nir_op_feq,
11000    { &replace120_0.value, &replace120_1.value },
11001    NULL,
11002 };
11003 
11004 static const nir_search_variable search273_0_0 = {
11005    { nir_search_value_variable, 0 },
11006    0, /* a */
11007    false,
11008    nir_type_invalid,
11009    NULL,
11010 };
11011 
11012 static const nir_search_variable search273_0_1 = {
11013    { nir_search_value_variable, 0 },
11014    1, /* b */
11015    true,
11016    nir_type_invalid,
11017    NULL,
11018 };
11019 
11020 static const nir_search_variable search273_0_2 = {
11021    { nir_search_value_variable, 0 },
11022    2, /* c */
11023    true,
11024    nir_type_invalid,
11025    NULL,
11026 };
11027 static const nir_search_expression search273_0 = {
11028    { nir_search_value_expression, 0 },
11029    false,
11030    nir_op_bcsel,
11031    { &search273_0_0.value, &search273_0_1.value, &search273_0_2.value },
11032    NULL,
11033 };
11034 
11035 static const nir_search_variable search273_1 = {
11036    { nir_search_value_variable, 0 },
11037    3, /* d */
11038    true,
11039    nir_type_invalid,
11040    NULL,
11041 };
11042 static const nir_search_expression search273 = {
11043    { nir_search_value_expression, 0 },
11044    false,
11045    nir_op_feq,
11046    { &search273_0.value, &search273_1.value },
11047    NULL,
11048 };
11049 
11050 static const nir_search_variable replace273_0 = {
11051    { nir_search_value_variable, 0 },
11052    0, /* a */
11053    false,
11054    nir_type_invalid,
11055    NULL,
11056 };
11057 
11058 static const nir_search_variable replace273_1_0 = {
11059    { nir_search_value_variable, 0 },
11060    1, /* b */
11061    false,
11062    nir_type_invalid,
11063    NULL,
11064 };
11065 
11066 static const nir_search_variable replace273_1_1 = {
11067    { nir_search_value_variable, 0 },
11068    3, /* d */
11069    false,
11070    nir_type_invalid,
11071    NULL,
11072 };
11073 static const nir_search_expression replace273_1 = {
11074    { nir_search_value_expression, 0 },
11075    false,
11076    nir_op_feq,
11077    { &replace273_1_0.value, &replace273_1_1.value },
11078    NULL,
11079 };
11080 
11081 static const nir_search_variable replace273_2_0 = {
11082    { nir_search_value_variable, 0 },
11083    2, /* c */
11084    false,
11085    nir_type_invalid,
11086    NULL,
11087 };
11088 
11089 static const nir_search_variable replace273_2_1 = {
11090    { nir_search_value_variable, 0 },
11091    3, /* d */
11092    false,
11093    nir_type_invalid,
11094    NULL,
11095 };
11096 static const nir_search_expression replace273_2 = {
11097    { nir_search_value_expression, 0 },
11098    false,
11099    nir_op_feq,
11100    { &replace273_2_0.value, &replace273_2_1.value },
11101    NULL,
11102 };
11103 static const nir_search_expression replace273 = {
11104    { nir_search_value_expression, 0 },
11105    false,
11106    nir_op_bcsel,
11107    { &replace273_0.value, &replace273_1.value, &replace273_2.value },
11108    NULL,
11109 };
11110 
11111 static const nir_search_variable search274_0 = {
11112    { nir_search_value_variable, 0 },
11113    0, /* d */
11114    true,
11115    nir_type_invalid,
11116    NULL,
11117 };
11118 
11119 static const nir_search_variable search274_1_0 = {
11120    { nir_search_value_variable, 0 },
11121    1, /* a */
11122    false,
11123    nir_type_invalid,
11124    NULL,
11125 };
11126 
11127 static const nir_search_variable search274_1_1 = {
11128    { nir_search_value_variable, 0 },
11129    2, /* b */
11130    true,
11131    nir_type_invalid,
11132    NULL,
11133 };
11134 
11135 static const nir_search_variable search274_1_2 = {
11136    { nir_search_value_variable, 0 },
11137    3, /* c */
11138    true,
11139    nir_type_invalid,
11140    NULL,
11141 };
11142 static const nir_search_expression search274_1 = {
11143    { nir_search_value_expression, 0 },
11144    false,
11145    nir_op_bcsel,
11146    { &search274_1_0.value, &search274_1_1.value, &search274_1_2.value },
11147    NULL,
11148 };
11149 static const nir_search_expression search274 = {
11150    { nir_search_value_expression, 0 },
11151    false,
11152    nir_op_feq,
11153    { &search274_0.value, &search274_1.value },
11154    NULL,
11155 };
11156 
11157 static const nir_search_variable replace274_0 = {
11158    { nir_search_value_variable, 0 },
11159    1, /* a */
11160    false,
11161    nir_type_invalid,
11162    NULL,
11163 };
11164 
11165 static const nir_search_variable replace274_1_0 = {
11166    { nir_search_value_variable, 0 },
11167    0, /* d */
11168    false,
11169    nir_type_invalid,
11170    NULL,
11171 };
11172 
11173 static const nir_search_variable replace274_1_1 = {
11174    { nir_search_value_variable, 0 },
11175    2, /* b */
11176    false,
11177    nir_type_invalid,
11178    NULL,
11179 };
11180 static const nir_search_expression replace274_1 = {
11181    { nir_search_value_expression, 0 },
11182    false,
11183    nir_op_feq,
11184    { &replace274_1_0.value, &replace274_1_1.value },
11185    NULL,
11186 };
11187 
11188 static const nir_search_variable replace274_2_0 = {
11189    { nir_search_value_variable, 0 },
11190    0, /* d */
11191    false,
11192    nir_type_invalid,
11193    NULL,
11194 };
11195 
11196 static const nir_search_variable replace274_2_1 = {
11197    { nir_search_value_variable, 0 },
11198    3, /* c */
11199    false,
11200    nir_type_invalid,
11201    NULL,
11202 };
11203 static const nir_search_expression replace274_2 = {
11204    { nir_search_value_expression, 0 },
11205    false,
11206    nir_op_feq,
11207    { &replace274_2_0.value, &replace274_2_1.value },
11208    NULL,
11209 };
11210 static const nir_search_expression replace274 = {
11211    { nir_search_value_expression, 0 },
11212    false,
11213    nir_op_bcsel,
11214    { &replace274_0.value, &replace274_1.value, &replace274_2.value },
11215    NULL,
11216 };
11217 
11218 static const struct transform nir_opt_algebraic_feq_xforms[] = {
11219    { &search120, &replace120.value, 0 },
11220    { &search273, &replace273.value, 0 },
11221    { &search274, &replace274.value, 0 },
11222 };
11223 
11224 static const nir_search_variable search42_0 = {
11225    { nir_search_value_variable, 0 },
11226    0, /* a */
11227    false,
11228    nir_type_invalid,
11229    NULL,
11230 };
11231 
11232 static const nir_search_variable search42_1 = {
11233    { nir_search_value_variable, 0 },
11234    1, /* b */
11235    false,
11236    nir_type_invalid,
11237    NULL,
11238 };
11239 
11240 static const nir_search_constant search42_2 = {
11241    { nir_search_value_constant, 0 },
11242    nir_type_float, { 0x0 /* 0.0 */ },
11243 };
11244 static const nir_search_expression search42 = {
11245    { nir_search_value_expression, 0 },
11246    true,
11247    nir_op_flrp,
11248    { &search42_0.value, &search42_1.value, &search42_2.value },
11249    NULL,
11250 };
11251 
11252 static const nir_search_variable replace42 = {
11253    { nir_search_value_variable, 0 },
11254    0, /* a */
11255    false,
11256    nir_type_invalid,
11257    NULL,
11258 };
11259 
11260 static const nir_search_variable search43_0 = {
11261    { nir_search_value_variable, 0 },
11262    0, /* a */
11263    false,
11264    nir_type_invalid,
11265    NULL,
11266 };
11267 
11268 static const nir_search_variable search43_1 = {
11269    { nir_search_value_variable, 0 },
11270    1, /* b */
11271    false,
11272    nir_type_invalid,
11273    NULL,
11274 };
11275 
11276 static const nir_search_constant search43_2 = {
11277    { nir_search_value_constant, 0 },
11278    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
11279 };
11280 static const nir_search_expression search43 = {
11281    { nir_search_value_expression, 0 },
11282    true,
11283    nir_op_flrp,
11284    { &search43_0.value, &search43_1.value, &search43_2.value },
11285    NULL,
11286 };
11287 
11288 static const nir_search_variable replace43 = {
11289    { nir_search_value_variable, 0 },
11290    1, /* b */
11291    false,
11292    nir_type_invalid,
11293    NULL,
11294 };
11295 
11296 static const nir_search_variable search44_0 = {
11297    { nir_search_value_variable, 0 },
11298    0, /* a */
11299    false,
11300    nir_type_invalid,
11301    NULL,
11302 };
11303 
11304 static const nir_search_variable search44_1 = {
11305    { nir_search_value_variable, 0 },
11306    0, /* a */
11307    false,
11308    nir_type_invalid,
11309    NULL,
11310 };
11311 
11312 static const nir_search_variable search44_2 = {
11313    { nir_search_value_variable, 0 },
11314    1, /* b */
11315    false,
11316    nir_type_invalid,
11317    NULL,
11318 };
11319 static const nir_search_expression search44 = {
11320    { nir_search_value_expression, 0 },
11321    true,
11322    nir_op_flrp,
11323    { &search44_0.value, &search44_1.value, &search44_2.value },
11324    NULL,
11325 };
11326 
11327 static const nir_search_variable replace44 = {
11328    { nir_search_value_variable, 0 },
11329    0, /* a */
11330    false,
11331    nir_type_invalid,
11332    NULL,
11333 };
11334 
11335 static const nir_search_constant search45_0 = {
11336    { nir_search_value_constant, 0 },
11337    nir_type_float, { 0x0 /* 0.0 */ },
11338 };
11339 
11340 static const nir_search_variable search45_1 = {
11341    { nir_search_value_variable, 0 },
11342    0, /* a */
11343    false,
11344    nir_type_invalid,
11345    NULL,
11346 };
11347 
11348 static const nir_search_variable search45_2 = {
11349    { nir_search_value_variable, 0 },
11350    1, /* b */
11351    false,
11352    nir_type_invalid,
11353    NULL,
11354 };
11355 static const nir_search_expression search45 = {
11356    { nir_search_value_expression, 0 },
11357    true,
11358    nir_op_flrp,
11359    { &search45_0.value, &search45_1.value, &search45_2.value },
11360    NULL,
11361 };
11362 
11363 static const nir_search_variable replace45_0 = {
11364    { nir_search_value_variable, 0 },
11365    0, /* a */
11366    false,
11367    nir_type_invalid,
11368    NULL,
11369 };
11370 
11371 static const nir_search_variable replace45_1 = {
11372    { nir_search_value_variable, 0 },
11373    1, /* b */
11374    false,
11375    nir_type_invalid,
11376    NULL,
11377 };
11378 static const nir_search_expression replace45 = {
11379    { nir_search_value_expression, 0 },
11380    false,
11381    nir_op_fmul,
11382    { &replace45_0.value, &replace45_1.value },
11383    NULL,
11384 };
11385 
11386 static const nir_search_variable search46_0 = {
11387    { nir_search_value_variable, 0 },
11388    0, /* a */
11389    false,
11390    nir_type_invalid,
11391    NULL,
11392 };
11393 
11394 static const nir_search_variable search46_1 = {
11395    { nir_search_value_variable, 0 },
11396    1, /* b */
11397    false,
11398    nir_type_invalid,
11399    NULL,
11400 };
11401 
11402 static const nir_search_variable search46_2_0 = {
11403    { nir_search_value_variable, 0 },
11404    2, /* c */
11405    false,
11406    nir_type_invalid,
11407    NULL,
11408 };
11409 static const nir_search_expression search46_2 = {
11410    { nir_search_value_expression, 0 },
11411    false,
11412    nir_op_b2f,
11413    { &search46_2_0.value },
11414    NULL,
11415 };
11416 static const nir_search_expression search46 = {
11417    { nir_search_value_expression, 0 },
11418    true,
11419    nir_op_flrp,
11420    { &search46_0.value, &search46_1.value, &search46_2.value },
11421    NULL,
11422 };
11423 
11424 static const nir_search_variable replace46_0 = {
11425    { nir_search_value_variable, 0 },
11426    2, /* c */
11427    false,
11428    nir_type_invalid,
11429    NULL,
11430 };
11431 
11432 static const nir_search_variable replace46_1 = {
11433    { nir_search_value_variable, 0 },
11434    1, /* b */
11435    false,
11436    nir_type_invalid,
11437    NULL,
11438 };
11439 
11440 static const nir_search_variable replace46_2 = {
11441    { nir_search_value_variable, 0 },
11442    0, /* a */
11443    false,
11444    nir_type_invalid,
11445    NULL,
11446 };
11447 static const nir_search_expression replace46 = {
11448    { nir_search_value_expression, 0 },
11449    false,
11450    nir_op_bcsel,
11451    { &replace46_0.value, &replace46_1.value, &replace46_2.value },
11452    NULL,
11453 };
11454 
11455 static const nir_search_variable search47_0 = {
11456    { nir_search_value_variable, 0 },
11457    0, /* a */
11458    false,
11459    nir_type_invalid,
11460    NULL,
11461 };
11462 
11463 static const nir_search_constant search47_1 = {
11464    { nir_search_value_constant, 0 },
11465    nir_type_float, { 0x0 /* 0.0 */ },
11466 };
11467 
11468 static const nir_search_variable search47_2 = {
11469    { nir_search_value_variable, 0 },
11470    1, /* c */
11471    false,
11472    nir_type_invalid,
11473    NULL,
11474 };
11475 static const nir_search_expression search47 = {
11476    { nir_search_value_expression, 0 },
11477    true,
11478    nir_op_flrp,
11479    { &search47_0.value, &search47_1.value, &search47_2.value },
11480    NULL,
11481 };
11482 
11483 static const nir_search_variable replace47_0_0_0 = {
11484    { nir_search_value_variable, 0 },
11485    0, /* a */
11486    false,
11487    nir_type_invalid,
11488    NULL,
11489 };
11490 static const nir_search_expression replace47_0_0 = {
11491    { nir_search_value_expression, 0 },
11492    false,
11493    nir_op_fneg,
11494    { &replace47_0_0_0.value },
11495    NULL,
11496 };
11497 
11498 static const nir_search_variable replace47_0_1 = {
11499    { nir_search_value_variable, 0 },
11500    1, /* c */
11501    false,
11502    nir_type_invalid,
11503    NULL,
11504 };
11505 static const nir_search_expression replace47_0 = {
11506    { nir_search_value_expression, 0 },
11507    false,
11508    nir_op_fmul,
11509    { &replace47_0_0.value, &replace47_0_1.value },
11510    NULL,
11511 };
11512 
11513 static const nir_search_variable replace47_1 = {
11514    { nir_search_value_variable, 0 },
11515    0, /* a */
11516    false,
11517    nir_type_invalid,
11518    NULL,
11519 };
11520 static const nir_search_expression replace47 = {
11521    { nir_search_value_expression, 0 },
11522    false,
11523    nir_op_fadd,
11524    { &replace47_0.value, &replace47_1.value },
11525    NULL,
11526 };
11527 
11528 static const nir_search_variable search48_0 = {
11529    { nir_search_value_variable, 0 },
11530    0, /* a */
11531    false,
11532    nir_type_invalid,
11533    NULL,
11534 };
11535 
11536 static const nir_search_variable search48_1 = {
11537    { nir_search_value_variable, 0 },
11538    1, /* b */
11539    false,
11540    nir_type_invalid,
11541    NULL,
11542 };
11543 
11544 static const nir_search_variable search48_2 = {
11545    { nir_search_value_variable, 0 },
11546    2, /* c */
11547    false,
11548    nir_type_invalid,
11549    NULL,
11550 };
11551 static const nir_search_expression search48 = {
11552    { nir_search_value_expression, 32 },
11553    false,
11554    nir_op_flrp,
11555    { &search48_0.value, &search48_1.value, &search48_2.value },
11556    NULL,
11557 };
11558 
11559 static const nir_search_variable replace48_0_0 = {
11560    { nir_search_value_variable, 0 },
11561    2, /* c */
11562    false,
11563    nir_type_invalid,
11564    NULL,
11565 };
11566 
11567 static const nir_search_variable replace48_0_1_0 = {
11568    { nir_search_value_variable, 0 },
11569    1, /* b */
11570    false,
11571    nir_type_invalid,
11572    NULL,
11573 };
11574 
11575 static const nir_search_variable replace48_0_1_1 = {
11576    { nir_search_value_variable, 0 },
11577    0, /* a */
11578    false,
11579    nir_type_invalid,
11580    NULL,
11581 };
11582 static const nir_search_expression replace48_0_1 = {
11583    { nir_search_value_expression, 0 },
11584    false,
11585    nir_op_fsub,
11586    { &replace48_0_1_0.value, &replace48_0_1_1.value },
11587    NULL,
11588 };
11589 static const nir_search_expression replace48_0 = {
11590    { nir_search_value_expression, 0 },
11591    false,
11592    nir_op_fmul,
11593    { &replace48_0_0.value, &replace48_0_1.value },
11594    NULL,
11595 };
11596 
11597 static const nir_search_variable replace48_1 = {
11598    { nir_search_value_variable, 0 },
11599    0, /* a */
11600    false,
11601    nir_type_invalid,
11602    NULL,
11603 };
11604 static const nir_search_expression replace48 = {
11605    { nir_search_value_expression, 0 },
11606    false,
11607    nir_op_fadd,
11608    { &replace48_0.value, &replace48_1.value },
11609    NULL,
11610 };
11611 
11612 static const nir_search_variable search49_0 = {
11613    { nir_search_value_variable, 0 },
11614    0, /* a */
11615    false,
11616    nir_type_invalid,
11617    NULL,
11618 };
11619 
11620 static const nir_search_variable search49_1 = {
11621    { nir_search_value_variable, 0 },
11622    1, /* b */
11623    false,
11624    nir_type_invalid,
11625    NULL,
11626 };
11627 
11628 static const nir_search_variable search49_2 = {
11629    { nir_search_value_variable, 0 },
11630    2, /* c */
11631    false,
11632    nir_type_invalid,
11633    NULL,
11634 };
11635 static const nir_search_expression search49 = {
11636    { nir_search_value_expression, 64 },
11637    false,
11638    nir_op_flrp,
11639    { &search49_0.value, &search49_1.value, &search49_2.value },
11640    NULL,
11641 };
11642 
11643 static const nir_search_variable replace49_0_0 = {
11644    { nir_search_value_variable, 0 },
11645    2, /* c */
11646    false,
11647    nir_type_invalid,
11648    NULL,
11649 };
11650 
11651 static const nir_search_variable replace49_0_1_0 = {
11652    { nir_search_value_variable, 0 },
11653    1, /* b */
11654    false,
11655    nir_type_invalid,
11656    NULL,
11657 };
11658 
11659 static const nir_search_variable replace49_0_1_1 = {
11660    { nir_search_value_variable, 0 },
11661    0, /* a */
11662    false,
11663    nir_type_invalid,
11664    NULL,
11665 };
11666 static const nir_search_expression replace49_0_1 = {
11667    { nir_search_value_expression, 0 },
11668    false,
11669    nir_op_fsub,
11670    { &replace49_0_1_0.value, &replace49_0_1_1.value },
11671    NULL,
11672 };
11673 static const nir_search_expression replace49_0 = {
11674    { nir_search_value_expression, 0 },
11675    false,
11676    nir_op_fmul,
11677    { &replace49_0_0.value, &replace49_0_1.value },
11678    NULL,
11679 };
11680 
11681 static const nir_search_variable replace49_1 = {
11682    { nir_search_value_variable, 0 },
11683    0, /* a */
11684    false,
11685    nir_type_invalid,
11686    NULL,
11687 };
11688 static const nir_search_expression replace49 = {
11689    { nir_search_value_expression, 0 },
11690    false,
11691    nir_op_fadd,
11692    { &replace49_0.value, &replace49_1.value },
11693    NULL,
11694 };
11695 
11696 static const struct transform nir_opt_algebraic_flrp_xforms[] = {
11697    { &search42, &replace42.value, 0 },
11698    { &search43, &replace43.value, 0 },
11699    { &search44, &replace44.value, 0 },
11700    { &search45, &replace45.value, 0 },
11701    { &search46, &replace46.value, 2 },
11702    { &search47, &replace47.value, 0 },
11703    { &search48, &replace48.value, 2 },
11704    { &search49, &replace49.value, 3 },
11705 };
11706 
11707 static const nir_search_variable search107_0_0 = {
11708    { nir_search_value_variable, 0 },
11709    0, /* a */
11710    false,
11711    nir_type_invalid,
11712    NULL,
11713 };
11714 
11715 static const nir_search_variable search107_0_1 = {
11716    { nir_search_value_variable, 0 },
11717    1, /* b */
11718    false,
11719    nir_type_invalid,
11720    NULL,
11721 };
11722 static const nir_search_expression search107_0 = {
11723    { nir_search_value_expression, 0 },
11724    false,
11725    nir_op_flt,
11726    { &search107_0_0.value, &search107_0_1.value },
11727    NULL,
11728 };
11729 
11730 static const nir_search_variable search107_1_0 = {
11731    { nir_search_value_variable, 0 },
11732    0, /* a */
11733    false,
11734    nir_type_invalid,
11735    NULL,
11736 };
11737 
11738 static const nir_search_variable search107_1_1 = {
11739    { nir_search_value_variable, 0 },
11740    2, /* c */
11741    false,
11742    nir_type_invalid,
11743    NULL,
11744 };
11745 static const nir_search_expression search107_1 = {
11746    { nir_search_value_expression, 0 },
11747    false,
11748    nir_op_flt,
11749    { &search107_1_0.value, &search107_1_1.value },
11750    NULL,
11751 };
11752 static const nir_search_expression search107 = {
11753    { nir_search_value_expression, 0 },
11754    true,
11755    nir_op_ior,
11756    { &search107_0.value, &search107_1.value },
11757    NULL,
11758 };
11759 
11760 static const nir_search_variable replace107_0 = {
11761    { nir_search_value_variable, 0 },
11762    0, /* a */
11763    false,
11764    nir_type_invalid,
11765    NULL,
11766 };
11767 
11768 static const nir_search_variable replace107_1_0 = {
11769    { nir_search_value_variable, 0 },
11770    1, /* b */
11771    false,
11772    nir_type_invalid,
11773    NULL,
11774 };
11775 
11776 static const nir_search_variable replace107_1_1 = {
11777    { nir_search_value_variable, 0 },
11778    2, /* c */
11779    false,
11780    nir_type_invalid,
11781    NULL,
11782 };
11783 static const nir_search_expression replace107_1 = {
11784    { nir_search_value_expression, 0 },
11785    false,
11786    nir_op_fmax,
11787    { &replace107_1_0.value, &replace107_1_1.value },
11788    NULL,
11789 };
11790 static const nir_search_expression replace107 = {
11791    { nir_search_value_expression, 0 },
11792    false,
11793    nir_op_flt,
11794    { &replace107_0.value, &replace107_1.value },
11795    NULL,
11796 };
11797 
11798 static const nir_search_variable search108_0_0 = {
11799    { nir_search_value_variable, 0 },
11800    0, /* a */
11801    false,
11802    nir_type_invalid,
11803    NULL,
11804 };
11805 
11806 static const nir_search_variable search108_0_1 = {
11807    { nir_search_value_variable, 0 },
11808    1, /* c */
11809    false,
11810    nir_type_invalid,
11811    NULL,
11812 };
11813 static const nir_search_expression search108_0 = {
11814    { nir_search_value_expression, 0 },
11815    false,
11816    nir_op_flt,
11817    { &search108_0_0.value, &search108_0_1.value },
11818    NULL,
11819 };
11820 
11821 static const nir_search_variable search108_1_0 = {
11822    { nir_search_value_variable, 0 },
11823    2, /* b */
11824    false,
11825    nir_type_invalid,
11826    NULL,
11827 };
11828 
11829 static const nir_search_variable search108_1_1 = {
11830    { nir_search_value_variable, 0 },
11831    1, /* c */
11832    false,
11833    nir_type_invalid,
11834    NULL,
11835 };
11836 static const nir_search_expression search108_1 = {
11837    { nir_search_value_expression, 0 },
11838    false,
11839    nir_op_flt,
11840    { &search108_1_0.value, &search108_1_1.value },
11841    NULL,
11842 };
11843 static const nir_search_expression search108 = {
11844    { nir_search_value_expression, 0 },
11845    true,
11846    nir_op_ior,
11847    { &search108_0.value, &search108_1.value },
11848    NULL,
11849 };
11850 
11851 static const nir_search_variable replace108_0_0 = {
11852    { nir_search_value_variable, 0 },
11853    0, /* a */
11854    false,
11855    nir_type_invalid,
11856    NULL,
11857 };
11858 
11859 static const nir_search_variable replace108_0_1 = {
11860    { nir_search_value_variable, 0 },
11861    2, /* b */
11862    false,
11863    nir_type_invalid,
11864    NULL,
11865 };
11866 static const nir_search_expression replace108_0 = {
11867    { nir_search_value_expression, 0 },
11868    false,
11869    nir_op_fmin,
11870    { &replace108_0_0.value, &replace108_0_1.value },
11871    NULL,
11872 };
11873 
11874 static const nir_search_variable replace108_1 = {
11875    { nir_search_value_variable, 0 },
11876    1, /* c */
11877    false,
11878    nir_type_invalid,
11879    NULL,
11880 };
11881 static const nir_search_expression replace108 = {
11882    { nir_search_value_expression, 0 },
11883    false,
11884    nir_op_flt,
11885    { &replace108_0.value, &replace108_1.value },
11886    NULL,
11887 };
11888 
11889 static const nir_search_variable search109_0_0 = {
11890    { nir_search_value_variable, 0 },
11891    0, /* a */
11892    false,
11893    nir_type_invalid,
11894    NULL,
11895 };
11896 
11897 static const nir_search_variable search109_0_1 = {
11898    { nir_search_value_variable, 0 },
11899    1, /* b */
11900    false,
11901    nir_type_invalid,
11902    NULL,
11903 };
11904 static const nir_search_expression search109_0 = {
11905    { nir_search_value_expression, 0 },
11906    false,
11907    nir_op_fge,
11908    { &search109_0_0.value, &search109_0_1.value },
11909    NULL,
11910 };
11911 
11912 static const nir_search_variable search109_1_0 = {
11913    { nir_search_value_variable, 0 },
11914    0, /* a */
11915    false,
11916    nir_type_invalid,
11917    NULL,
11918 };
11919 
11920 static const nir_search_variable search109_1_1 = {
11921    { nir_search_value_variable, 0 },
11922    2, /* c */
11923    false,
11924    nir_type_invalid,
11925    NULL,
11926 };
11927 static const nir_search_expression search109_1 = {
11928    { nir_search_value_expression, 0 },
11929    false,
11930    nir_op_fge,
11931    { &search109_1_0.value, &search109_1_1.value },
11932    NULL,
11933 };
11934 static const nir_search_expression search109 = {
11935    { nir_search_value_expression, 0 },
11936    true,
11937    nir_op_ior,
11938    { &search109_0.value, &search109_1.value },
11939    NULL,
11940 };
11941 
11942 static const nir_search_variable replace109_0 = {
11943    { nir_search_value_variable, 0 },
11944    0, /* a */
11945    false,
11946    nir_type_invalid,
11947    NULL,
11948 };
11949 
11950 static const nir_search_variable replace109_1_0 = {
11951    { nir_search_value_variable, 0 },
11952    1, /* b */
11953    false,
11954    nir_type_invalid,
11955    NULL,
11956 };
11957 
11958 static const nir_search_variable replace109_1_1 = {
11959    { nir_search_value_variable, 0 },
11960    2, /* c */
11961    false,
11962    nir_type_invalid,
11963    NULL,
11964 };
11965 static const nir_search_expression replace109_1 = {
11966    { nir_search_value_expression, 0 },
11967    false,
11968    nir_op_fmin,
11969    { &replace109_1_0.value, &replace109_1_1.value },
11970    NULL,
11971 };
11972 static const nir_search_expression replace109 = {
11973    { nir_search_value_expression, 0 },
11974    false,
11975    nir_op_fge,
11976    { &replace109_0.value, &replace109_1.value },
11977    NULL,
11978 };
11979 
11980 static const nir_search_variable search110_0_0 = {
11981    { nir_search_value_variable, 0 },
11982    0, /* a */
11983    false,
11984    nir_type_invalid,
11985    NULL,
11986 };
11987 
11988 static const nir_search_variable search110_0_1 = {
11989    { nir_search_value_variable, 0 },
11990    1, /* c */
11991    false,
11992    nir_type_invalid,
11993    NULL,
11994 };
11995 static const nir_search_expression search110_0 = {
11996    { nir_search_value_expression, 0 },
11997    false,
11998    nir_op_fge,
11999    { &search110_0_0.value, &search110_0_1.value },
12000    NULL,
12001 };
12002 
12003 static const nir_search_variable search110_1_0 = {
12004    { nir_search_value_variable, 0 },
12005    2, /* b */
12006    false,
12007    nir_type_invalid,
12008    NULL,
12009 };
12010 
12011 static const nir_search_variable search110_1_1 = {
12012    { nir_search_value_variable, 0 },
12013    1, /* c */
12014    false,
12015    nir_type_invalid,
12016    NULL,
12017 };
12018 static const nir_search_expression search110_1 = {
12019    { nir_search_value_expression, 0 },
12020    false,
12021    nir_op_fge,
12022    { &search110_1_0.value, &search110_1_1.value },
12023    NULL,
12024 };
12025 static const nir_search_expression search110 = {
12026    { nir_search_value_expression, 0 },
12027    true,
12028    nir_op_ior,
12029    { &search110_0.value, &search110_1.value },
12030    NULL,
12031 };
12032 
12033 static const nir_search_variable replace110_0_0 = {
12034    { nir_search_value_variable, 0 },
12035    0, /* a */
12036    false,
12037    nir_type_invalid,
12038    NULL,
12039 };
12040 
12041 static const nir_search_variable replace110_0_1 = {
12042    { nir_search_value_variable, 0 },
12043    2, /* b */
12044    false,
12045    nir_type_invalid,
12046    NULL,
12047 };
12048 static const nir_search_expression replace110_0 = {
12049    { nir_search_value_expression, 0 },
12050    false,
12051    nir_op_fmax,
12052    { &replace110_0_0.value, &replace110_0_1.value },
12053    NULL,
12054 };
12055 
12056 static const nir_search_variable replace110_1 = {
12057    { nir_search_value_variable, 0 },
12058    1, /* c */
12059    false,
12060    nir_type_invalid,
12061    NULL,
12062 };
12063 static const nir_search_expression replace110 = {
12064    { nir_search_value_expression, 0 },
12065    false,
12066    nir_op_fge,
12067    { &replace110_0.value, &replace110_1.value },
12068    NULL,
12069 };
12070 
12071 static const nir_search_variable search138_0 = {
12072    { nir_search_value_variable, 0 },
12073    0, /* a */
12074    false,
12075    nir_type_invalid,
12076    NULL,
12077 };
12078 
12079 static const nir_search_variable search138_1 = {
12080    { nir_search_value_variable, 0 },
12081    0, /* a */
12082    false,
12083    nir_type_invalid,
12084    NULL,
12085 };
12086 static const nir_search_expression search138 = {
12087    { nir_search_value_expression, 0 },
12088    false,
12089    nir_op_ior,
12090    { &search138_0.value, &search138_1.value },
12091    NULL,
12092 };
12093 
12094 static const nir_search_variable replace138 = {
12095    { nir_search_value_variable, 0 },
12096    0, /* a */
12097    false,
12098    nir_type_invalid,
12099    NULL,
12100 };
12101 
12102 static const nir_search_variable search139_0 = {
12103    { nir_search_value_variable, 0 },
12104    0, /* a */
12105    false,
12106    nir_type_invalid,
12107    NULL,
12108 };
12109 
12110 static const nir_search_constant search139_1 = {
12111    { nir_search_value_constant, 0 },
12112    nir_type_int, { 0x0 /* 0 */ },
12113 };
12114 static const nir_search_expression search139 = {
12115    { nir_search_value_expression, 0 },
12116    false,
12117    nir_op_ior,
12118    { &search139_0.value, &search139_1.value },
12119    NULL,
12120 };
12121 
12122 static const nir_search_variable replace139 = {
12123    { nir_search_value_variable, 0 },
12124    0, /* a */
12125    false,
12126    nir_type_invalid,
12127    NULL,
12128 };
12129 
12130 static const nir_search_variable search140_0 = {
12131    { nir_search_value_variable, 0 },
12132    0, /* a */
12133    false,
12134    nir_type_invalid,
12135    NULL,
12136 };
12137 
12138 static const nir_search_constant search140_1 = {
12139    { nir_search_value_constant, 32 },
12140    nir_type_bool32, { NIR_TRUE /* True */ },
12141 };
12142 static const nir_search_expression search140 = {
12143    { nir_search_value_expression, 0 },
12144    false,
12145    nir_op_ior,
12146    { &search140_0.value, &search140_1.value },
12147    NULL,
12148 };
12149 
12150 static const nir_search_constant replace140 = {
12151    { nir_search_value_constant, 32 },
12152    nir_type_bool32, { NIR_TRUE /* True */ },
12153 };
12154 
12155 static const nir_search_variable search146_0_0 = {
12156    { nir_search_value_variable, 0 },
12157    0, /* a */
12158    false,
12159    nir_type_invalid,
12160    NULL,
12161 };
12162 static const nir_search_expression search146_0 = {
12163    { nir_search_value_expression, 0 },
12164    false,
12165    nir_op_inot,
12166    { &search146_0_0.value },
12167    NULL,
12168 };
12169 
12170 static const nir_search_variable search146_1_0 = {
12171    { nir_search_value_variable, 0 },
12172    1, /* b */
12173    false,
12174    nir_type_invalid,
12175    NULL,
12176 };
12177 static const nir_search_expression search146_1 = {
12178    { nir_search_value_expression, 0 },
12179    false,
12180    nir_op_inot,
12181    { &search146_1_0.value },
12182    NULL,
12183 };
12184 static const nir_search_expression search146 = {
12185    { nir_search_value_expression, 0 },
12186    false,
12187    nir_op_ior,
12188    { &search146_0.value, &search146_1.value },
12189    NULL,
12190 };
12191 
12192 static const nir_search_variable replace146_0_0 = {
12193    { nir_search_value_variable, 0 },
12194    0, /* a */
12195    false,
12196    nir_type_invalid,
12197    NULL,
12198 };
12199 
12200 static const nir_search_variable replace146_0_1 = {
12201    { nir_search_value_variable, 0 },
12202    1, /* b */
12203    false,
12204    nir_type_invalid,
12205    NULL,
12206 };
12207 static const nir_search_expression replace146_0 = {
12208    { nir_search_value_expression, 0 },
12209    false,
12210    nir_op_iand,
12211    { &replace146_0_0.value, &replace146_0_1.value },
12212    NULL,
12213 };
12214 static const nir_search_expression replace146 = {
12215    { nir_search_value_expression, 0 },
12216    false,
12217    nir_op_inot,
12218    { &replace146_0.value },
12219    NULL,
12220 };
12221 
12222 static const nir_search_variable search262_0_0_0_0_0_0_0_0_0_0_0_0_0_0 = {
12223    { nir_search_value_variable, 32 },
12224    0, /* x */
12225    false,
12226    nir_type_invalid,
12227    NULL,
12228 };
12229 
12230 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_0_0_0_0_1 = {
12231    { nir_search_value_constant, 0 },
12232    nir_type_int, { 0x10 /* 16 */ },
12233 };
12234 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_0_0_0_0 = {
12235    { nir_search_value_expression, 0 },
12236    false,
12237    nir_op_ishl,
12238    { &search262_0_0_0_0_0_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_0_0_0_0_0_0_0_1.value },
12239    NULL,
12240 };
12241 
12242 static const nir_search_variable search262_0_0_0_0_0_0_0_0_0_0_0_0_1_0 = {
12243    { nir_search_value_variable, 32 },
12244    0, /* x */
12245    false,
12246    nir_type_invalid,
12247    NULL,
12248 };
12249 
12250 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_0_0_0_1_1 = {
12251    { nir_search_value_constant, 0 },
12252    nir_type_int, { 0x10 /* 16 */ },
12253 };
12254 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_0_0_0_1 = {
12255    { nir_search_value_expression, 0 },
12256    false,
12257    nir_op_ushr,
12258    { &search262_0_0_0_0_0_0_0_0_0_0_0_0_1_0.value, &search262_0_0_0_0_0_0_0_0_0_0_0_0_1_1.value },
12259    NULL,
12260 };
12261 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_0_0_0 = {
12262    { nir_search_value_expression, 0 },
12263    false,
12264    nir_op_ior,
12265    { &search262_0_0_0_0_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_0_0_0_0_0_0_1.value },
12266    NULL,
12267 };
12268 
12269 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_0_0_1 = {
12270    { nir_search_value_constant, 0 },
12271    nir_type_int, { 0xff00ff /* 16711935 */ },
12272 };
12273 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_0_0 = {
12274    { nir_search_value_expression, 0 },
12275    false,
12276    nir_op_iand,
12277    { &search262_0_0_0_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_0_0_0_0_0_1.value },
12278    NULL,
12279 };
12280 
12281 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_0_1 = {
12282    { nir_search_value_constant, 0 },
12283    nir_type_int, { 0x8 /* 8 */ },
12284 };
12285 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_0 = {
12286    { nir_search_value_expression, 0 },
12287    false,
12288    nir_op_ishl,
12289    { &search262_0_0_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_0_0_0_0_1.value },
12290    NULL,
12291 };
12292 
12293 static const nir_search_variable search262_0_0_0_0_0_0_0_0_0_1_0_0_0_0 = {
12294    { nir_search_value_variable, 32 },
12295    0, /* x */
12296    false,
12297    nir_type_invalid,
12298    NULL,
12299 };
12300 
12301 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_1_0_0_0_1 = {
12302    { nir_search_value_constant, 0 },
12303    nir_type_int, { 0x10 /* 16 */ },
12304 };
12305 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_1_0_0_0 = {
12306    { nir_search_value_expression, 0 },
12307    false,
12308    nir_op_ishl,
12309    { &search262_0_0_0_0_0_0_0_0_0_1_0_0_0_0.value, &search262_0_0_0_0_0_0_0_0_0_1_0_0_0_1.value },
12310    NULL,
12311 };
12312 
12313 static const nir_search_variable search262_0_0_0_0_0_0_0_0_0_1_0_0_1_0 = {
12314    { nir_search_value_variable, 32 },
12315    0, /* x */
12316    false,
12317    nir_type_invalid,
12318    NULL,
12319 };
12320 
12321 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_1_0_0_1_1 = {
12322    { nir_search_value_constant, 0 },
12323    nir_type_int, { 0x10 /* 16 */ },
12324 };
12325 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_1_0_0_1 = {
12326    { nir_search_value_expression, 0 },
12327    false,
12328    nir_op_ushr,
12329    { &search262_0_0_0_0_0_0_0_0_0_1_0_0_1_0.value, &search262_0_0_0_0_0_0_0_0_0_1_0_0_1_1.value },
12330    NULL,
12331 };
12332 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_1_0_0 = {
12333    { nir_search_value_expression, 0 },
12334    false,
12335    nir_op_ior,
12336    { &search262_0_0_0_0_0_0_0_0_0_1_0_0_0.value, &search262_0_0_0_0_0_0_0_0_0_1_0_0_1.value },
12337    NULL,
12338 };
12339 
12340 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_1_0_1 = {
12341    { nir_search_value_constant, 0 },
12342    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
12343 };
12344 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_1_0 = {
12345    { nir_search_value_expression, 0 },
12346    false,
12347    nir_op_iand,
12348    { &search262_0_0_0_0_0_0_0_0_0_1_0_0.value, &search262_0_0_0_0_0_0_0_0_0_1_0_1.value },
12349    NULL,
12350 };
12351 
12352 static const nir_search_constant search262_0_0_0_0_0_0_0_0_0_1_1 = {
12353    { nir_search_value_constant, 0 },
12354    nir_type_int, { 0x8 /* 8 */ },
12355 };
12356 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0_1 = {
12357    { nir_search_value_expression, 0 },
12358    false,
12359    nir_op_ushr,
12360    { &search262_0_0_0_0_0_0_0_0_0_1_0.value, &search262_0_0_0_0_0_0_0_0_0_1_1.value },
12361    NULL,
12362 };
12363 static const nir_search_expression search262_0_0_0_0_0_0_0_0_0 = {
12364    { nir_search_value_expression, 0 },
12365    false,
12366    nir_op_ior,
12367    { &search262_0_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_0_0_0_1.value },
12368    NULL,
12369 };
12370 
12371 static const nir_search_constant search262_0_0_0_0_0_0_0_0_1 = {
12372    { nir_search_value_constant, 0 },
12373    nir_type_int, { 0xf0f0f0f /* 252645135 */ },
12374 };
12375 static const nir_search_expression search262_0_0_0_0_0_0_0_0 = {
12376    { nir_search_value_expression, 0 },
12377    false,
12378    nir_op_iand,
12379    { &search262_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_0_0_1.value },
12380    NULL,
12381 };
12382 
12383 static const nir_search_constant search262_0_0_0_0_0_0_0_1 = {
12384    { nir_search_value_constant, 0 },
12385    nir_type_int, { 0x4 /* 4 */ },
12386 };
12387 static const nir_search_expression search262_0_0_0_0_0_0_0 = {
12388    { nir_search_value_expression, 0 },
12389    false,
12390    nir_op_ishl,
12391    { &search262_0_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_0_1.value },
12392    NULL,
12393 };
12394 
12395 static const nir_search_variable search262_0_0_0_0_0_0_1_0_0_0_0_0_0_0 = {
12396    { nir_search_value_variable, 32 },
12397    0, /* x */
12398    false,
12399    nir_type_invalid,
12400    NULL,
12401 };
12402 
12403 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_0_0_0_0_1 = {
12404    { nir_search_value_constant, 0 },
12405    nir_type_int, { 0x10 /* 16 */ },
12406 };
12407 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_0_0_0_0 = {
12408    { nir_search_value_expression, 0 },
12409    false,
12410    nir_op_ishl,
12411    { &search262_0_0_0_0_0_0_1_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_1_0_0_0_0_0_0_1.value },
12412    NULL,
12413 };
12414 
12415 static const nir_search_variable search262_0_0_0_0_0_0_1_0_0_0_0_0_1_0 = {
12416    { nir_search_value_variable, 32 },
12417    0, /* x */
12418    false,
12419    nir_type_invalid,
12420    NULL,
12421 };
12422 
12423 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_0_0_0_1_1 = {
12424    { nir_search_value_constant, 0 },
12425    nir_type_int, { 0x10 /* 16 */ },
12426 };
12427 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_0_0_0_1 = {
12428    { nir_search_value_expression, 0 },
12429    false,
12430    nir_op_ushr,
12431    { &search262_0_0_0_0_0_0_1_0_0_0_0_0_1_0.value, &search262_0_0_0_0_0_0_1_0_0_0_0_0_1_1.value },
12432    NULL,
12433 };
12434 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_0_0_0 = {
12435    { nir_search_value_expression, 0 },
12436    false,
12437    nir_op_ior,
12438    { &search262_0_0_0_0_0_0_1_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_1_0_0_0_0_0_1.value },
12439    NULL,
12440 };
12441 
12442 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_0_0_1 = {
12443    { nir_search_value_constant, 0 },
12444    nir_type_int, { 0xff00ff /* 16711935 */ },
12445 };
12446 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_0_0 = {
12447    { nir_search_value_expression, 0 },
12448    false,
12449    nir_op_iand,
12450    { &search262_0_0_0_0_0_0_1_0_0_0_0_0.value, &search262_0_0_0_0_0_0_1_0_0_0_0_1.value },
12451    NULL,
12452 };
12453 
12454 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_0_1 = {
12455    { nir_search_value_constant, 0 },
12456    nir_type_int, { 0x8 /* 8 */ },
12457 };
12458 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_0 = {
12459    { nir_search_value_expression, 0 },
12460    false,
12461    nir_op_ishl,
12462    { &search262_0_0_0_0_0_0_1_0_0_0_0.value, &search262_0_0_0_0_0_0_1_0_0_0_1.value },
12463    NULL,
12464 };
12465 
12466 static const nir_search_variable search262_0_0_0_0_0_0_1_0_0_1_0_0_0_0 = {
12467    { nir_search_value_variable, 32 },
12468    0, /* x */
12469    false,
12470    nir_type_invalid,
12471    NULL,
12472 };
12473 
12474 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_1_0_0_0_1 = {
12475    { nir_search_value_constant, 0 },
12476    nir_type_int, { 0x10 /* 16 */ },
12477 };
12478 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_1_0_0_0 = {
12479    { nir_search_value_expression, 0 },
12480    false,
12481    nir_op_ishl,
12482    { &search262_0_0_0_0_0_0_1_0_0_1_0_0_0_0.value, &search262_0_0_0_0_0_0_1_0_0_1_0_0_0_1.value },
12483    NULL,
12484 };
12485 
12486 static const nir_search_variable search262_0_0_0_0_0_0_1_0_0_1_0_0_1_0 = {
12487    { nir_search_value_variable, 32 },
12488    0, /* x */
12489    false,
12490    nir_type_invalid,
12491    NULL,
12492 };
12493 
12494 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_1_0_0_1_1 = {
12495    { nir_search_value_constant, 0 },
12496    nir_type_int, { 0x10 /* 16 */ },
12497 };
12498 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_1_0_0_1 = {
12499    { nir_search_value_expression, 0 },
12500    false,
12501    nir_op_ushr,
12502    { &search262_0_0_0_0_0_0_1_0_0_1_0_0_1_0.value, &search262_0_0_0_0_0_0_1_0_0_1_0_0_1_1.value },
12503    NULL,
12504 };
12505 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_1_0_0 = {
12506    { nir_search_value_expression, 0 },
12507    false,
12508    nir_op_ior,
12509    { &search262_0_0_0_0_0_0_1_0_0_1_0_0_0.value, &search262_0_0_0_0_0_0_1_0_0_1_0_0_1.value },
12510    NULL,
12511 };
12512 
12513 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_1_0_1 = {
12514    { nir_search_value_constant, 0 },
12515    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
12516 };
12517 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_1_0 = {
12518    { nir_search_value_expression, 0 },
12519    false,
12520    nir_op_iand,
12521    { &search262_0_0_0_0_0_0_1_0_0_1_0_0.value, &search262_0_0_0_0_0_0_1_0_0_1_0_1.value },
12522    NULL,
12523 };
12524 
12525 static const nir_search_constant search262_0_0_0_0_0_0_1_0_0_1_1 = {
12526    { nir_search_value_constant, 0 },
12527    nir_type_int, { 0x8 /* 8 */ },
12528 };
12529 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0_1 = {
12530    { nir_search_value_expression, 0 },
12531    false,
12532    nir_op_ushr,
12533    { &search262_0_0_0_0_0_0_1_0_0_1_0.value, &search262_0_0_0_0_0_0_1_0_0_1_1.value },
12534    NULL,
12535 };
12536 static const nir_search_expression search262_0_0_0_0_0_0_1_0_0 = {
12537    { nir_search_value_expression, 0 },
12538    false,
12539    nir_op_ior,
12540    { &search262_0_0_0_0_0_0_1_0_0_0.value, &search262_0_0_0_0_0_0_1_0_0_1.value },
12541    NULL,
12542 };
12543 
12544 static const nir_search_constant search262_0_0_0_0_0_0_1_0_1 = {
12545    { nir_search_value_constant, 0 },
12546    nir_type_int, { 0xf0f0f0f0 /* 4042322160 */ },
12547 };
12548 static const nir_search_expression search262_0_0_0_0_0_0_1_0 = {
12549    { nir_search_value_expression, 0 },
12550    false,
12551    nir_op_iand,
12552    { &search262_0_0_0_0_0_0_1_0_0.value, &search262_0_0_0_0_0_0_1_0_1.value },
12553    NULL,
12554 };
12555 
12556 static const nir_search_constant search262_0_0_0_0_0_0_1_1 = {
12557    { nir_search_value_constant, 0 },
12558    nir_type_int, { 0x4 /* 4 */ },
12559 };
12560 static const nir_search_expression search262_0_0_0_0_0_0_1 = {
12561    { nir_search_value_expression, 0 },
12562    false,
12563    nir_op_ushr,
12564    { &search262_0_0_0_0_0_0_1_0.value, &search262_0_0_0_0_0_0_1_1.value },
12565    NULL,
12566 };
12567 static const nir_search_expression search262_0_0_0_0_0_0 = {
12568    { nir_search_value_expression, 0 },
12569    false,
12570    nir_op_ior,
12571    { &search262_0_0_0_0_0_0_0.value, &search262_0_0_0_0_0_0_1.value },
12572    NULL,
12573 };
12574 
12575 static const nir_search_constant search262_0_0_0_0_0_1 = {
12576    { nir_search_value_constant, 0 },
12577    nir_type_int, { 0x33333333 /* 858993459 */ },
12578 };
12579 static const nir_search_expression search262_0_0_0_0_0 = {
12580    { nir_search_value_expression, 0 },
12581    false,
12582    nir_op_iand,
12583    { &search262_0_0_0_0_0_0.value, &search262_0_0_0_0_0_1.value },
12584    NULL,
12585 };
12586 
12587 static const nir_search_constant search262_0_0_0_0_1 = {
12588    { nir_search_value_constant, 0 },
12589    nir_type_int, { 0x2 /* 2 */ },
12590 };
12591 static const nir_search_expression search262_0_0_0_0 = {
12592    { nir_search_value_expression, 0 },
12593    false,
12594    nir_op_ishl,
12595    { &search262_0_0_0_0_0.value, &search262_0_0_0_0_1.value },
12596    NULL,
12597 };
12598 
12599 static const nir_search_variable search262_0_0_0_1_0_0_0_0_0_0_0_0_0_0 = {
12600    { nir_search_value_variable, 32 },
12601    0, /* x */
12602    false,
12603    nir_type_invalid,
12604    NULL,
12605 };
12606 
12607 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_0_0_0_0_1 = {
12608    { nir_search_value_constant, 0 },
12609    nir_type_int, { 0x10 /* 16 */ },
12610 };
12611 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_0_0_0_0 = {
12612    { nir_search_value_expression, 0 },
12613    false,
12614    nir_op_ishl,
12615    { &search262_0_0_0_1_0_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_1_0_0_0_0_0_0_0_0_0_1.value },
12616    NULL,
12617 };
12618 
12619 static const nir_search_variable search262_0_0_0_1_0_0_0_0_0_0_0_0_1_0 = {
12620    { nir_search_value_variable, 32 },
12621    0, /* x */
12622    false,
12623    nir_type_invalid,
12624    NULL,
12625 };
12626 
12627 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_0_0_0_1_1 = {
12628    { nir_search_value_constant, 0 },
12629    nir_type_int, { 0x10 /* 16 */ },
12630 };
12631 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_0_0_0_1 = {
12632    { nir_search_value_expression, 0 },
12633    false,
12634    nir_op_ushr,
12635    { &search262_0_0_0_1_0_0_0_0_0_0_0_0_1_0.value, &search262_0_0_0_1_0_0_0_0_0_0_0_0_1_1.value },
12636    NULL,
12637 };
12638 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_0_0_0 = {
12639    { nir_search_value_expression, 0 },
12640    false,
12641    nir_op_ior,
12642    { &search262_0_0_0_1_0_0_0_0_0_0_0_0_0.value, &search262_0_0_0_1_0_0_0_0_0_0_0_0_1.value },
12643    NULL,
12644 };
12645 
12646 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_0_0_1 = {
12647    { nir_search_value_constant, 0 },
12648    nir_type_int, { 0xff00ff /* 16711935 */ },
12649 };
12650 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_0_0 = {
12651    { nir_search_value_expression, 0 },
12652    false,
12653    nir_op_iand,
12654    { &search262_0_0_0_1_0_0_0_0_0_0_0_0.value, &search262_0_0_0_1_0_0_0_0_0_0_0_1.value },
12655    NULL,
12656 };
12657 
12658 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_0_1 = {
12659    { nir_search_value_constant, 0 },
12660    nir_type_int, { 0x8 /* 8 */ },
12661 };
12662 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_0 = {
12663    { nir_search_value_expression, 0 },
12664    false,
12665    nir_op_ishl,
12666    { &search262_0_0_0_1_0_0_0_0_0_0_0.value, &search262_0_0_0_1_0_0_0_0_0_0_1.value },
12667    NULL,
12668 };
12669 
12670 static const nir_search_variable search262_0_0_0_1_0_0_0_0_0_1_0_0_0_0 = {
12671    { nir_search_value_variable, 32 },
12672    0, /* x */
12673    false,
12674    nir_type_invalid,
12675    NULL,
12676 };
12677 
12678 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_1_0_0_0_1 = {
12679    { nir_search_value_constant, 0 },
12680    nir_type_int, { 0x10 /* 16 */ },
12681 };
12682 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_1_0_0_0 = {
12683    { nir_search_value_expression, 0 },
12684    false,
12685    nir_op_ishl,
12686    { &search262_0_0_0_1_0_0_0_0_0_1_0_0_0_0.value, &search262_0_0_0_1_0_0_0_0_0_1_0_0_0_1.value },
12687    NULL,
12688 };
12689 
12690 static const nir_search_variable search262_0_0_0_1_0_0_0_0_0_1_0_0_1_0 = {
12691    { nir_search_value_variable, 32 },
12692    0, /* x */
12693    false,
12694    nir_type_invalid,
12695    NULL,
12696 };
12697 
12698 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_1_0_0_1_1 = {
12699    { nir_search_value_constant, 0 },
12700    nir_type_int, { 0x10 /* 16 */ },
12701 };
12702 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_1_0_0_1 = {
12703    { nir_search_value_expression, 0 },
12704    false,
12705    nir_op_ushr,
12706    { &search262_0_0_0_1_0_0_0_0_0_1_0_0_1_0.value, &search262_0_0_0_1_0_0_0_0_0_1_0_0_1_1.value },
12707    NULL,
12708 };
12709 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_1_0_0 = {
12710    { nir_search_value_expression, 0 },
12711    false,
12712    nir_op_ior,
12713    { &search262_0_0_0_1_0_0_0_0_0_1_0_0_0.value, &search262_0_0_0_1_0_0_0_0_0_1_0_0_1.value },
12714    NULL,
12715 };
12716 
12717 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_1_0_1 = {
12718    { nir_search_value_constant, 0 },
12719    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
12720 };
12721 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_1_0 = {
12722    { nir_search_value_expression, 0 },
12723    false,
12724    nir_op_iand,
12725    { &search262_0_0_0_1_0_0_0_0_0_1_0_0.value, &search262_0_0_0_1_0_0_0_0_0_1_0_1.value },
12726    NULL,
12727 };
12728 
12729 static const nir_search_constant search262_0_0_0_1_0_0_0_0_0_1_1 = {
12730    { nir_search_value_constant, 0 },
12731    nir_type_int, { 0x8 /* 8 */ },
12732 };
12733 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0_1 = {
12734    { nir_search_value_expression, 0 },
12735    false,
12736    nir_op_ushr,
12737    { &search262_0_0_0_1_0_0_0_0_0_1_0.value, &search262_0_0_0_1_0_0_0_0_0_1_1.value },
12738    NULL,
12739 };
12740 static const nir_search_expression search262_0_0_0_1_0_0_0_0_0 = {
12741    { nir_search_value_expression, 0 },
12742    false,
12743    nir_op_ior,
12744    { &search262_0_0_0_1_0_0_0_0_0_0.value, &search262_0_0_0_1_0_0_0_0_0_1.value },
12745    NULL,
12746 };
12747 
12748 static const nir_search_constant search262_0_0_0_1_0_0_0_0_1 = {
12749    { nir_search_value_constant, 0 },
12750    nir_type_int, { 0xf0f0f0f /* 252645135 */ },
12751 };
12752 static const nir_search_expression search262_0_0_0_1_0_0_0_0 = {
12753    { nir_search_value_expression, 0 },
12754    false,
12755    nir_op_iand,
12756    { &search262_0_0_0_1_0_0_0_0_0.value, &search262_0_0_0_1_0_0_0_0_1.value },
12757    NULL,
12758 };
12759 
12760 static const nir_search_constant search262_0_0_0_1_0_0_0_1 = {
12761    { nir_search_value_constant, 0 },
12762    nir_type_int, { 0x4 /* 4 */ },
12763 };
12764 static const nir_search_expression search262_0_0_0_1_0_0_0 = {
12765    { nir_search_value_expression, 0 },
12766    false,
12767    nir_op_ishl,
12768    { &search262_0_0_0_1_0_0_0_0.value, &search262_0_0_0_1_0_0_0_1.value },
12769    NULL,
12770 };
12771 
12772 static const nir_search_variable search262_0_0_0_1_0_0_1_0_0_0_0_0_0_0 = {
12773    { nir_search_value_variable, 32 },
12774    0, /* x */
12775    false,
12776    nir_type_invalid,
12777    NULL,
12778 };
12779 
12780 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_0_0_0_0_1 = {
12781    { nir_search_value_constant, 0 },
12782    nir_type_int, { 0x10 /* 16 */ },
12783 };
12784 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_0_0_0_0 = {
12785    { nir_search_value_expression, 0 },
12786    false,
12787    nir_op_ishl,
12788    { &search262_0_0_0_1_0_0_1_0_0_0_0_0_0_0.value, &search262_0_0_0_1_0_0_1_0_0_0_0_0_0_1.value },
12789    NULL,
12790 };
12791 
12792 static const nir_search_variable search262_0_0_0_1_0_0_1_0_0_0_0_0_1_0 = {
12793    { nir_search_value_variable, 32 },
12794    0, /* x */
12795    false,
12796    nir_type_invalid,
12797    NULL,
12798 };
12799 
12800 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_0_0_0_1_1 = {
12801    { nir_search_value_constant, 0 },
12802    nir_type_int, { 0x10 /* 16 */ },
12803 };
12804 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_0_0_0_1 = {
12805    { nir_search_value_expression, 0 },
12806    false,
12807    nir_op_ushr,
12808    { &search262_0_0_0_1_0_0_1_0_0_0_0_0_1_0.value, &search262_0_0_0_1_0_0_1_0_0_0_0_0_1_1.value },
12809    NULL,
12810 };
12811 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_0_0_0 = {
12812    { nir_search_value_expression, 0 },
12813    false,
12814    nir_op_ior,
12815    { &search262_0_0_0_1_0_0_1_0_0_0_0_0_0.value, &search262_0_0_0_1_0_0_1_0_0_0_0_0_1.value },
12816    NULL,
12817 };
12818 
12819 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_0_0_1 = {
12820    { nir_search_value_constant, 0 },
12821    nir_type_int, { 0xff00ff /* 16711935 */ },
12822 };
12823 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_0_0 = {
12824    { nir_search_value_expression, 0 },
12825    false,
12826    nir_op_iand,
12827    { &search262_0_0_0_1_0_0_1_0_0_0_0_0.value, &search262_0_0_0_1_0_0_1_0_0_0_0_1.value },
12828    NULL,
12829 };
12830 
12831 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_0_1 = {
12832    { nir_search_value_constant, 0 },
12833    nir_type_int, { 0x8 /* 8 */ },
12834 };
12835 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_0 = {
12836    { nir_search_value_expression, 0 },
12837    false,
12838    nir_op_ishl,
12839    { &search262_0_0_0_1_0_0_1_0_0_0_0.value, &search262_0_0_0_1_0_0_1_0_0_0_1.value },
12840    NULL,
12841 };
12842 
12843 static const nir_search_variable search262_0_0_0_1_0_0_1_0_0_1_0_0_0_0 = {
12844    { nir_search_value_variable, 32 },
12845    0, /* x */
12846    false,
12847    nir_type_invalid,
12848    NULL,
12849 };
12850 
12851 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_1_0_0_0_1 = {
12852    { nir_search_value_constant, 0 },
12853    nir_type_int, { 0x10 /* 16 */ },
12854 };
12855 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_1_0_0_0 = {
12856    { nir_search_value_expression, 0 },
12857    false,
12858    nir_op_ishl,
12859    { &search262_0_0_0_1_0_0_1_0_0_1_0_0_0_0.value, &search262_0_0_0_1_0_0_1_0_0_1_0_0_0_1.value },
12860    NULL,
12861 };
12862 
12863 static const nir_search_variable search262_0_0_0_1_0_0_1_0_0_1_0_0_1_0 = {
12864    { nir_search_value_variable, 32 },
12865    0, /* x */
12866    false,
12867    nir_type_invalid,
12868    NULL,
12869 };
12870 
12871 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_1_0_0_1_1 = {
12872    { nir_search_value_constant, 0 },
12873    nir_type_int, { 0x10 /* 16 */ },
12874 };
12875 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_1_0_0_1 = {
12876    { nir_search_value_expression, 0 },
12877    false,
12878    nir_op_ushr,
12879    { &search262_0_0_0_1_0_0_1_0_0_1_0_0_1_0.value, &search262_0_0_0_1_0_0_1_0_0_1_0_0_1_1.value },
12880    NULL,
12881 };
12882 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_1_0_0 = {
12883    { nir_search_value_expression, 0 },
12884    false,
12885    nir_op_ior,
12886    { &search262_0_0_0_1_0_0_1_0_0_1_0_0_0.value, &search262_0_0_0_1_0_0_1_0_0_1_0_0_1.value },
12887    NULL,
12888 };
12889 
12890 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_1_0_1 = {
12891    { nir_search_value_constant, 0 },
12892    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
12893 };
12894 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_1_0 = {
12895    { nir_search_value_expression, 0 },
12896    false,
12897    nir_op_iand,
12898    { &search262_0_0_0_1_0_0_1_0_0_1_0_0.value, &search262_0_0_0_1_0_0_1_0_0_1_0_1.value },
12899    NULL,
12900 };
12901 
12902 static const nir_search_constant search262_0_0_0_1_0_0_1_0_0_1_1 = {
12903    { nir_search_value_constant, 0 },
12904    nir_type_int, { 0x8 /* 8 */ },
12905 };
12906 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0_1 = {
12907    { nir_search_value_expression, 0 },
12908    false,
12909    nir_op_ushr,
12910    { &search262_0_0_0_1_0_0_1_0_0_1_0.value, &search262_0_0_0_1_0_0_1_0_0_1_1.value },
12911    NULL,
12912 };
12913 static const nir_search_expression search262_0_0_0_1_0_0_1_0_0 = {
12914    { nir_search_value_expression, 0 },
12915    false,
12916    nir_op_ior,
12917    { &search262_0_0_0_1_0_0_1_0_0_0.value, &search262_0_0_0_1_0_0_1_0_0_1.value },
12918    NULL,
12919 };
12920 
12921 static const nir_search_constant search262_0_0_0_1_0_0_1_0_1 = {
12922    { nir_search_value_constant, 0 },
12923    nir_type_int, { 0xf0f0f0f0 /* 4042322160 */ },
12924 };
12925 static const nir_search_expression search262_0_0_0_1_0_0_1_0 = {
12926    { nir_search_value_expression, 0 },
12927    false,
12928    nir_op_iand,
12929    { &search262_0_0_0_1_0_0_1_0_0.value, &search262_0_0_0_1_0_0_1_0_1.value },
12930    NULL,
12931 };
12932 
12933 static const nir_search_constant search262_0_0_0_1_0_0_1_1 = {
12934    { nir_search_value_constant, 0 },
12935    nir_type_int, { 0x4 /* 4 */ },
12936 };
12937 static const nir_search_expression search262_0_0_0_1_0_0_1 = {
12938    { nir_search_value_expression, 0 },
12939    false,
12940    nir_op_ushr,
12941    { &search262_0_0_0_1_0_0_1_0.value, &search262_0_0_0_1_0_0_1_1.value },
12942    NULL,
12943 };
12944 static const nir_search_expression search262_0_0_0_1_0_0 = {
12945    { nir_search_value_expression, 0 },
12946    false,
12947    nir_op_ior,
12948    { &search262_0_0_0_1_0_0_0.value, &search262_0_0_0_1_0_0_1.value },
12949    NULL,
12950 };
12951 
12952 static const nir_search_constant search262_0_0_0_1_0_1 = {
12953    { nir_search_value_constant, 0 },
12954    nir_type_int, { 0xcccccccc /* 3435973836 */ },
12955 };
12956 static const nir_search_expression search262_0_0_0_1_0 = {
12957    { nir_search_value_expression, 0 },
12958    false,
12959    nir_op_iand,
12960    { &search262_0_0_0_1_0_0.value, &search262_0_0_0_1_0_1.value },
12961    NULL,
12962 };
12963 
12964 static const nir_search_constant search262_0_0_0_1_1 = {
12965    { nir_search_value_constant, 0 },
12966    nir_type_int, { 0x2 /* 2 */ },
12967 };
12968 static const nir_search_expression search262_0_0_0_1 = {
12969    { nir_search_value_expression, 0 },
12970    false,
12971    nir_op_ushr,
12972    { &search262_0_0_0_1_0.value, &search262_0_0_0_1_1.value },
12973    NULL,
12974 };
12975 static const nir_search_expression search262_0_0_0 = {
12976    { nir_search_value_expression, 0 },
12977    false,
12978    nir_op_ior,
12979    { &search262_0_0_0_0.value, &search262_0_0_0_1.value },
12980    NULL,
12981 };
12982 
12983 static const nir_search_constant search262_0_0_1 = {
12984    { nir_search_value_constant, 0 },
12985    nir_type_int, { 0x55555555 /* 1431655765 */ },
12986 };
12987 static const nir_search_expression search262_0_0 = {
12988    { nir_search_value_expression, 0 },
12989    false,
12990    nir_op_iand,
12991    { &search262_0_0_0.value, &search262_0_0_1.value },
12992    NULL,
12993 };
12994 
12995 static const nir_search_constant search262_0_1 = {
12996    { nir_search_value_constant, 0 },
12997    nir_type_int, { 0x1 /* 1 */ },
12998 };
12999 static const nir_search_expression search262_0 = {
13000    { nir_search_value_expression, 0 },
13001    false,
13002    nir_op_ishl,
13003    { &search262_0_0.value, &search262_0_1.value },
13004    NULL,
13005 };
13006 
13007 static const nir_search_variable search262_1_0_0_0_0_0_0_0_0_0_0_0_0_0 = {
13008    { nir_search_value_variable, 32 },
13009    0, /* x */
13010    false,
13011    nir_type_invalid,
13012    NULL,
13013 };
13014 
13015 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_0_0_0_0_1 = {
13016    { nir_search_value_constant, 0 },
13017    nir_type_int, { 0x10 /* 16 */ },
13018 };
13019 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_0_0_0_0 = {
13020    { nir_search_value_expression, 0 },
13021    false,
13022    nir_op_ishl,
13023    { &search262_1_0_0_0_0_0_0_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_0_0_0_0_0_0_0_1.value },
13024    NULL,
13025 };
13026 
13027 static const nir_search_variable search262_1_0_0_0_0_0_0_0_0_0_0_0_1_0 = {
13028    { nir_search_value_variable, 32 },
13029    0, /* x */
13030    false,
13031    nir_type_invalid,
13032    NULL,
13033 };
13034 
13035 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_0_0_0_1_1 = {
13036    { nir_search_value_constant, 0 },
13037    nir_type_int, { 0x10 /* 16 */ },
13038 };
13039 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_0_0_0_1 = {
13040    { nir_search_value_expression, 0 },
13041    false,
13042    nir_op_ushr,
13043    { &search262_1_0_0_0_0_0_0_0_0_0_0_0_1_0.value, &search262_1_0_0_0_0_0_0_0_0_0_0_0_1_1.value },
13044    NULL,
13045 };
13046 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_0_0_0 = {
13047    { nir_search_value_expression, 0 },
13048    false,
13049    nir_op_ior,
13050    { &search262_1_0_0_0_0_0_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_0_0_0_0_0_0_1.value },
13051    NULL,
13052 };
13053 
13054 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_0_0_1 = {
13055    { nir_search_value_constant, 0 },
13056    nir_type_int, { 0xff00ff /* 16711935 */ },
13057 };
13058 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_0_0 = {
13059    { nir_search_value_expression, 0 },
13060    false,
13061    nir_op_iand,
13062    { &search262_1_0_0_0_0_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_0_0_0_0_0_1.value },
13063    NULL,
13064 };
13065 
13066 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_0_1 = {
13067    { nir_search_value_constant, 0 },
13068    nir_type_int, { 0x8 /* 8 */ },
13069 };
13070 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_0 = {
13071    { nir_search_value_expression, 0 },
13072    false,
13073    nir_op_ishl,
13074    { &search262_1_0_0_0_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_0_0_0_0_1.value },
13075    NULL,
13076 };
13077 
13078 static const nir_search_variable search262_1_0_0_0_0_0_0_0_0_1_0_0_0_0 = {
13079    { nir_search_value_variable, 32 },
13080    0, /* x */
13081    false,
13082    nir_type_invalid,
13083    NULL,
13084 };
13085 
13086 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_1_0_0_0_1 = {
13087    { nir_search_value_constant, 0 },
13088    nir_type_int, { 0x10 /* 16 */ },
13089 };
13090 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_1_0_0_0 = {
13091    { nir_search_value_expression, 0 },
13092    false,
13093    nir_op_ishl,
13094    { &search262_1_0_0_0_0_0_0_0_0_1_0_0_0_0.value, &search262_1_0_0_0_0_0_0_0_0_1_0_0_0_1.value },
13095    NULL,
13096 };
13097 
13098 static const nir_search_variable search262_1_0_0_0_0_0_0_0_0_1_0_0_1_0 = {
13099    { nir_search_value_variable, 32 },
13100    0, /* x */
13101    false,
13102    nir_type_invalid,
13103    NULL,
13104 };
13105 
13106 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_1_0_0_1_1 = {
13107    { nir_search_value_constant, 0 },
13108    nir_type_int, { 0x10 /* 16 */ },
13109 };
13110 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_1_0_0_1 = {
13111    { nir_search_value_expression, 0 },
13112    false,
13113    nir_op_ushr,
13114    { &search262_1_0_0_0_0_0_0_0_0_1_0_0_1_0.value, &search262_1_0_0_0_0_0_0_0_0_1_0_0_1_1.value },
13115    NULL,
13116 };
13117 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_1_0_0 = {
13118    { nir_search_value_expression, 0 },
13119    false,
13120    nir_op_ior,
13121    { &search262_1_0_0_0_0_0_0_0_0_1_0_0_0.value, &search262_1_0_0_0_0_0_0_0_0_1_0_0_1.value },
13122    NULL,
13123 };
13124 
13125 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_1_0_1 = {
13126    { nir_search_value_constant, 0 },
13127    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
13128 };
13129 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_1_0 = {
13130    { nir_search_value_expression, 0 },
13131    false,
13132    nir_op_iand,
13133    { &search262_1_0_0_0_0_0_0_0_0_1_0_0.value, &search262_1_0_0_0_0_0_0_0_0_1_0_1.value },
13134    NULL,
13135 };
13136 
13137 static const nir_search_constant search262_1_0_0_0_0_0_0_0_0_1_1 = {
13138    { nir_search_value_constant, 0 },
13139    nir_type_int, { 0x8 /* 8 */ },
13140 };
13141 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0_1 = {
13142    { nir_search_value_expression, 0 },
13143    false,
13144    nir_op_ushr,
13145    { &search262_1_0_0_0_0_0_0_0_0_1_0.value, &search262_1_0_0_0_0_0_0_0_0_1_1.value },
13146    NULL,
13147 };
13148 static const nir_search_expression search262_1_0_0_0_0_0_0_0_0 = {
13149    { nir_search_value_expression, 0 },
13150    false,
13151    nir_op_ior,
13152    { &search262_1_0_0_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_0_0_0_1.value },
13153    NULL,
13154 };
13155 
13156 static const nir_search_constant search262_1_0_0_0_0_0_0_0_1 = {
13157    { nir_search_value_constant, 0 },
13158    nir_type_int, { 0xf0f0f0f /* 252645135 */ },
13159 };
13160 static const nir_search_expression search262_1_0_0_0_0_0_0_0 = {
13161    { nir_search_value_expression, 0 },
13162    false,
13163    nir_op_iand,
13164    { &search262_1_0_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_0_0_1.value },
13165    NULL,
13166 };
13167 
13168 static const nir_search_constant search262_1_0_0_0_0_0_0_1 = {
13169    { nir_search_value_constant, 0 },
13170    nir_type_int, { 0x4 /* 4 */ },
13171 };
13172 static const nir_search_expression search262_1_0_0_0_0_0_0 = {
13173    { nir_search_value_expression, 0 },
13174    false,
13175    nir_op_ishl,
13176    { &search262_1_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_0_1.value },
13177    NULL,
13178 };
13179 
13180 static const nir_search_variable search262_1_0_0_0_0_0_1_0_0_0_0_0_0_0 = {
13181    { nir_search_value_variable, 32 },
13182    0, /* x */
13183    false,
13184    nir_type_invalid,
13185    NULL,
13186 };
13187 
13188 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_0_0_0_0_1 = {
13189    { nir_search_value_constant, 0 },
13190    nir_type_int, { 0x10 /* 16 */ },
13191 };
13192 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_0_0_0_0 = {
13193    { nir_search_value_expression, 0 },
13194    false,
13195    nir_op_ishl,
13196    { &search262_1_0_0_0_0_0_1_0_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_1_0_0_0_0_0_0_1.value },
13197    NULL,
13198 };
13199 
13200 static const nir_search_variable search262_1_0_0_0_0_0_1_0_0_0_0_0_1_0 = {
13201    { nir_search_value_variable, 32 },
13202    0, /* x */
13203    false,
13204    nir_type_invalid,
13205    NULL,
13206 };
13207 
13208 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_0_0_0_1_1 = {
13209    { nir_search_value_constant, 0 },
13210    nir_type_int, { 0x10 /* 16 */ },
13211 };
13212 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_0_0_0_1 = {
13213    { nir_search_value_expression, 0 },
13214    false,
13215    nir_op_ushr,
13216    { &search262_1_0_0_0_0_0_1_0_0_0_0_0_1_0.value, &search262_1_0_0_0_0_0_1_0_0_0_0_0_1_1.value },
13217    NULL,
13218 };
13219 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_0_0_0 = {
13220    { nir_search_value_expression, 0 },
13221    false,
13222    nir_op_ior,
13223    { &search262_1_0_0_0_0_0_1_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_1_0_0_0_0_0_1.value },
13224    NULL,
13225 };
13226 
13227 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_0_0_1 = {
13228    { nir_search_value_constant, 0 },
13229    nir_type_int, { 0xff00ff /* 16711935 */ },
13230 };
13231 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_0_0 = {
13232    { nir_search_value_expression, 0 },
13233    false,
13234    nir_op_iand,
13235    { &search262_1_0_0_0_0_0_1_0_0_0_0_0.value, &search262_1_0_0_0_0_0_1_0_0_0_0_1.value },
13236    NULL,
13237 };
13238 
13239 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_0_1 = {
13240    { nir_search_value_constant, 0 },
13241    nir_type_int, { 0x8 /* 8 */ },
13242 };
13243 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_0 = {
13244    { nir_search_value_expression, 0 },
13245    false,
13246    nir_op_ishl,
13247    { &search262_1_0_0_0_0_0_1_0_0_0_0.value, &search262_1_0_0_0_0_0_1_0_0_0_1.value },
13248    NULL,
13249 };
13250 
13251 static const nir_search_variable search262_1_0_0_0_0_0_1_0_0_1_0_0_0_0 = {
13252    { nir_search_value_variable, 32 },
13253    0, /* x */
13254    false,
13255    nir_type_invalid,
13256    NULL,
13257 };
13258 
13259 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_1_0_0_0_1 = {
13260    { nir_search_value_constant, 0 },
13261    nir_type_int, { 0x10 /* 16 */ },
13262 };
13263 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_1_0_0_0 = {
13264    { nir_search_value_expression, 0 },
13265    false,
13266    nir_op_ishl,
13267    { &search262_1_0_0_0_0_0_1_0_0_1_0_0_0_0.value, &search262_1_0_0_0_0_0_1_0_0_1_0_0_0_1.value },
13268    NULL,
13269 };
13270 
13271 static const nir_search_variable search262_1_0_0_0_0_0_1_0_0_1_0_0_1_0 = {
13272    { nir_search_value_variable, 32 },
13273    0, /* x */
13274    false,
13275    nir_type_invalid,
13276    NULL,
13277 };
13278 
13279 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_1_0_0_1_1 = {
13280    { nir_search_value_constant, 0 },
13281    nir_type_int, { 0x10 /* 16 */ },
13282 };
13283 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_1_0_0_1 = {
13284    { nir_search_value_expression, 0 },
13285    false,
13286    nir_op_ushr,
13287    { &search262_1_0_0_0_0_0_1_0_0_1_0_0_1_0.value, &search262_1_0_0_0_0_0_1_0_0_1_0_0_1_1.value },
13288    NULL,
13289 };
13290 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_1_0_0 = {
13291    { nir_search_value_expression, 0 },
13292    false,
13293    nir_op_ior,
13294    { &search262_1_0_0_0_0_0_1_0_0_1_0_0_0.value, &search262_1_0_0_0_0_0_1_0_0_1_0_0_1.value },
13295    NULL,
13296 };
13297 
13298 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_1_0_1 = {
13299    { nir_search_value_constant, 0 },
13300    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
13301 };
13302 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_1_0 = {
13303    { nir_search_value_expression, 0 },
13304    false,
13305    nir_op_iand,
13306    { &search262_1_0_0_0_0_0_1_0_0_1_0_0.value, &search262_1_0_0_0_0_0_1_0_0_1_0_1.value },
13307    NULL,
13308 };
13309 
13310 static const nir_search_constant search262_1_0_0_0_0_0_1_0_0_1_1 = {
13311    { nir_search_value_constant, 0 },
13312    nir_type_int, { 0x8 /* 8 */ },
13313 };
13314 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0_1 = {
13315    { nir_search_value_expression, 0 },
13316    false,
13317    nir_op_ushr,
13318    { &search262_1_0_0_0_0_0_1_0_0_1_0.value, &search262_1_0_0_0_0_0_1_0_0_1_1.value },
13319    NULL,
13320 };
13321 static const nir_search_expression search262_1_0_0_0_0_0_1_0_0 = {
13322    { nir_search_value_expression, 0 },
13323    false,
13324    nir_op_ior,
13325    { &search262_1_0_0_0_0_0_1_0_0_0.value, &search262_1_0_0_0_0_0_1_0_0_1.value },
13326    NULL,
13327 };
13328 
13329 static const nir_search_constant search262_1_0_0_0_0_0_1_0_1 = {
13330    { nir_search_value_constant, 0 },
13331    nir_type_int, { 0xf0f0f0f0 /* 4042322160 */ },
13332 };
13333 static const nir_search_expression search262_1_0_0_0_0_0_1_0 = {
13334    { nir_search_value_expression, 0 },
13335    false,
13336    nir_op_iand,
13337    { &search262_1_0_0_0_0_0_1_0_0.value, &search262_1_0_0_0_0_0_1_0_1.value },
13338    NULL,
13339 };
13340 
13341 static const nir_search_constant search262_1_0_0_0_0_0_1_1 = {
13342    { nir_search_value_constant, 0 },
13343    nir_type_int, { 0x4 /* 4 */ },
13344 };
13345 static const nir_search_expression search262_1_0_0_0_0_0_1 = {
13346    { nir_search_value_expression, 0 },
13347    false,
13348    nir_op_ushr,
13349    { &search262_1_0_0_0_0_0_1_0.value, &search262_1_0_0_0_0_0_1_1.value },
13350    NULL,
13351 };
13352 static const nir_search_expression search262_1_0_0_0_0_0 = {
13353    { nir_search_value_expression, 0 },
13354    false,
13355    nir_op_ior,
13356    { &search262_1_0_0_0_0_0_0.value, &search262_1_0_0_0_0_0_1.value },
13357    NULL,
13358 };
13359 
13360 static const nir_search_constant search262_1_0_0_0_0_1 = {
13361    { nir_search_value_constant, 0 },
13362    nir_type_int, { 0x33333333 /* 858993459 */ },
13363 };
13364 static const nir_search_expression search262_1_0_0_0_0 = {
13365    { nir_search_value_expression, 0 },
13366    false,
13367    nir_op_iand,
13368    { &search262_1_0_0_0_0_0.value, &search262_1_0_0_0_0_1.value },
13369    NULL,
13370 };
13371 
13372 static const nir_search_constant search262_1_0_0_0_1 = {
13373    { nir_search_value_constant, 0 },
13374    nir_type_int, { 0x2 /* 2 */ },
13375 };
13376 static const nir_search_expression search262_1_0_0_0 = {
13377    { nir_search_value_expression, 0 },
13378    false,
13379    nir_op_ishl,
13380    { &search262_1_0_0_0_0.value, &search262_1_0_0_0_1.value },
13381    NULL,
13382 };
13383 
13384 static const nir_search_variable search262_1_0_0_1_0_0_0_0_0_0_0_0_0_0 = {
13385    { nir_search_value_variable, 32 },
13386    0, /* x */
13387    false,
13388    nir_type_invalid,
13389    NULL,
13390 };
13391 
13392 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_0_0_0_0_1 = {
13393    { nir_search_value_constant, 0 },
13394    nir_type_int, { 0x10 /* 16 */ },
13395 };
13396 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_0_0_0_0 = {
13397    { nir_search_value_expression, 0 },
13398    false,
13399    nir_op_ishl,
13400    { &search262_1_0_0_1_0_0_0_0_0_0_0_0_0_0.value, &search262_1_0_0_1_0_0_0_0_0_0_0_0_0_1.value },
13401    NULL,
13402 };
13403 
13404 static const nir_search_variable search262_1_0_0_1_0_0_0_0_0_0_0_0_1_0 = {
13405    { nir_search_value_variable, 32 },
13406    0, /* x */
13407    false,
13408    nir_type_invalid,
13409    NULL,
13410 };
13411 
13412 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_0_0_0_1_1 = {
13413    { nir_search_value_constant, 0 },
13414    nir_type_int, { 0x10 /* 16 */ },
13415 };
13416 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_0_0_0_1 = {
13417    { nir_search_value_expression, 0 },
13418    false,
13419    nir_op_ushr,
13420    { &search262_1_0_0_1_0_0_0_0_0_0_0_0_1_0.value, &search262_1_0_0_1_0_0_0_0_0_0_0_0_1_1.value },
13421    NULL,
13422 };
13423 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_0_0_0 = {
13424    { nir_search_value_expression, 0 },
13425    false,
13426    nir_op_ior,
13427    { &search262_1_0_0_1_0_0_0_0_0_0_0_0_0.value, &search262_1_0_0_1_0_0_0_0_0_0_0_0_1.value },
13428    NULL,
13429 };
13430 
13431 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_0_0_1 = {
13432    { nir_search_value_constant, 0 },
13433    nir_type_int, { 0xff00ff /* 16711935 */ },
13434 };
13435 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_0_0 = {
13436    { nir_search_value_expression, 0 },
13437    false,
13438    nir_op_iand,
13439    { &search262_1_0_0_1_0_0_0_0_0_0_0_0.value, &search262_1_0_0_1_0_0_0_0_0_0_0_1.value },
13440    NULL,
13441 };
13442 
13443 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_0_1 = {
13444    { nir_search_value_constant, 0 },
13445    nir_type_int, { 0x8 /* 8 */ },
13446 };
13447 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_0 = {
13448    { nir_search_value_expression, 0 },
13449    false,
13450    nir_op_ishl,
13451    { &search262_1_0_0_1_0_0_0_0_0_0_0.value, &search262_1_0_0_1_0_0_0_0_0_0_1.value },
13452    NULL,
13453 };
13454 
13455 static const nir_search_variable search262_1_0_0_1_0_0_0_0_0_1_0_0_0_0 = {
13456    { nir_search_value_variable, 32 },
13457    0, /* x */
13458    false,
13459    nir_type_invalid,
13460    NULL,
13461 };
13462 
13463 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_1_0_0_0_1 = {
13464    { nir_search_value_constant, 0 },
13465    nir_type_int, { 0x10 /* 16 */ },
13466 };
13467 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_1_0_0_0 = {
13468    { nir_search_value_expression, 0 },
13469    false,
13470    nir_op_ishl,
13471    { &search262_1_0_0_1_0_0_0_0_0_1_0_0_0_0.value, &search262_1_0_0_1_0_0_0_0_0_1_0_0_0_1.value },
13472    NULL,
13473 };
13474 
13475 static const nir_search_variable search262_1_0_0_1_0_0_0_0_0_1_0_0_1_0 = {
13476    { nir_search_value_variable, 32 },
13477    0, /* x */
13478    false,
13479    nir_type_invalid,
13480    NULL,
13481 };
13482 
13483 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_1_0_0_1_1 = {
13484    { nir_search_value_constant, 0 },
13485    nir_type_int, { 0x10 /* 16 */ },
13486 };
13487 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_1_0_0_1 = {
13488    { nir_search_value_expression, 0 },
13489    false,
13490    nir_op_ushr,
13491    { &search262_1_0_0_1_0_0_0_0_0_1_0_0_1_0.value, &search262_1_0_0_1_0_0_0_0_0_1_0_0_1_1.value },
13492    NULL,
13493 };
13494 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_1_0_0 = {
13495    { nir_search_value_expression, 0 },
13496    false,
13497    nir_op_ior,
13498    { &search262_1_0_0_1_0_0_0_0_0_1_0_0_0.value, &search262_1_0_0_1_0_0_0_0_0_1_0_0_1.value },
13499    NULL,
13500 };
13501 
13502 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_1_0_1 = {
13503    { nir_search_value_constant, 0 },
13504    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
13505 };
13506 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_1_0 = {
13507    { nir_search_value_expression, 0 },
13508    false,
13509    nir_op_iand,
13510    { &search262_1_0_0_1_0_0_0_0_0_1_0_0.value, &search262_1_0_0_1_0_0_0_0_0_1_0_1.value },
13511    NULL,
13512 };
13513 
13514 static const nir_search_constant search262_1_0_0_1_0_0_0_0_0_1_1 = {
13515    { nir_search_value_constant, 0 },
13516    nir_type_int, { 0x8 /* 8 */ },
13517 };
13518 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0_1 = {
13519    { nir_search_value_expression, 0 },
13520    false,
13521    nir_op_ushr,
13522    { &search262_1_0_0_1_0_0_0_0_0_1_0.value, &search262_1_0_0_1_0_0_0_0_0_1_1.value },
13523    NULL,
13524 };
13525 static const nir_search_expression search262_1_0_0_1_0_0_0_0_0 = {
13526    { nir_search_value_expression, 0 },
13527    false,
13528    nir_op_ior,
13529    { &search262_1_0_0_1_0_0_0_0_0_0.value, &search262_1_0_0_1_0_0_0_0_0_1.value },
13530    NULL,
13531 };
13532 
13533 static const nir_search_constant search262_1_0_0_1_0_0_0_0_1 = {
13534    { nir_search_value_constant, 0 },
13535    nir_type_int, { 0xf0f0f0f /* 252645135 */ },
13536 };
13537 static const nir_search_expression search262_1_0_0_1_0_0_0_0 = {
13538    { nir_search_value_expression, 0 },
13539    false,
13540    nir_op_iand,
13541    { &search262_1_0_0_1_0_0_0_0_0.value, &search262_1_0_0_1_0_0_0_0_1.value },
13542    NULL,
13543 };
13544 
13545 static const nir_search_constant search262_1_0_0_1_0_0_0_1 = {
13546    { nir_search_value_constant, 0 },
13547    nir_type_int, { 0x4 /* 4 */ },
13548 };
13549 static const nir_search_expression search262_1_0_0_1_0_0_0 = {
13550    { nir_search_value_expression, 0 },
13551    false,
13552    nir_op_ishl,
13553    { &search262_1_0_0_1_0_0_0_0.value, &search262_1_0_0_1_0_0_0_1.value },
13554    NULL,
13555 };
13556 
13557 static const nir_search_variable search262_1_0_0_1_0_0_1_0_0_0_0_0_0_0 = {
13558    { nir_search_value_variable, 32 },
13559    0, /* x */
13560    false,
13561    nir_type_invalid,
13562    NULL,
13563 };
13564 
13565 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_0_0_0_0_1 = {
13566    { nir_search_value_constant, 0 },
13567    nir_type_int, { 0x10 /* 16 */ },
13568 };
13569 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_0_0_0_0 = {
13570    { nir_search_value_expression, 0 },
13571    false,
13572    nir_op_ishl,
13573    { &search262_1_0_0_1_0_0_1_0_0_0_0_0_0_0.value, &search262_1_0_0_1_0_0_1_0_0_0_0_0_0_1.value },
13574    NULL,
13575 };
13576 
13577 static const nir_search_variable search262_1_0_0_1_0_0_1_0_0_0_0_0_1_0 = {
13578    { nir_search_value_variable, 32 },
13579    0, /* x */
13580    false,
13581    nir_type_invalid,
13582    NULL,
13583 };
13584 
13585 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_0_0_0_1_1 = {
13586    { nir_search_value_constant, 0 },
13587    nir_type_int, { 0x10 /* 16 */ },
13588 };
13589 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_0_0_0_1 = {
13590    { nir_search_value_expression, 0 },
13591    false,
13592    nir_op_ushr,
13593    { &search262_1_0_0_1_0_0_1_0_0_0_0_0_1_0.value, &search262_1_0_0_1_0_0_1_0_0_0_0_0_1_1.value },
13594    NULL,
13595 };
13596 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_0_0_0 = {
13597    { nir_search_value_expression, 0 },
13598    false,
13599    nir_op_ior,
13600    { &search262_1_0_0_1_0_0_1_0_0_0_0_0_0.value, &search262_1_0_0_1_0_0_1_0_0_0_0_0_1.value },
13601    NULL,
13602 };
13603 
13604 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_0_0_1 = {
13605    { nir_search_value_constant, 0 },
13606    nir_type_int, { 0xff00ff /* 16711935 */ },
13607 };
13608 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_0_0 = {
13609    { nir_search_value_expression, 0 },
13610    false,
13611    nir_op_iand,
13612    { &search262_1_0_0_1_0_0_1_0_0_0_0_0.value, &search262_1_0_0_1_0_0_1_0_0_0_0_1.value },
13613    NULL,
13614 };
13615 
13616 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_0_1 = {
13617    { nir_search_value_constant, 0 },
13618    nir_type_int, { 0x8 /* 8 */ },
13619 };
13620 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_0 = {
13621    { nir_search_value_expression, 0 },
13622    false,
13623    nir_op_ishl,
13624    { &search262_1_0_0_1_0_0_1_0_0_0_0.value, &search262_1_0_0_1_0_0_1_0_0_0_1.value },
13625    NULL,
13626 };
13627 
13628 static const nir_search_variable search262_1_0_0_1_0_0_1_0_0_1_0_0_0_0 = {
13629    { nir_search_value_variable, 32 },
13630    0, /* x */
13631    false,
13632    nir_type_invalid,
13633    NULL,
13634 };
13635 
13636 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_1_0_0_0_1 = {
13637    { nir_search_value_constant, 0 },
13638    nir_type_int, { 0x10 /* 16 */ },
13639 };
13640 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_1_0_0_0 = {
13641    { nir_search_value_expression, 0 },
13642    false,
13643    nir_op_ishl,
13644    { &search262_1_0_0_1_0_0_1_0_0_1_0_0_0_0.value, &search262_1_0_0_1_0_0_1_0_0_1_0_0_0_1.value },
13645    NULL,
13646 };
13647 
13648 static const nir_search_variable search262_1_0_0_1_0_0_1_0_0_1_0_0_1_0 = {
13649    { nir_search_value_variable, 32 },
13650    0, /* x */
13651    false,
13652    nir_type_invalid,
13653    NULL,
13654 };
13655 
13656 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_1_0_0_1_1 = {
13657    { nir_search_value_constant, 0 },
13658    nir_type_int, { 0x10 /* 16 */ },
13659 };
13660 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_1_0_0_1 = {
13661    { nir_search_value_expression, 0 },
13662    false,
13663    nir_op_ushr,
13664    { &search262_1_0_0_1_0_0_1_0_0_1_0_0_1_0.value, &search262_1_0_0_1_0_0_1_0_0_1_0_0_1_1.value },
13665    NULL,
13666 };
13667 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_1_0_0 = {
13668    { nir_search_value_expression, 0 },
13669    false,
13670    nir_op_ior,
13671    { &search262_1_0_0_1_0_0_1_0_0_1_0_0_0.value, &search262_1_0_0_1_0_0_1_0_0_1_0_0_1.value },
13672    NULL,
13673 };
13674 
13675 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_1_0_1 = {
13676    { nir_search_value_constant, 0 },
13677    nir_type_int, { 0xff00ff00 /* 4278255360 */ },
13678 };
13679 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_1_0 = {
13680    { nir_search_value_expression, 0 },
13681    false,
13682    nir_op_iand,
13683    { &search262_1_0_0_1_0_0_1_0_0_1_0_0.value, &search262_1_0_0_1_0_0_1_0_0_1_0_1.value },
13684    NULL,
13685 };
13686 
13687 static const nir_search_constant search262_1_0_0_1_0_0_1_0_0_1_1 = {
13688    { nir_search_value_constant, 0 },
13689    nir_type_int, { 0x8 /* 8 */ },
13690 };
13691 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0_1 = {
13692    { nir_search_value_expression, 0 },
13693    false,
13694    nir_op_ushr,
13695    { &search262_1_0_0_1_0_0_1_0_0_1_0.value, &search262_1_0_0_1_0_0_1_0_0_1_1.value },
13696    NULL,
13697 };
13698 static const nir_search_expression search262_1_0_0_1_0_0_1_0_0 = {
13699    { nir_search_value_expression, 0 },
13700    false,
13701    nir_op_ior,
13702    { &search262_1_0_0_1_0_0_1_0_0_0.value, &search262_1_0_0_1_0_0_1_0_0_1.value },
13703    NULL,
13704 };
13705 
13706 static const nir_search_constant search262_1_0_0_1_0_0_1_0_1 = {
13707    { nir_search_value_constant, 0 },
13708    nir_type_int, { 0xf0f0f0f0 /* 4042322160 */ },
13709 };
13710 static const nir_search_expression search262_1_0_0_1_0_0_1_0 = {
13711    { nir_search_value_expression, 0 },
13712    false,
13713    nir_op_iand,
13714    { &search262_1_0_0_1_0_0_1_0_0.value, &search262_1_0_0_1_0_0_1_0_1.value },
13715    NULL,
13716 };
13717 
13718 static const nir_search_constant search262_1_0_0_1_0_0_1_1 = {
13719    { nir_search_value_constant, 0 },
13720    nir_type_int, { 0x4 /* 4 */ },
13721 };
13722 static const nir_search_expression search262_1_0_0_1_0_0_1 = {
13723    { nir_search_value_expression, 0 },
13724    false,
13725    nir_op_ushr,
13726    { &search262_1_0_0_1_0_0_1_0.value, &search262_1_0_0_1_0_0_1_1.value },
13727    NULL,
13728 };
13729 static const nir_search_expression search262_1_0_0_1_0_0 = {
13730    { nir_search_value_expression, 0 },
13731    false,
13732    nir_op_ior,
13733    { &search262_1_0_0_1_0_0_0.value, &search262_1_0_0_1_0_0_1.value },
13734    NULL,
13735 };
13736 
13737 static const nir_search_constant search262_1_0_0_1_0_1 = {
13738    { nir_search_value_constant, 0 },
13739    nir_type_int, { 0xcccccccc /* 3435973836 */ },
13740 };
13741 static const nir_search_expression search262_1_0_0_1_0 = {
13742    { nir_search_value_expression, 0 },
13743    false,
13744    nir_op_iand,
13745    { &search262_1_0_0_1_0_0.value, &search262_1_0_0_1_0_1.value },
13746    NULL,
13747 };
13748 
13749 static const nir_search_constant search262_1_0_0_1_1 = {
13750    { nir_search_value_constant, 0 },
13751    nir_type_int, { 0x2 /* 2 */ },
13752 };
13753 static const nir_search_expression search262_1_0_0_1 = {
13754    { nir_search_value_expression, 0 },
13755    false,
13756    nir_op_ushr,
13757    { &search262_1_0_0_1_0.value, &search262_1_0_0_1_1.value },
13758    NULL,
13759 };
13760 static const nir_search_expression search262_1_0_0 = {
13761    { nir_search_value_expression, 0 },
13762    false,
13763    nir_op_ior,
13764    { &search262_1_0_0_0.value, &search262_1_0_0_1.value },
13765    NULL,
13766 };
13767 
13768 static const nir_search_constant search262_1_0_1 = {
13769    { nir_search_value_constant, 0 },
13770    nir_type_int, { 0xaaaaaaaa /* 2863311530 */ },
13771 };
13772 static const nir_search_expression search262_1_0 = {
13773    { nir_search_value_expression, 0 },
13774    false,
13775    nir_op_iand,
13776    { &search262_1_0_0.value, &search262_1_0_1.value },
13777    NULL,
13778 };
13779 
13780 static const nir_search_constant search262_1_1 = {
13781    { nir_search_value_constant, 0 },
13782    nir_type_int, { 0x1 /* 1 */ },
13783 };
13784 static const nir_search_expression search262_1 = {
13785    { nir_search_value_expression, 0 },
13786    false,
13787    nir_op_ushr,
13788    { &search262_1_0.value, &search262_1_1.value },
13789    NULL,
13790 };
13791 static const nir_search_expression search262 = {
13792    { nir_search_value_expression, 0 },
13793    false,
13794    nir_op_ior,
13795    { &search262_0.value, &search262_1.value },
13796    NULL,
13797 };
13798 
13799 static const nir_search_variable replace262_0 = {
13800    { nir_search_value_variable, 0 },
13801    0, /* x */
13802    false,
13803    nir_type_invalid,
13804    NULL,
13805 };
13806 static const nir_search_expression replace262 = {
13807    { nir_search_value_expression, 0 },
13808    false,
13809    nir_op_bitfield_reverse,
13810    { &replace262_0.value },
13811    NULL,
13812 };
13813 
13814 static const struct transform nir_opt_algebraic_ior_xforms[] = {
13815    { &search107, &replace107.value, 0 },
13816    { &search108, &replace108.value, 0 },
13817    { &search109, &replace109.value, 0 },
13818    { &search110, &replace110.value, 0 },
13819    { &search138, &replace138.value, 0 },
13820    { &search139, &replace139.value, 0 },
13821    { &search140, &replace140.value, 0 },
13822    { &search146, &replace146.value, 0 },
13823    { &search262, &replace262.value, 0 },
13824 };
13825 
13826 static const nir_search_variable search213_0 = {
13827    { nir_search_value_variable, 0 },
13828    0, /* a */
13829    false,
13830    nir_type_invalid,
13831    NULL,
13832 };
13833 
13834 static const nir_search_constant search213_1 = {
13835    { nir_search_value_constant, 0 },
13836    nir_type_int, { 0x0 /* 0 */ },
13837 };
13838 static const nir_search_expression search213 = {
13839    { nir_search_value_expression, 0 },
13840    false,
13841    nir_op_ussub_4x8,
13842    { &search213_0.value, &search213_1.value },
13843    NULL,
13844 };
13845 
13846 static const nir_search_variable replace213 = {
13847    { nir_search_value_variable, 0 },
13848    0, /* a */
13849    false,
13850    nir_type_invalid,
13851    NULL,
13852 };
13853 
13854 static const nir_search_variable search214_0 = {
13855    { nir_search_value_variable, 0 },
13856    0, /* a */
13857    false,
13858    nir_type_invalid,
13859    NULL,
13860 };
13861 
13862 static const nir_search_constant search214_1 = {
13863    { nir_search_value_constant, 0 },
13864    nir_type_int, { -0x1 /* -1 */ },
13865 };
13866 static const nir_search_expression search214 = {
13867    { nir_search_value_expression, 0 },
13868    false,
13869    nir_op_ussub_4x8,
13870    { &search214_0.value, &search214_1.value },
13871    NULL,
13872 };
13873 
13874 static const nir_search_constant replace214 = {
13875    { nir_search_value_constant, 0 },
13876    nir_type_int, { 0x0 /* 0 */ },
13877 };
13878 
13879 static const struct transform nir_opt_algebraic_ussub_4x8_xforms[] = {
13880    { &search213, &replace213.value, 0 },
13881    { &search214, &replace214.value, 0 },
13882 };
13883 
13884 static const nir_search_variable search259_0 = {
13885    { nir_search_value_variable, 0 },
13886    0, /* v */
13887    false,
13888    nir_type_invalid,
13889    NULL,
13890 };
13891 static const nir_search_expression search259 = {
13892    { nir_search_value_expression, 0 },
13893    false,
13894    nir_op_unpack_snorm_4x8,
13895    { &search259_0.value },
13896    NULL,
13897 };
13898 
13899 static const nir_search_constant replace259_0 = {
13900    { nir_search_value_constant, 0 },
13901    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
13902 };
13903 
13904 static const nir_search_constant replace259_1_0 = {
13905    { nir_search_value_constant, 0 },
13906    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
13907 };
13908 
13909 static const nir_search_variable replace259_1_1_0_0_0_0 = {
13910    { nir_search_value_variable, 0 },
13911    0, /* v */
13912    false,
13913    nir_type_invalid,
13914    NULL,
13915 };
13916 
13917 static const nir_search_constant replace259_1_1_0_0_0_1 = {
13918    { nir_search_value_constant, 0 },
13919    nir_type_int, { 0x0 /* 0 */ },
13920 };
13921 static const nir_search_expression replace259_1_1_0_0_0 = {
13922    { nir_search_value_expression, 0 },
13923    false,
13924    nir_op_extract_i8,
13925    { &replace259_1_1_0_0_0_0.value, &replace259_1_1_0_0_0_1.value },
13926    NULL,
13927 };
13928 
13929 static const nir_search_variable replace259_1_1_0_0_1_0 = {
13930    { nir_search_value_variable, 0 },
13931    0, /* v */
13932    false,
13933    nir_type_invalid,
13934    NULL,
13935 };
13936 
13937 static const nir_search_constant replace259_1_1_0_0_1_1 = {
13938    { nir_search_value_constant, 0 },
13939    nir_type_int, { 0x1 /* 1 */ },
13940 };
13941 static const nir_search_expression replace259_1_1_0_0_1 = {
13942    { nir_search_value_expression, 0 },
13943    false,
13944    nir_op_extract_i8,
13945    { &replace259_1_1_0_0_1_0.value, &replace259_1_1_0_0_1_1.value },
13946    NULL,
13947 };
13948 
13949 static const nir_search_variable replace259_1_1_0_0_2_0 = {
13950    { nir_search_value_variable, 0 },
13951    0, /* v */
13952    false,
13953    nir_type_invalid,
13954    NULL,
13955 };
13956 
13957 static const nir_search_constant replace259_1_1_0_0_2_1 = {
13958    { nir_search_value_constant, 0 },
13959    nir_type_int, { 0x2 /* 2 */ },
13960 };
13961 static const nir_search_expression replace259_1_1_0_0_2 = {
13962    { nir_search_value_expression, 0 },
13963    false,
13964    nir_op_extract_i8,
13965    { &replace259_1_1_0_0_2_0.value, &replace259_1_1_0_0_2_1.value },
13966    NULL,
13967 };
13968 
13969 static const nir_search_variable replace259_1_1_0_0_3_0 = {
13970    { nir_search_value_variable, 0 },
13971    0, /* v */
13972    false,
13973    nir_type_invalid,
13974    NULL,
13975 };
13976 
13977 static const nir_search_constant replace259_1_1_0_0_3_1 = {
13978    { nir_search_value_constant, 0 },
13979    nir_type_int, { 0x3 /* 3 */ },
13980 };
13981 static const nir_search_expression replace259_1_1_0_0_3 = {
13982    { nir_search_value_expression, 0 },
13983    false,
13984    nir_op_extract_i8,
13985    { &replace259_1_1_0_0_3_0.value, &replace259_1_1_0_0_3_1.value },
13986    NULL,
13987 };
13988 static const nir_search_expression replace259_1_1_0_0 = {
13989    { nir_search_value_expression, 0 },
13990    false,
13991    nir_op_vec4,
13992    { &replace259_1_1_0_0_0.value, &replace259_1_1_0_0_1.value, &replace259_1_1_0_0_2.value, &replace259_1_1_0_0_3.value },
13993    NULL,
13994 };
13995 static const nir_search_expression replace259_1_1_0 = {
13996    { nir_search_value_expression, 0 },
13997    false,
13998    nir_op_i2f32,
13999    { &replace259_1_1_0_0.value },
14000    NULL,
14001 };
14002 
14003 static const nir_search_constant replace259_1_1_1 = {
14004    { nir_search_value_constant, 0 },
14005    nir_type_float, { 0x405fc00000000000 /* 127.0 */ },
14006 };
14007 static const nir_search_expression replace259_1_1 = {
14008    { nir_search_value_expression, 0 },
14009    false,
14010    nir_op_fdiv,
14011    { &replace259_1_1_0.value, &replace259_1_1_1.value },
14012    NULL,
14013 };
14014 static const nir_search_expression replace259_1 = {
14015    { nir_search_value_expression, 0 },
14016    false,
14017    nir_op_fmax,
14018    { &replace259_1_0.value, &replace259_1_1.value },
14019    NULL,
14020 };
14021 static const nir_search_expression replace259 = {
14022    { nir_search_value_expression, 0 },
14023    false,
14024    nir_op_fmin,
14025    { &replace259_0.value, &replace259_1.value },
14026    NULL,
14027 };
14028 
14029 static const struct transform nir_opt_algebraic_unpack_snorm_4x8_xforms[] = {
14030    { &search259, &replace259.value, 36 },
14031 };
14032 
14033 static const nir_search_variable search242_0 = {
14034    { nir_search_value_variable, 0 },
14035    0, /* a */
14036    false,
14037    nir_type_invalid,
14038    NULL,
14039 };
14040 
14041 static const nir_search_variable search242_1 = {
14042    { nir_search_value_variable, 0 },
14043    1, /* b */
14044    false,
14045    nir_type_invalid,
14046    NULL,
14047 };
14048 static const nir_search_expression search242 = {
14049    { nir_search_value_expression, 0 },
14050    false,
14051    nir_op_frem,
14052    { &search242_0.value, &search242_1.value },
14053    NULL,
14054 };
14055 
14056 static const nir_search_variable replace242_0 = {
14057    { nir_search_value_variable, 0 },
14058    0, /* a */
14059    false,
14060    nir_type_invalid,
14061    NULL,
14062 };
14063 
14064 static const nir_search_variable replace242_1_0 = {
14065    { nir_search_value_variable, 0 },
14066    1, /* b */
14067    false,
14068    nir_type_invalid,
14069    NULL,
14070 };
14071 
14072 static const nir_search_variable replace242_1_1_0_0 = {
14073    { nir_search_value_variable, 0 },
14074    0, /* a */
14075    false,
14076    nir_type_invalid,
14077    NULL,
14078 };
14079 
14080 static const nir_search_variable replace242_1_1_0_1 = {
14081    { nir_search_value_variable, 0 },
14082    1, /* b */
14083    false,
14084    nir_type_invalid,
14085    NULL,
14086 };
14087 static const nir_search_expression replace242_1_1_0 = {
14088    { nir_search_value_expression, 0 },
14089    false,
14090    nir_op_fdiv,
14091    { &replace242_1_1_0_0.value, &replace242_1_1_0_1.value },
14092    NULL,
14093 };
14094 static const nir_search_expression replace242_1_1 = {
14095    { nir_search_value_expression, 0 },
14096    false,
14097    nir_op_ftrunc,
14098    { &replace242_1_1_0.value },
14099    NULL,
14100 };
14101 static const nir_search_expression replace242_1 = {
14102    { nir_search_value_expression, 0 },
14103    false,
14104    nir_op_fmul,
14105    { &replace242_1_0.value, &replace242_1_1.value },
14106    NULL,
14107 };
14108 static const nir_search_expression replace242 = {
14109    { nir_search_value_expression, 0 },
14110    false,
14111    nir_op_fsub,
14112    { &replace242_0.value, &replace242_1.value },
14113    NULL,
14114 };
14115 
14116 static const struct transform nir_opt_algebraic_frem_xforms[] = {
14117    { &search242, &replace242.value, 21 },
14118 };
14119 
14120 static const nir_search_variable search203_0_0 = {
14121    { nir_search_value_variable, 0 },
14122    0, /* a */
14123    false,
14124    nir_type_invalid,
14125    NULL,
14126 };
14127 
14128 static const nir_search_variable search203_0_1 = {
14129    { nir_search_value_variable, 0 },
14130    1, /* b */
14131    false,
14132    nir_type_invalid,
14133    NULL,
14134 };
14135 static const nir_search_expression search203_0 = {
14136    { nir_search_value_expression, 0 },
14137    false,
14138    nir_op_pack_64_2x32_split,
14139    { &search203_0_0.value, &search203_0_1.value },
14140    NULL,
14141 };
14142 static const nir_search_expression search203 = {
14143    { nir_search_value_expression, 0 },
14144    false,
14145    nir_op_unpack_64_2x32_split_y,
14146    { &search203_0.value },
14147    NULL,
14148 };
14149 
14150 static const nir_search_variable replace203 = {
14151    { nir_search_value_variable, 0 },
14152    1, /* b */
14153    false,
14154    nir_type_invalid,
14155    NULL,
14156 };
14157 
14158 static const struct transform nir_opt_algebraic_unpack_64_2x32_split_y_xforms[] = {
14159    { &search203, &replace203.value, 0 },
14160 };
14161 
14162 static const nir_search_variable search256_0 = {
14163    { nir_search_value_variable, 0 },
14164    0, /* v */
14165    false,
14166    nir_type_invalid,
14167    NULL,
14168 };
14169 static const nir_search_expression search256 = {
14170    { nir_search_value_expression, 0 },
14171    false,
14172    nir_op_unpack_unorm_2x16,
14173    { &search256_0.value },
14174    NULL,
14175 };
14176 
14177 static const nir_search_variable replace256_0_0_0_0 = {
14178    { nir_search_value_variable, 0 },
14179    0, /* v */
14180    false,
14181    nir_type_invalid,
14182    NULL,
14183 };
14184 
14185 static const nir_search_constant replace256_0_0_0_1 = {
14186    { nir_search_value_constant, 0 },
14187    nir_type_int, { 0x0 /* 0 */ },
14188 };
14189 static const nir_search_expression replace256_0_0_0 = {
14190    { nir_search_value_expression, 0 },
14191    false,
14192    nir_op_extract_u16,
14193    { &replace256_0_0_0_0.value, &replace256_0_0_0_1.value },
14194    NULL,
14195 };
14196 
14197 static const nir_search_variable replace256_0_0_1_0 = {
14198    { nir_search_value_variable, 0 },
14199    0, /* v */
14200    false,
14201    nir_type_invalid,
14202    NULL,
14203 };
14204 
14205 static const nir_search_constant replace256_0_0_1_1 = {
14206    { nir_search_value_constant, 0 },
14207    nir_type_int, { 0x1 /* 1 */ },
14208 };
14209 static const nir_search_expression replace256_0_0_1 = {
14210    { nir_search_value_expression, 0 },
14211    false,
14212    nir_op_extract_u16,
14213    { &replace256_0_0_1_0.value, &replace256_0_0_1_1.value },
14214    NULL,
14215 };
14216 static const nir_search_expression replace256_0_0 = {
14217    { nir_search_value_expression, 0 },
14218    false,
14219    nir_op_vec2,
14220    { &replace256_0_0_0.value, &replace256_0_0_1.value },
14221    NULL,
14222 };
14223 static const nir_search_expression replace256_0 = {
14224    { nir_search_value_expression, 0 },
14225    false,
14226    nir_op_u2f32,
14227    { &replace256_0_0.value },
14228    NULL,
14229 };
14230 
14231 static const nir_search_constant replace256_1 = {
14232    { nir_search_value_constant, 0 },
14233    nir_type_float, { 0x40efffe000000000 /* 65535.0 */ },
14234 };
14235 static const nir_search_expression replace256 = {
14236    { nir_search_value_expression, 0 },
14237    false,
14238    nir_op_fdiv,
14239    { &replace256_0.value, &replace256_1.value },
14240    NULL,
14241 };
14242 
14243 static const struct transform nir_opt_algebraic_unpack_unorm_2x16_xforms[] = {
14244    { &search256, &replace256.value, 33 },
14245 };
14246 
14247 static const nir_search_variable search258_0 = {
14248    { nir_search_value_variable, 0 },
14249    0, /* v */
14250    false,
14251    nir_type_invalid,
14252    NULL,
14253 };
14254 static const nir_search_expression search258 = {
14255    { nir_search_value_expression, 0 },
14256    false,
14257    nir_op_unpack_snorm_2x16,
14258    { &search258_0.value },
14259    NULL,
14260 };
14261 
14262 static const nir_search_constant replace258_0 = {
14263    { nir_search_value_constant, 0 },
14264    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
14265 };
14266 
14267 static const nir_search_constant replace258_1_0 = {
14268    { nir_search_value_constant, 0 },
14269    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
14270 };
14271 
14272 static const nir_search_variable replace258_1_1_0_0_0_0 = {
14273    { nir_search_value_variable, 0 },
14274    0, /* v */
14275    false,
14276    nir_type_invalid,
14277    NULL,
14278 };
14279 
14280 static const nir_search_constant replace258_1_1_0_0_0_1 = {
14281    { nir_search_value_constant, 0 },
14282    nir_type_int, { 0x0 /* 0 */ },
14283 };
14284 static const nir_search_expression replace258_1_1_0_0_0 = {
14285    { nir_search_value_expression, 0 },
14286    false,
14287    nir_op_extract_i16,
14288    { &replace258_1_1_0_0_0_0.value, &replace258_1_1_0_0_0_1.value },
14289    NULL,
14290 };
14291 
14292 static const nir_search_variable replace258_1_1_0_0_1_0 = {
14293    { nir_search_value_variable, 0 },
14294    0, /* v */
14295    false,
14296    nir_type_invalid,
14297    NULL,
14298 };
14299 
14300 static const nir_search_constant replace258_1_1_0_0_1_1 = {
14301    { nir_search_value_constant, 0 },
14302    nir_type_int, { 0x1 /* 1 */ },
14303 };
14304 static const nir_search_expression replace258_1_1_0_0_1 = {
14305    { nir_search_value_expression, 0 },
14306    false,
14307    nir_op_extract_i16,
14308    { &replace258_1_1_0_0_1_0.value, &replace258_1_1_0_0_1_1.value },
14309    NULL,
14310 };
14311 static const nir_search_expression replace258_1_1_0_0 = {
14312    { nir_search_value_expression, 0 },
14313    false,
14314    nir_op_vec2,
14315    { &replace258_1_1_0_0_0.value, &replace258_1_1_0_0_1.value },
14316    NULL,
14317 };
14318 static const nir_search_expression replace258_1_1_0 = {
14319    { nir_search_value_expression, 0 },
14320    false,
14321    nir_op_i2f32,
14322    { &replace258_1_1_0_0.value },
14323    NULL,
14324 };
14325 
14326 static const nir_search_constant replace258_1_1_1 = {
14327    { nir_search_value_constant, 0 },
14328    nir_type_float, { 0x40dfffc000000000 /* 32767.0 */ },
14329 };
14330 static const nir_search_expression replace258_1_1 = {
14331    { nir_search_value_expression, 0 },
14332    false,
14333    nir_op_fdiv,
14334    { &replace258_1_1_0.value, &replace258_1_1_1.value },
14335    NULL,
14336 };
14337 static const nir_search_expression replace258_1 = {
14338    { nir_search_value_expression, 0 },
14339    false,
14340    nir_op_fmax,
14341    { &replace258_1_0.value, &replace258_1_1.value },
14342    NULL,
14343 };
14344 static const nir_search_expression replace258 = {
14345    { nir_search_value_expression, 0 },
14346    false,
14347    nir_op_fmin,
14348    { &replace258_0.value, &replace258_1.value },
14349    NULL,
14350 };
14351 
14352 static const struct transform nir_opt_algebraic_unpack_snorm_2x16_xforms[] = {
14353    { &search258, &replace258.value, 35 },
14354 };
14355 
14356 static const nir_search_variable search82_0 = {
14357    { nir_search_value_variable, 0 },
14358    0, /* a */
14359    false,
14360    nir_type_invalid,
14361    NULL,
14362 };
14363 
14364 static const nir_search_variable search82_1 = {
14365    { nir_search_value_variable, 0 },
14366    0, /* a */
14367    false,
14368    nir_type_invalid,
14369    NULL,
14370 };
14371 static const nir_search_expression search82 = {
14372    { nir_search_value_expression, 0 },
14373    false,
14374    nir_op_imax,
14375    { &search82_0.value, &search82_1.value },
14376    NULL,
14377 };
14378 
14379 static const nir_search_variable replace82 = {
14380    { nir_search_value_variable, 0 },
14381    0, /* a */
14382    false,
14383    nir_type_invalid,
14384    NULL,
14385 };
14386 
14387 static const nir_search_variable search92_0 = {
14388    { nir_search_value_variable, 0 },
14389    0, /* a */
14390    false,
14391    nir_type_invalid,
14392    NULL,
14393 };
14394 
14395 static const nir_search_variable search92_1_0_0 = {
14396    { nir_search_value_variable, 0 },
14397    0, /* a */
14398    false,
14399    nir_type_invalid,
14400    NULL,
14401 };
14402 static const nir_search_expression search92_1_0 = {
14403    { nir_search_value_expression, 0 },
14404    false,
14405    nir_op_iabs,
14406    { &search92_1_0_0.value },
14407    NULL,
14408 };
14409 static const nir_search_expression search92_1 = {
14410    { nir_search_value_expression, 0 },
14411    false,
14412    nir_op_ineg,
14413    { &search92_1_0.value },
14414    NULL,
14415 };
14416 static const nir_search_expression search92 = {
14417    { nir_search_value_expression, 0 },
14418    false,
14419    nir_op_imax,
14420    { &search92_0.value, &search92_1.value },
14421    NULL,
14422 };
14423 
14424 static const nir_search_variable replace92 = {
14425    { nir_search_value_variable, 0 },
14426    0, /* a */
14427    false,
14428    nir_type_invalid,
14429    NULL,
14430 };
14431 
14432 static const nir_search_variable search94_0 = {
14433    { nir_search_value_variable, 0 },
14434    0, /* a */
14435    false,
14436    nir_type_invalid,
14437    NULL,
14438 };
14439 
14440 static const nir_search_variable search94_1_0 = {
14441    { nir_search_value_variable, 0 },
14442    0, /* a */
14443    false,
14444    nir_type_invalid,
14445    NULL,
14446 };
14447 static const nir_search_expression search94_1 = {
14448    { nir_search_value_expression, 0 },
14449    false,
14450    nir_op_iabs,
14451    { &search94_1_0.value },
14452    NULL,
14453 };
14454 static const nir_search_expression search94 = {
14455    { nir_search_value_expression, 0 },
14456    false,
14457    nir_op_imax,
14458    { &search94_0.value, &search94_1.value },
14459    NULL,
14460 };
14461 
14462 static const nir_search_variable replace94_0 = {
14463    { nir_search_value_variable, 0 },
14464    0, /* a */
14465    false,
14466    nir_type_invalid,
14467    NULL,
14468 };
14469 static const nir_search_expression replace94 = {
14470    { nir_search_value_expression, 0 },
14471    false,
14472    nir_op_iabs,
14473    { &replace94_0.value },
14474    NULL,
14475 };
14476 
14477 static const nir_search_variable search96_0 = {
14478    { nir_search_value_variable, 0 },
14479    0, /* a */
14480    false,
14481    nir_type_invalid,
14482    NULL,
14483 };
14484 
14485 static const nir_search_variable search96_1_0 = {
14486    { nir_search_value_variable, 0 },
14487    0, /* a */
14488    false,
14489    nir_type_invalid,
14490    NULL,
14491 };
14492 static const nir_search_expression search96_1 = {
14493    { nir_search_value_expression, 0 },
14494    false,
14495    nir_op_ineg,
14496    { &search96_1_0.value },
14497    NULL,
14498 };
14499 static const nir_search_expression search96 = {
14500    { nir_search_value_expression, 0 },
14501    false,
14502    nir_op_imax,
14503    { &search96_0.value, &search96_1.value },
14504    NULL,
14505 };
14506 
14507 static const nir_search_variable replace96_0 = {
14508    { nir_search_value_variable, 0 },
14509    0, /* a */
14510    false,
14511    nir_type_invalid,
14512    NULL,
14513 };
14514 static const nir_search_expression replace96 = {
14515    { nir_search_value_expression, 0 },
14516    false,
14517    nir_op_iabs,
14518    { &replace96_0.value },
14519    NULL,
14520 };
14521 
14522 static const struct transform nir_opt_algebraic_imax_xforms[] = {
14523    { &search82, &replace82.value, 0 },
14524    { &search92, &replace92.value, 0 },
14525    { &search94, &replace94.value, 0 },
14526    { &search96, &replace96.value, 0 },
14527 };
14528 
14529 static const nir_search_variable search99_0 = {
14530    { nir_search_value_variable, 0 },
14531    0, /* a */
14532    false,
14533    nir_type_invalid,
14534    NULL,
14535 };
14536 static const nir_search_expression search99 = {
14537    { nir_search_value_expression, 0 },
14538    false,
14539    nir_op_fsat,
14540    { &search99_0.value },
14541    NULL,
14542 };
14543 
14544 static const nir_search_variable replace99_0_0 = {
14545    { nir_search_value_variable, 0 },
14546    0, /* a */
14547    false,
14548    nir_type_invalid,
14549    NULL,
14550 };
14551 
14552 static const nir_search_constant replace99_0_1 = {
14553    { nir_search_value_constant, 0 },
14554    nir_type_float, { 0x0 /* 0.0 */ },
14555 };
14556 static const nir_search_expression replace99_0 = {
14557    { nir_search_value_expression, 0 },
14558    false,
14559    nir_op_fmax,
14560    { &replace99_0_0.value, &replace99_0_1.value },
14561    NULL,
14562 };
14563 
14564 static const nir_search_constant replace99_1 = {
14565    { nir_search_value_constant, 0 },
14566    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
14567 };
14568 static const nir_search_expression replace99 = {
14569    { nir_search_value_expression, 0 },
14570    false,
14571    nir_op_fmin,
14572    { &replace99_0.value, &replace99_1.value },
14573    NULL,
14574 };
14575 
14576 static const nir_search_variable search100_0_0 = {
14577    { nir_search_value_variable, 0 },
14578    0, /* a */
14579    false,
14580    nir_type_invalid,
14581    NULL,
14582 };
14583 static const nir_search_expression search100_0 = {
14584    { nir_search_value_expression, 0 },
14585    false,
14586    nir_op_fsat,
14587    { &search100_0_0.value },
14588    NULL,
14589 };
14590 static const nir_search_expression search100 = {
14591    { nir_search_value_expression, 0 },
14592    false,
14593    nir_op_fsat,
14594    { &search100_0.value },
14595    NULL,
14596 };
14597 
14598 static const nir_search_variable replace100_0 = {
14599    { nir_search_value_variable, 0 },
14600    0, /* a */
14601    false,
14602    nir_type_invalid,
14603    NULL,
14604 };
14605 static const nir_search_expression replace100 = {
14606    { nir_search_value_expression, 0 },
14607    false,
14608    nir_op_fsat,
14609    { &replace100_0.value },
14610    NULL,
14611 };
14612 
14613 static const nir_search_variable search123_0_0_0 = {
14614    { nir_search_value_variable, 0 },
14615    0, /* a */
14616    false,
14617    nir_type_invalid,
14618    NULL,
14619 };
14620 static const nir_search_expression search123_0_0 = {
14621    { nir_search_value_expression, 0 },
14622    false,
14623    nir_op_b2f,
14624    { &search123_0_0_0.value },
14625    NULL,
14626 };
14627 
14628 static const nir_search_variable search123_0_1_0 = {
14629    { nir_search_value_variable, 0 },
14630    1, /* b */
14631    false,
14632    nir_type_invalid,
14633    NULL,
14634 };
14635 static const nir_search_expression search123_0_1 = {
14636    { nir_search_value_expression, 0 },
14637    false,
14638    nir_op_b2f,
14639    { &search123_0_1_0.value },
14640    NULL,
14641 };
14642 static const nir_search_expression search123_0 = {
14643    { nir_search_value_expression, 0 },
14644    false,
14645    nir_op_fadd,
14646    { &search123_0_0.value, &search123_0_1.value },
14647    NULL,
14648 };
14649 static const nir_search_expression search123 = {
14650    { nir_search_value_expression, 0 },
14651    false,
14652    nir_op_fsat,
14653    { &search123_0.value },
14654    NULL,
14655 };
14656 
14657 static const nir_search_variable replace123_0_0 = {
14658    { nir_search_value_variable, 0 },
14659    0, /* a */
14660    false,
14661    nir_type_invalid,
14662    NULL,
14663 };
14664 
14665 static const nir_search_variable replace123_0_1 = {
14666    { nir_search_value_variable, 0 },
14667    1, /* b */
14668    false,
14669    nir_type_invalid,
14670    NULL,
14671 };
14672 static const nir_search_expression replace123_0 = {
14673    { nir_search_value_expression, 0 },
14674    false,
14675    nir_op_ior,
14676    { &replace123_0_0.value, &replace123_0_1.value },
14677    NULL,
14678 };
14679 static const nir_search_expression replace123 = {
14680    { nir_search_value_expression, 0 },
14681    false,
14682    nir_op_b2f,
14683    { &replace123_0.value },
14684    NULL,
14685 };
14686 
14687 static const struct transform nir_opt_algebraic_fsat_xforms[] = {
14688    { &search99, &replace99.value, 10 },
14689    { &search100, &replace100.value, 0 },
14690    { &search123, &replace123.value, 0 },
14691 };
14692 
14693 static const nir_search_variable search251_0 = {
14694    { nir_search_value_variable, 0 },
14695    0, /* a */
14696    false,
14697    nir_type_invalid,
14698    NULL,
14699 };
14700 
14701 static const nir_search_variable search251_1 = {
14702    { nir_search_value_variable, 32 },
14703    1, /* b */
14704    false,
14705    nir_type_invalid,
14706    NULL,
14707 };
14708 static const nir_search_expression search251 = {
14709    { nir_search_value_expression, 0 },
14710    false,
14711    nir_op_extract_u16,
14712    { &search251_0.value, &search251_1.value },
14713    NULL,
14714 };
14715 
14716 static const nir_search_variable replace251_0_0 = {
14717    { nir_search_value_variable, 0 },
14718    0, /* a */
14719    false,
14720    nir_type_invalid,
14721    NULL,
14722 };
14723 
14724 static const nir_search_variable replace251_0_1_0 = {
14725    { nir_search_value_variable, 0 },
14726    1, /* b */
14727    false,
14728    nir_type_invalid,
14729    NULL,
14730 };
14731 
14732 static const nir_search_constant replace251_0_1_1 = {
14733    { nir_search_value_constant, 0 },
14734    nir_type_int, { 0x10 /* 16 */ },
14735 };
14736 static const nir_search_expression replace251_0_1 = {
14737    { nir_search_value_expression, 0 },
14738    false,
14739    nir_op_imul,
14740    { &replace251_0_1_0.value, &replace251_0_1_1.value },
14741    NULL,
14742 };
14743 static const nir_search_expression replace251_0 = {
14744    { nir_search_value_expression, 0 },
14745    false,
14746    nir_op_ushr,
14747    { &replace251_0_0.value, &replace251_0_1.value },
14748    NULL,
14749 };
14750 
14751 static const nir_search_constant replace251_1 = {
14752    { nir_search_value_constant, 0 },
14753    nir_type_int, { 0xffff /* 65535 */ },
14754 };
14755 static const nir_search_expression replace251 = {
14756    { nir_search_value_expression, 0 },
14757    false,
14758    nir_op_iand,
14759    { &replace251_0.value, &replace251_1.value },
14760    NULL,
14761 };
14762 
14763 static const struct transform nir_opt_algebraic_extract_u16_xforms[] = {
14764    { &search251, &replace251.value, 28 },
14765 };
14766 
14767 static const nir_search_constant search69_0 = {
14768    { nir_search_value_constant, 0 },
14769    nir_type_float, { 0x0 /* 0.0 */ },
14770 };
14771 
14772 static const nir_search_variable search69_1_0 = {
14773    { nir_search_value_variable, 0 },
14774    0, /* a */
14775    false,
14776    nir_type_invalid,
14777    NULL,
14778 };
14779 static const nir_search_expression search69_1 = {
14780    { nir_search_value_expression, 0 },
14781    false,
14782    nir_op_b2f,
14783    { &search69_1_0.value },
14784    NULL,
14785 };
14786 static const nir_search_expression search69 = {
14787    { nir_search_value_expression, 0 },
14788    false,
14789    nir_op_fge,
14790    { &search69_0.value, &search69_1.value },
14791    NULL,
14792 };
14793 
14794 static const nir_search_variable replace69_0 = {
14795    { nir_search_value_variable, 0 },
14796    0, /* a */
14797    false,
14798    nir_type_invalid,
14799    NULL,
14800 };
14801 static const nir_search_expression replace69 = {
14802    { nir_search_value_expression, 0 },
14803    false,
14804    nir_op_inot,
14805    { &replace69_0.value },
14806    NULL,
14807 };
14808 
14809 static const nir_search_variable search70_0_0_0 = {
14810    { nir_search_value_variable, 0 },
14811    0, /* a */
14812    false,
14813    nir_type_invalid,
14814    NULL,
14815 };
14816 static const nir_search_expression search70_0_0 = {
14817    { nir_search_value_expression, 0 },
14818    false,
14819    nir_op_b2f,
14820    { &search70_0_0_0.value },
14821    NULL,
14822 };
14823 static const nir_search_expression search70_0 = {
14824    { nir_search_value_expression, 0 },
14825    false,
14826    nir_op_fneg,
14827    { &search70_0_0.value },
14828    NULL,
14829 };
14830 
14831 static const nir_search_constant search70_1 = {
14832    { nir_search_value_constant, 0 },
14833    nir_type_float, { 0x0 /* 0.0 */ },
14834 };
14835 static const nir_search_expression search70 = {
14836    { nir_search_value_expression, 0 },
14837    false,
14838    nir_op_fge,
14839    { &search70_0.value, &search70_1.value },
14840    NULL,
14841 };
14842 
14843 static const nir_search_variable replace70_0 = {
14844    { nir_search_value_variable, 0 },
14845    0, /* a */
14846    false,
14847    nir_type_invalid,
14848    NULL,
14849 };
14850 static const nir_search_expression replace70 = {
14851    { nir_search_value_expression, 0 },
14852    false,
14853    nir_op_inot,
14854    { &replace70_0.value },
14855    NULL,
14856 };
14857 
14858 static const nir_search_variable search73_0_0_0 = {
14859    { nir_search_value_variable, 0 },
14860    0, /* a */
14861    false,
14862    nir_type_invalid,
14863    NULL,
14864 };
14865 static const nir_search_expression search73_0_0 = {
14866    { nir_search_value_expression, 0 },
14867    false,
14868    nir_op_fabs,
14869    { &search73_0_0_0.value },
14870    NULL,
14871 };
14872 static const nir_search_expression search73_0 = {
14873    { nir_search_value_expression, 0 },
14874    false,
14875    nir_op_fneg,
14876    { &search73_0_0.value },
14877    NULL,
14878 };
14879 
14880 static const nir_search_constant search73_1 = {
14881    { nir_search_value_constant, 0 },
14882    nir_type_float, { 0x0 /* 0.0 */ },
14883 };
14884 static const nir_search_expression search73 = {
14885    { nir_search_value_expression, 0 },
14886    false,
14887    nir_op_fge,
14888    { &search73_0.value, &search73_1.value },
14889    NULL,
14890 };
14891 
14892 static const nir_search_variable replace73_0 = {
14893    { nir_search_value_variable, 0 },
14894    0, /* a */
14895    false,
14896    nir_type_invalid,
14897    NULL,
14898 };
14899 
14900 static const nir_search_constant replace73_1 = {
14901    { nir_search_value_constant, 0 },
14902    nir_type_float, { 0x0 /* 0.0 */ },
14903 };
14904 static const nir_search_expression replace73 = {
14905    { nir_search_value_expression, 0 },
14906    false,
14907    nir_op_feq,
14908    { &replace73_0.value, &replace73_1.value },
14909    NULL,
14910 };
14911 
14912 static const nir_search_variable search271_0_0 = {
14913    { nir_search_value_variable, 0 },
14914    0, /* a */
14915    false,
14916    nir_type_invalid,
14917    NULL,
14918 };
14919 
14920 static const nir_search_variable search271_0_1 = {
14921    { nir_search_value_variable, 0 },
14922    1, /* b */
14923    true,
14924    nir_type_invalid,
14925    NULL,
14926 };
14927 
14928 static const nir_search_variable search271_0_2 = {
14929    { nir_search_value_variable, 0 },
14930    2, /* c */
14931    true,
14932    nir_type_invalid,
14933    NULL,
14934 };
14935 static const nir_search_expression search271_0 = {
14936    { nir_search_value_expression, 0 },
14937    false,
14938    nir_op_bcsel,
14939    { &search271_0_0.value, &search271_0_1.value, &search271_0_2.value },
14940    NULL,
14941 };
14942 
14943 static const nir_search_variable search271_1 = {
14944    { nir_search_value_variable, 0 },
14945    3, /* d */
14946    true,
14947    nir_type_invalid,
14948    NULL,
14949 };
14950 static const nir_search_expression search271 = {
14951    { nir_search_value_expression, 0 },
14952    false,
14953    nir_op_fge,
14954    { &search271_0.value, &search271_1.value },
14955    NULL,
14956 };
14957 
14958 static const nir_search_variable replace271_0 = {
14959    { nir_search_value_variable, 0 },
14960    0, /* a */
14961    false,
14962    nir_type_invalid,
14963    NULL,
14964 };
14965 
14966 static const nir_search_variable replace271_1_0 = {
14967    { nir_search_value_variable, 0 },
14968    1, /* b */
14969    false,
14970    nir_type_invalid,
14971    NULL,
14972 };
14973 
14974 static const nir_search_variable replace271_1_1 = {
14975    { nir_search_value_variable, 0 },
14976    3, /* d */
14977    false,
14978    nir_type_invalid,
14979    NULL,
14980 };
14981 static const nir_search_expression replace271_1 = {
14982    { nir_search_value_expression, 0 },
14983    false,
14984    nir_op_fge,
14985    { &replace271_1_0.value, &replace271_1_1.value },
14986    NULL,
14987 };
14988 
14989 static const nir_search_variable replace271_2_0 = {
14990    { nir_search_value_variable, 0 },
14991    2, /* c */
14992    false,
14993    nir_type_invalid,
14994    NULL,
14995 };
14996 
14997 static const nir_search_variable replace271_2_1 = {
14998    { nir_search_value_variable, 0 },
14999    3, /* d */
15000    false,
15001    nir_type_invalid,
15002    NULL,
15003 };
15004 static const nir_search_expression replace271_2 = {
15005    { nir_search_value_expression, 0 },
15006    false,
15007    nir_op_fge,
15008    { &replace271_2_0.value, &replace271_2_1.value },
15009    NULL,
15010 };
15011 static const nir_search_expression replace271 = {
15012    { nir_search_value_expression, 0 },
15013    false,
15014    nir_op_bcsel,
15015    { &replace271_0.value, &replace271_1.value, &replace271_2.value },
15016    NULL,
15017 };
15018 
15019 static const nir_search_variable search272_0 = {
15020    { nir_search_value_variable, 0 },
15021    0, /* d */
15022    true,
15023    nir_type_invalid,
15024    NULL,
15025 };
15026 
15027 static const nir_search_variable search272_1_0 = {
15028    { nir_search_value_variable, 0 },
15029    1, /* a */
15030    false,
15031    nir_type_invalid,
15032    NULL,
15033 };
15034 
15035 static const nir_search_variable search272_1_1 = {
15036    { nir_search_value_variable, 0 },
15037    2, /* b */
15038    true,
15039    nir_type_invalid,
15040    NULL,
15041 };
15042 
15043 static const nir_search_variable search272_1_2 = {
15044    { nir_search_value_variable, 0 },
15045    3, /* c */
15046    true,
15047    nir_type_invalid,
15048    NULL,
15049 };
15050 static const nir_search_expression search272_1 = {
15051    { nir_search_value_expression, 0 },
15052    false,
15053    nir_op_bcsel,
15054    { &search272_1_0.value, &search272_1_1.value, &search272_1_2.value },
15055    NULL,
15056 };
15057 static const nir_search_expression search272 = {
15058    { nir_search_value_expression, 0 },
15059    false,
15060    nir_op_fge,
15061    { &search272_0.value, &search272_1.value },
15062    NULL,
15063 };
15064 
15065 static const nir_search_variable replace272_0 = {
15066    { nir_search_value_variable, 0 },
15067    1, /* a */
15068    false,
15069    nir_type_invalid,
15070    NULL,
15071 };
15072 
15073 static const nir_search_variable replace272_1_0 = {
15074    { nir_search_value_variable, 0 },
15075    0, /* d */
15076    false,
15077    nir_type_invalid,
15078    NULL,
15079 };
15080 
15081 static const nir_search_variable replace272_1_1 = {
15082    { nir_search_value_variable, 0 },
15083    2, /* b */
15084    false,
15085    nir_type_invalid,
15086    NULL,
15087 };
15088 static const nir_search_expression replace272_1 = {
15089    { nir_search_value_expression, 0 },
15090    false,
15091    nir_op_fge,
15092    { &replace272_1_0.value, &replace272_1_1.value },
15093    NULL,
15094 };
15095 
15096 static const nir_search_variable replace272_2_0 = {
15097    { nir_search_value_variable, 0 },
15098    0, /* d */
15099    false,
15100    nir_type_invalid,
15101    NULL,
15102 };
15103 
15104 static const nir_search_variable replace272_2_1 = {
15105    { nir_search_value_variable, 0 },
15106    3, /* c */
15107    false,
15108    nir_type_invalid,
15109    NULL,
15110 };
15111 static const nir_search_expression replace272_2 = {
15112    { nir_search_value_expression, 0 },
15113    false,
15114    nir_op_fge,
15115    { &replace272_2_0.value, &replace272_2_1.value },
15116    NULL,
15117 };
15118 static const nir_search_expression replace272 = {
15119    { nir_search_value_expression, 0 },
15120    false,
15121    nir_op_bcsel,
15122    { &replace272_0.value, &replace272_1.value, &replace272_2.value },
15123    NULL,
15124 };
15125 
15126 static const struct transform nir_opt_algebraic_fge_xforms[] = {
15127    { &search69, &replace69.value, 0 },
15128    { &search70, &replace70.value, 0 },
15129    { &search73, &replace73.value, 0 },
15130    { &search271, &replace271.value, 0 },
15131    { &search272, &replace272.value, 0 },
15132 };
15133 
15134 static const nir_search_variable search167_0_0 = {
15135    { nir_search_value_variable, 0 },
15136    0, /* a */
15137    false,
15138    nir_type_invalid,
15139    NULL,
15140 };
15141 static const nir_search_expression search167_0 = {
15142    { nir_search_value_expression, 0 },
15143    false,
15144    nir_op_fexp2,
15145    { &search167_0_0.value },
15146    NULL,
15147 };
15148 static const nir_search_expression search167 = {
15149    { nir_search_value_expression, 0 },
15150    true,
15151    nir_op_frcp,
15152    { &search167_0.value },
15153    NULL,
15154 };
15155 
15156 static const nir_search_variable replace167_0_0 = {
15157    { nir_search_value_variable, 0 },
15158    0, /* a */
15159    false,
15160    nir_type_invalid,
15161    NULL,
15162 };
15163 static const nir_search_expression replace167_0 = {
15164    { nir_search_value_expression, 0 },
15165    false,
15166    nir_op_fneg,
15167    { &replace167_0_0.value },
15168    NULL,
15169 };
15170 static const nir_search_expression replace167 = {
15171    { nir_search_value_expression, 0 },
15172    false,
15173    nir_op_fexp2,
15174    { &replace167_0.value },
15175    NULL,
15176 };
15177 
15178 static const nir_search_variable search176_0_0 = {
15179    { nir_search_value_variable, 0 },
15180    0, /* a */
15181    false,
15182    nir_type_invalid,
15183    NULL,
15184 };
15185 static const nir_search_expression search176_0 = {
15186    { nir_search_value_expression, 0 },
15187    false,
15188    nir_op_frcp,
15189    { &search176_0_0.value },
15190    NULL,
15191 };
15192 static const nir_search_expression search176 = {
15193    { nir_search_value_expression, 0 },
15194    true,
15195    nir_op_frcp,
15196    { &search176_0.value },
15197    NULL,
15198 };
15199 
15200 static const nir_search_variable replace176 = {
15201    { nir_search_value_variable, 0 },
15202    0, /* a */
15203    false,
15204    nir_type_invalid,
15205    NULL,
15206 };
15207 
15208 static const nir_search_variable search177_0_0 = {
15209    { nir_search_value_variable, 0 },
15210    0, /* a */
15211    false,
15212    nir_type_invalid,
15213    NULL,
15214 };
15215 static const nir_search_expression search177_0 = {
15216    { nir_search_value_expression, 0 },
15217    false,
15218    nir_op_fsqrt,
15219    { &search177_0_0.value },
15220    NULL,
15221 };
15222 static const nir_search_expression search177 = {
15223    { nir_search_value_expression, 0 },
15224    true,
15225    nir_op_frcp,
15226    { &search177_0.value },
15227    NULL,
15228 };
15229 
15230 static const nir_search_variable replace177_0 = {
15231    { nir_search_value_variable, 0 },
15232    0, /* a */
15233    false,
15234    nir_type_invalid,
15235    NULL,
15236 };
15237 static const nir_search_expression replace177 = {
15238    { nir_search_value_expression, 0 },
15239    false,
15240    nir_op_frsq,
15241    { &replace177_0.value },
15242    NULL,
15243 };
15244 
15245 static const nir_search_variable search179_0_0 = {
15246    { nir_search_value_variable, 0 },
15247    0, /* a */
15248    false,
15249    nir_type_invalid,
15250    NULL,
15251 };
15252 static const nir_search_expression search179_0 = {
15253    { nir_search_value_expression, 0 },
15254    false,
15255    nir_op_frsq,
15256    { &search179_0_0.value },
15257    NULL,
15258 };
15259 static const nir_search_expression search179 = {
15260    { nir_search_value_expression, 0 },
15261    true,
15262    nir_op_frcp,
15263    { &search179_0.value },
15264    NULL,
15265 };
15266 
15267 static const nir_search_variable replace179_0 = {
15268    { nir_search_value_variable, 0 },
15269    0, /* a */
15270    false,
15271    nir_type_invalid,
15272    NULL,
15273 };
15274 static const nir_search_expression replace179 = {
15275    { nir_search_value_expression, 0 },
15276    false,
15277    nir_op_fsqrt,
15278    { &replace179_0.value },
15279    NULL,
15280 };
15281 
15282 static const struct transform nir_opt_algebraic_frcp_xforms[] = {
15283    { &search167, &replace167.value, 0 },
15284    { &search176, &replace176.value, 0 },
15285    { &search177, &replace177.value, 0 },
15286    { &search179, &replace179.value, 16 },
15287 };
15288 
15289 static const nir_search_variable search141_0 = {
15290    { nir_search_value_variable, 0 },
15291    0, /* a */
15292    false,
15293    nir_type_invalid,
15294    NULL,
15295 };
15296 
15297 static const nir_search_variable search141_1 = {
15298    { nir_search_value_variable, 0 },
15299    0, /* a */
15300    false,
15301    nir_type_invalid,
15302    NULL,
15303 };
15304 static const nir_search_expression search141 = {
15305    { nir_search_value_expression, 0 },
15306    false,
15307    nir_op_fxor,
15308    { &search141_0.value, &search141_1.value },
15309    NULL,
15310 };
15311 
15312 static const nir_search_constant replace141 = {
15313    { nir_search_value_constant, 0 },
15314    nir_type_float, { 0x0 /* 0.0 */ },
15315 };
15316 
15317 static const struct transform nir_opt_algebraic_fxor_xforms[] = {
15318    { &search141, &replace141.value, 0 },
15319 };
15320 
15321 static const nir_search_constant search151_0 = {
15322    { nir_search_value_constant, 0 },
15323    nir_type_int, { 0x0 /* 0 */ },
15324 };
15325 
15326 static const nir_search_variable search151_1 = {
15327    { nir_search_value_variable, 0 },
15328    0, /* a */
15329    false,
15330    nir_type_invalid,
15331    NULL,
15332 };
15333 static const nir_search_expression search151 = {
15334    { nir_search_value_expression, 0 },
15335    false,
15336    nir_op_ushr,
15337    { &search151_0.value, &search151_1.value },
15338    NULL,
15339 };
15340 
15341 static const nir_search_constant replace151 = {
15342    { nir_search_value_constant, 0 },
15343    nir_type_int, { 0x0 /* 0 */ },
15344 };
15345 
15346 static const nir_search_variable search152_0 = {
15347    { nir_search_value_variable, 0 },
15348    0, /* a */
15349    false,
15350    nir_type_invalid,
15351    NULL,
15352 };
15353 
15354 static const nir_search_constant search152_1 = {
15355    { nir_search_value_constant, 0 },
15356    nir_type_int, { 0x0 /* 0 */ },
15357 };
15358 static const nir_search_expression search152 = {
15359    { nir_search_value_expression, 0 },
15360    false,
15361    nir_op_ushr,
15362    { &search152_0.value, &search152_1.value },
15363    NULL,
15364 };
15365 
15366 static const nir_search_variable replace152 = {
15367    { nir_search_value_variable, 0 },
15368    0, /* a */
15369    false,
15370    nir_type_invalid,
15371    NULL,
15372 };
15373 
15374 static const nir_search_variable search205_0 = {
15375    { nir_search_value_variable, 0 },
15376    0, /* a */
15377    false,
15378    nir_type_invalid,
15379    NULL,
15380 };
15381 
15382 static const nir_search_constant search205_1 = {
15383    { nir_search_value_constant, 0 },
15384    nir_type_int, { 0x18 /* 24 */ },
15385 };
15386 static const nir_search_expression search205 = {
15387    { nir_search_value_expression, 0 },
15388    false,
15389    nir_op_ushr,
15390    { &search205_0.value, &search205_1.value },
15391    NULL,
15392 };
15393 
15394 static const nir_search_variable replace205_0 = {
15395    { nir_search_value_variable, 0 },
15396    0, /* a */
15397    false,
15398    nir_type_invalid,
15399    NULL,
15400 };
15401 
15402 static const nir_search_constant replace205_1 = {
15403    { nir_search_value_constant, 0 },
15404    nir_type_int, { 0x3 /* 3 */ },
15405 };
15406 static const nir_search_expression replace205 = {
15407    { nir_search_value_expression, 0 },
15408    false,
15409    nir_op_extract_u8,
15410    { &replace205_0.value, &replace205_1.value },
15411    NULL,
15412 };
15413 
15414 static const nir_search_variable search209_0 = {
15415    { nir_search_value_variable, 0 },
15416    0, /* a */
15417    false,
15418    nir_type_invalid,
15419    NULL,
15420 };
15421 
15422 static const nir_search_constant search209_1 = {
15423    { nir_search_value_constant, 0 },
15424    nir_type_int, { 0x10 /* 16 */ },
15425 };
15426 static const nir_search_expression search209 = {
15427    { nir_search_value_expression, 0 },
15428    false,
15429    nir_op_ushr,
15430    { &search209_0.value, &search209_1.value },
15431    NULL,
15432 };
15433 
15434 static const nir_search_variable replace209_0 = {
15435    { nir_search_value_variable, 0 },
15436    0, /* a */
15437    false,
15438    nir_type_invalid,
15439    NULL,
15440 };
15441 
15442 static const nir_search_constant replace209_1 = {
15443    { nir_search_value_constant, 0 },
15444    nir_type_int, { 0x1 /* 1 */ },
15445 };
15446 static const nir_search_expression replace209 = {
15447    { nir_search_value_expression, 0 },
15448    false,
15449    nir_op_extract_u16,
15450    { &replace209_0.value, &replace209_1.value },
15451    NULL,
15452 };
15453 
15454 static const struct transform nir_opt_algebraic_ushr_xforms[] = {
15455    { &search151, &replace151.value, 0 },
15456    { &search152, &replace152.value, 0 },
15457    { &search205, &replace205.value, 17 },
15458    { &search209, &replace209.value, 18 },
15459 };
15460 
15461 static const nir_search_variable search155_0_0 = {
15462    { nir_search_value_variable, 0 },
15463    0, /* a */
15464    false,
15465    nir_type_invalid,
15466    NULL,
15467 };
15468 static const nir_search_expression search155_0 = {
15469    { nir_search_value_expression, 0 },
15470    false,
15471    nir_op_flog2,
15472    { &search155_0_0.value },
15473    NULL,
15474 };
15475 static const nir_search_expression search155 = {
15476    { nir_search_value_expression, 0 },
15477    true,
15478    nir_op_fexp2,
15479    { &search155_0.value },
15480    NULL,
15481 };
15482 
15483 static const nir_search_variable replace155 = {
15484    { nir_search_value_variable, 0 },
15485    0, /* a */
15486    false,
15487    nir_type_invalid,
15488    NULL,
15489 };
15490 
15491 static const nir_search_variable search158_0_0_0 = {
15492    { nir_search_value_variable, 0 },
15493    0, /* a */
15494    false,
15495    nir_type_invalid,
15496    NULL,
15497 };
15498 static const nir_search_expression search158_0_0 = {
15499    { nir_search_value_expression, 0 },
15500    false,
15501    nir_op_flog2,
15502    { &search158_0_0_0.value },
15503    NULL,
15504 };
15505 
15506 static const nir_search_variable search158_0_1 = {
15507    { nir_search_value_variable, 0 },
15508    1, /* b */
15509    false,
15510    nir_type_invalid,
15511    NULL,
15512 };
15513 static const nir_search_expression search158_0 = {
15514    { nir_search_value_expression, 0 },
15515    false,
15516    nir_op_fmul,
15517    { &search158_0_0.value, &search158_0_1.value },
15518    NULL,
15519 };
15520 static const nir_search_expression search158 = {
15521    { nir_search_value_expression, 0 },
15522    true,
15523    nir_op_fexp2,
15524    { &search158_0.value },
15525    NULL,
15526 };
15527 
15528 static const nir_search_variable replace158_0 = {
15529    { nir_search_value_variable, 0 },
15530    0, /* a */
15531    false,
15532    nir_type_invalid,
15533    NULL,
15534 };
15535 
15536 static const nir_search_variable replace158_1 = {
15537    { nir_search_value_variable, 0 },
15538    1, /* b */
15539    false,
15540    nir_type_invalid,
15541    NULL,
15542 };
15543 static const nir_search_expression replace158 = {
15544    { nir_search_value_expression, 0 },
15545    false,
15546    nir_op_fpow,
15547    { &replace158_0.value, &replace158_1.value },
15548    NULL,
15549 };
15550 
15551 static const nir_search_variable search159_0_0_0_0 = {
15552    { nir_search_value_variable, 0 },
15553    0, /* a */
15554    false,
15555    nir_type_invalid,
15556    NULL,
15557 };
15558 static const nir_search_expression search159_0_0_0 = {
15559    { nir_search_value_expression, 0 },
15560    false,
15561    nir_op_flog2,
15562    { &search159_0_0_0_0.value },
15563    NULL,
15564 };
15565 
15566 static const nir_search_variable search159_0_0_1 = {
15567    { nir_search_value_variable, 0 },
15568    1, /* b */
15569    false,
15570    nir_type_invalid,
15571    NULL,
15572 };
15573 static const nir_search_expression search159_0_0 = {
15574    { nir_search_value_expression, 0 },
15575    false,
15576    nir_op_fmul,
15577    { &search159_0_0_0.value, &search159_0_0_1.value },
15578    NULL,
15579 };
15580 
15581 static const nir_search_variable search159_0_1_0_0 = {
15582    { nir_search_value_variable, 0 },
15583    2, /* c */
15584    false,
15585    nir_type_invalid,
15586    NULL,
15587 };
15588 static const nir_search_expression search159_0_1_0 = {
15589    { nir_search_value_expression, 0 },
15590    false,
15591    nir_op_flog2,
15592    { &search159_0_1_0_0.value },
15593    NULL,
15594 };
15595 
15596 static const nir_search_variable search159_0_1_1 = {
15597    { nir_search_value_variable, 0 },
15598    3, /* d */
15599    false,
15600    nir_type_invalid,
15601    NULL,
15602 };
15603 static const nir_search_expression search159_0_1 = {
15604    { nir_search_value_expression, 0 },
15605    false,
15606    nir_op_fmul,
15607    { &search159_0_1_0.value, &search159_0_1_1.value },
15608    NULL,
15609 };
15610 static const nir_search_expression search159_0 = {
15611    { nir_search_value_expression, 0 },
15612    false,
15613    nir_op_fadd,
15614    { &search159_0_0.value, &search159_0_1.value },
15615    NULL,
15616 };
15617 static const nir_search_expression search159 = {
15618    { nir_search_value_expression, 0 },
15619    true,
15620    nir_op_fexp2,
15621    { &search159_0.value },
15622    NULL,
15623 };
15624 
15625 static const nir_search_variable replace159_0_0 = {
15626    { nir_search_value_variable, 0 },
15627    0, /* a */
15628    false,
15629    nir_type_invalid,
15630    NULL,
15631 };
15632 
15633 static const nir_search_variable replace159_0_1 = {
15634    { nir_search_value_variable, 0 },
15635    1, /* b */
15636    false,
15637    nir_type_invalid,
15638    NULL,
15639 };
15640 static const nir_search_expression replace159_0 = {
15641    { nir_search_value_expression, 0 },
15642    false,
15643    nir_op_fpow,
15644    { &replace159_0_0.value, &replace159_0_1.value },
15645    NULL,
15646 };
15647 
15648 static const nir_search_variable replace159_1_0 = {
15649    { nir_search_value_variable, 0 },
15650    2, /* c */
15651    false,
15652    nir_type_invalid,
15653    NULL,
15654 };
15655 
15656 static const nir_search_variable replace159_1_1 = {
15657    { nir_search_value_variable, 0 },
15658    3, /* d */
15659    false,
15660    nir_type_invalid,
15661    NULL,
15662 };
15663 static const nir_search_expression replace159_1 = {
15664    { nir_search_value_expression, 0 },
15665    false,
15666    nir_op_fpow,
15667    { &replace159_1_0.value, &replace159_1_1.value },
15668    NULL,
15669 };
15670 static const nir_search_expression replace159 = {
15671    { nir_search_value_expression, 0 },
15672    true,
15673    nir_op_fmul,
15674    { &replace159_0.value, &replace159_1.value },
15675    NULL,
15676 };
15677 
15678 static const struct transform nir_opt_algebraic_fexp2_xforms[] = {
15679    { &search155, &replace155.value, 0 },
15680    { &search158, &replace158.value, 13 },
15681    { &search159, &replace159.value, 13 },
15682 };
15683 
15684 static const nir_search_constant search149_0 = {
15685    { nir_search_value_constant, 0 },
15686    nir_type_int, { 0x0 /* 0 */ },
15687 };
15688 
15689 static const nir_search_variable search149_1 = {
15690    { nir_search_value_variable, 0 },
15691    0, /* a */
15692    false,
15693    nir_type_invalid,
15694    NULL,
15695 };
15696 static const nir_search_expression search149 = {
15697    { nir_search_value_expression, 0 },
15698    false,
15699    nir_op_ishr,
15700    { &search149_0.value, &search149_1.value },
15701    NULL,
15702 };
15703 
15704 static const nir_search_constant replace149 = {
15705    { nir_search_value_constant, 0 },
15706    nir_type_int, { 0x0 /* 0 */ },
15707 };
15708 
15709 static const nir_search_variable search150_0 = {
15710    { nir_search_value_variable, 0 },
15711    0, /* a */
15712    false,
15713    nir_type_invalid,
15714    NULL,
15715 };
15716 
15717 static const nir_search_constant search150_1 = {
15718    { nir_search_value_constant, 0 },
15719    nir_type_int, { 0x0 /* 0 */ },
15720 };
15721 static const nir_search_expression search150 = {
15722    { nir_search_value_expression, 0 },
15723    false,
15724    nir_op_ishr,
15725    { &search150_0.value, &search150_1.value },
15726    NULL,
15727 };
15728 
15729 static const nir_search_variable replace150 = {
15730    { nir_search_value_variable, 0 },
15731    0, /* a */
15732    false,
15733    nir_type_invalid,
15734    NULL,
15735 };
15736 
15737 static const struct transform nir_opt_algebraic_ishr_xforms[] = {
15738    { &search149, &replace149.value, 0 },
15739    { &search150, &replace150.value, 0 },
15740 };
15741 
15742 static const nir_search_variable search247_0 = {
15743    { nir_search_value_variable, 0 },
15744    0, /* value */
15745    false,
15746    nir_type_invalid,
15747    NULL,
15748 };
15749 
15750 static const nir_search_variable search247_1 = {
15751    { nir_search_value_variable, 0 },
15752    1, /* offset */
15753    false,
15754    nir_type_invalid,
15755    NULL,
15756 };
15757 
15758 static const nir_search_variable search247_2 = {
15759    { nir_search_value_variable, 0 },
15760    2, /* bits */
15761    false,
15762    nir_type_invalid,
15763    NULL,
15764 };
15765 static const nir_search_expression search247 = {
15766    { nir_search_value_expression, 0 },
15767    false,
15768    nir_op_ubitfield_extract,
15769    { &search247_0.value, &search247_1.value, &search247_2.value },
15770    NULL,
15771 };
15772 
15773 static const nir_search_constant replace247_0_0 = {
15774    { nir_search_value_constant, 0 },
15775    nir_type_int, { 0x1f /* 31 */ },
15776 };
15777 
15778 static const nir_search_variable replace247_0_1 = {
15779    { nir_search_value_variable, 0 },
15780    2, /* bits */
15781    false,
15782    nir_type_invalid,
15783    NULL,
15784 };
15785 static const nir_search_expression replace247_0 = {
15786    { nir_search_value_expression, 0 },
15787    false,
15788    nir_op_ult,
15789    { &replace247_0_0.value, &replace247_0_1.value },
15790    NULL,
15791 };
15792 
15793 static const nir_search_variable replace247_1 = {
15794    { nir_search_value_variable, 0 },
15795    0, /* value */
15796    false,
15797    nir_type_invalid,
15798    NULL,
15799 };
15800 
15801 static const nir_search_variable replace247_2_0 = {
15802    { nir_search_value_variable, 0 },
15803    0, /* value */
15804    false,
15805    nir_type_invalid,
15806    NULL,
15807 };
15808 
15809 static const nir_search_variable replace247_2_1 = {
15810    { nir_search_value_variable, 0 },
15811    1, /* offset */
15812    false,
15813    nir_type_invalid,
15814    NULL,
15815 };
15816 
15817 static const nir_search_variable replace247_2_2 = {
15818    { nir_search_value_variable, 0 },
15819    2, /* bits */
15820    false,
15821    nir_type_invalid,
15822    NULL,
15823 };
15824 static const nir_search_expression replace247_2 = {
15825    { nir_search_value_expression, 0 },
15826    false,
15827    nir_op_ubfe,
15828    { &replace247_2_0.value, &replace247_2_1.value, &replace247_2_2.value },
15829    NULL,
15830 };
15831 static const nir_search_expression replace247 = {
15832    { nir_search_value_expression, 0 },
15833    false,
15834    nir_op_bcsel,
15835    { &replace247_0.value, &replace247_1.value, &replace247_2.value },
15836    NULL,
15837 };
15838 
15839 static const struct transform nir_opt_algebraic_ubitfield_extract_xforms[] = {
15840    { &search247, &replace247.value, 26 },
15841 };
15842 
15843 static const nir_search_variable search115_0 = {
15844    { nir_search_value_variable, 0 },
15845    0, /* a */
15846    false,
15847    nir_type_invalid,
15848    NULL,
15849 };
15850 
15851 static const nir_search_variable search115_1 = {
15852    { nir_search_value_variable, 0 },
15853    1, /* b */
15854    false,
15855    nir_type_invalid,
15856    NULL,
15857 };
15858 static const nir_search_expression search115 = {
15859    { nir_search_value_expression, 0 },
15860    false,
15861    nir_op_slt,
15862    { &search115_0.value, &search115_1.value },
15863    NULL,
15864 };
15865 
15866 static const nir_search_variable replace115_0_0 = {
15867    { nir_search_value_variable, 0 },
15868    0, /* a */
15869    false,
15870    nir_type_invalid,
15871    NULL,
15872 };
15873 
15874 static const nir_search_variable replace115_0_1 = {
15875    { nir_search_value_variable, 0 },
15876    1, /* b */
15877    false,
15878    nir_type_invalid,
15879    NULL,
15880 };
15881 static const nir_search_expression replace115_0 = {
15882    { nir_search_value_expression, 0 },
15883    false,
15884    nir_op_flt,
15885    { &replace115_0_0.value, &replace115_0_1.value },
15886    NULL,
15887 };
15888 static const nir_search_expression replace115 = {
15889    { nir_search_value_expression, 0 },
15890    false,
15891    nir_op_b2f,
15892    { &replace115_0.value },
15893    NULL,
15894 };
15895 
15896 static const struct transform nir_opt_algebraic_slt_xforms[] = {
15897    { &search115, &replace115.value, 11 },
15898 };
15899 
15900 static const nir_search_constant search71_0 = {
15901    { nir_search_value_constant, 0 },
15902    nir_type_float, { 0x0 /* 0.0 */ },
15903 };
15904 
15905 static const nir_search_variable search71_1_0 = {
15906    { nir_search_value_variable, 0 },
15907    0, /* a */
15908    false,
15909    nir_type_invalid,
15910    NULL,
15911 };
15912 static const nir_search_expression search71_1 = {
15913    { nir_search_value_expression, 0 },
15914    false,
15915    nir_op_fabs,
15916    { &search71_1_0.value },
15917    NULL,
15918 };
15919 static const nir_search_expression search71 = {
15920    { nir_search_value_expression, 0 },
15921    false,
15922    nir_op_flt,
15923    { &search71_0.value, &search71_1.value },
15924    NULL,
15925 };
15926 
15927 static const nir_search_variable replace71_0 = {
15928    { nir_search_value_variable, 0 },
15929    0, /* a */
15930    false,
15931    nir_type_invalid,
15932    NULL,
15933 };
15934 
15935 static const nir_search_constant replace71_1 = {
15936    { nir_search_value_constant, 0 },
15937    nir_type_float, { 0x0 /* 0.0 */ },
15938 };
15939 static const nir_search_expression replace71 = {
15940    { nir_search_value_expression, 0 },
15941    false,
15942    nir_op_fne,
15943    { &replace71_0.value, &replace71_1.value },
15944    NULL,
15945 };
15946 
15947 static const nir_search_variable search72_0_0 = {
15948    { nir_search_value_variable, 0 },
15949    0, /* a */
15950    false,
15951    nir_type_invalid,
15952    NULL,
15953 };
15954 
15955 static const nir_search_variable search72_0_1_0 = {
15956    { nir_search_value_variable, 0 },
15957    1, /* b */
15958    false,
15959    nir_type_invalid,
15960    NULL,
15961 };
15962 static const nir_search_expression search72_0_1 = {
15963    { nir_search_value_expression, 0 },
15964    false,
15965    nir_op_fneg,
15966    { &search72_0_1_0.value },
15967    NULL,
15968 };
15969 static const nir_search_expression search72_0 = {
15970    { nir_search_value_expression, 0 },
15971    false,
15972    nir_op_fadd,
15973    { &search72_0_0.value, &search72_0_1.value },
15974    (is_used_once),
15975 };
15976 
15977 static const nir_search_constant search72_1 = {
15978    { nir_search_value_constant, 0 },
15979    nir_type_float, { 0x0 /* 0.0 */ },
15980 };
15981 static const nir_search_expression search72 = {
15982    { nir_search_value_expression, 0 },
15983    false,
15984    nir_op_flt,
15985    { &search72_0.value, &search72_1.value },
15986    (is_not_used_by_conditional),
15987 };
15988 
15989 static const nir_search_variable replace72_0 = {
15990    { nir_search_value_variable, 0 },
15991    0, /* a */
15992    false,
15993    nir_type_invalid,
15994    NULL,
15995 };
15996 
15997 static const nir_search_variable replace72_1 = {
15998    { nir_search_value_variable, 0 },
15999    1, /* b */
16000    false,
16001    nir_type_invalid,
16002    NULL,
16003 };
16004 static const nir_search_expression replace72 = {
16005    { nir_search_value_expression, 0 },
16006    false,
16007    nir_op_flt,
16008    { &replace72_0.value, &replace72_1.value },
16009    NULL,
16010 };
16011 
16012 static const nir_search_variable search126_0_0_0 = {
16013    { nir_search_value_variable, 0 },
16014    0, /* a */
16015    false,
16016    nir_type_invalid,
16017    NULL,
16018 };
16019 static const nir_search_expression search126_0_0 = {
16020    { nir_search_value_expression, 0 },
16021    false,
16022    nir_op_b2f,
16023    { &search126_0_0_0.value },
16024    NULL,
16025 };
16026 static const nir_search_expression search126_0 = {
16027    { nir_search_value_expression, 0 },
16028    false,
16029    nir_op_fneg,
16030    { &search126_0_0.value },
16031    NULL,
16032 };
16033 
16034 static const nir_search_constant search126_1 = {
16035    { nir_search_value_constant, 0 },
16036    nir_type_int, { 0x0 /* 0 */ },
16037 };
16038 static const nir_search_expression search126 = {
16039    { nir_search_value_expression, 0 },
16040    false,
16041    nir_op_flt,
16042    { &search126_0.value, &search126_1.value },
16043    NULL,
16044 };
16045 
16046 static const nir_search_variable replace126 = {
16047    { nir_search_value_variable, 0 },
16048    0, /* a */
16049    false,
16050    nir_type_invalid,
16051    NULL,
16052 };
16053 
16054 static const nir_search_constant search127_0_0 = {
16055    { nir_search_value_constant, 0 },
16056    nir_type_float, { 0x0 /* 0.0 */ },
16057 };
16058 
16059 static const nir_search_variable search127_0_1_0 = {
16060    { nir_search_value_variable, 0 },
16061    0, /* a */
16062    false,
16063    nir_type_invalid,
16064    NULL,
16065 };
16066 static const nir_search_expression search127_0_1 = {
16067    { nir_search_value_expression, 0 },
16068    false,
16069    nir_op_b2f,
16070    { &search127_0_1_0.value },
16071    NULL,
16072 };
16073 static const nir_search_expression search127_0 = {
16074    { nir_search_value_expression, 0 },
16075    false,
16076    nir_op_fsub,
16077    { &search127_0_0.value, &search127_0_1.value },
16078    NULL,
16079 };
16080 
16081 static const nir_search_constant search127_1 = {
16082    { nir_search_value_constant, 0 },
16083    nir_type_int, { 0x0 /* 0 */ },
16084 };
16085 static const nir_search_expression search127 = {
16086    { nir_search_value_expression, 0 },
16087    false,
16088    nir_op_flt,
16089    { &search127_0.value, &search127_1.value },
16090    NULL,
16091 };
16092 
16093 static const nir_search_variable replace127 = {
16094    { nir_search_value_variable, 0 },
16095    0, /* a */
16096    false,
16097    nir_type_invalid,
16098    NULL,
16099 };
16100 
16101 static const nir_search_variable search269_0_0 = {
16102    { nir_search_value_variable, 0 },
16103    0, /* a */
16104    false,
16105    nir_type_invalid,
16106    NULL,
16107 };
16108 
16109 static const nir_search_variable search269_0_1 = {
16110    { nir_search_value_variable, 0 },
16111    1, /* b */
16112    true,
16113    nir_type_invalid,
16114    NULL,
16115 };
16116 
16117 static const nir_search_variable search269_0_2 = {
16118    { nir_search_value_variable, 0 },
16119    2, /* c */
16120    true,
16121    nir_type_invalid,
16122    NULL,
16123 };
16124 static const nir_search_expression search269_0 = {
16125    { nir_search_value_expression, 0 },
16126    false,
16127    nir_op_bcsel,
16128    { &search269_0_0.value, &search269_0_1.value, &search269_0_2.value },
16129    NULL,
16130 };
16131 
16132 static const nir_search_variable search269_1 = {
16133    { nir_search_value_variable, 0 },
16134    3, /* d */
16135    true,
16136    nir_type_invalid,
16137    NULL,
16138 };
16139 static const nir_search_expression search269 = {
16140    { nir_search_value_expression, 0 },
16141    false,
16142    nir_op_flt,
16143    { &search269_0.value, &search269_1.value },
16144    NULL,
16145 };
16146 
16147 static const nir_search_variable replace269_0 = {
16148    { nir_search_value_variable, 0 },
16149    0, /* a */
16150    false,
16151    nir_type_invalid,
16152    NULL,
16153 };
16154 
16155 static const nir_search_variable replace269_1_0 = {
16156    { nir_search_value_variable, 0 },
16157    1, /* b */
16158    false,
16159    nir_type_invalid,
16160    NULL,
16161 };
16162 
16163 static const nir_search_variable replace269_1_1 = {
16164    { nir_search_value_variable, 0 },
16165    3, /* d */
16166    false,
16167    nir_type_invalid,
16168    NULL,
16169 };
16170 static const nir_search_expression replace269_1 = {
16171    { nir_search_value_expression, 0 },
16172    false,
16173    nir_op_flt,
16174    { &replace269_1_0.value, &replace269_1_1.value },
16175    NULL,
16176 };
16177 
16178 static const nir_search_variable replace269_2_0 = {
16179    { nir_search_value_variable, 0 },
16180    2, /* c */
16181    false,
16182    nir_type_invalid,
16183    NULL,
16184 };
16185 
16186 static const nir_search_variable replace269_2_1 = {
16187    { nir_search_value_variable, 0 },
16188    3, /* d */
16189    false,
16190    nir_type_invalid,
16191    NULL,
16192 };
16193 static const nir_search_expression replace269_2 = {
16194    { nir_search_value_expression, 0 },
16195    false,
16196    nir_op_flt,
16197    { &replace269_2_0.value, &replace269_2_1.value },
16198    NULL,
16199 };
16200 static const nir_search_expression replace269 = {
16201    { nir_search_value_expression, 0 },
16202    false,
16203    nir_op_bcsel,
16204    { &replace269_0.value, &replace269_1.value, &replace269_2.value },
16205    NULL,
16206 };
16207 
16208 static const nir_search_variable search270_0 = {
16209    { nir_search_value_variable, 0 },
16210    0, /* d */
16211    true,
16212    nir_type_invalid,
16213    NULL,
16214 };
16215 
16216 static const nir_search_variable search270_1_0 = {
16217    { nir_search_value_variable, 0 },
16218    1, /* a */
16219    false,
16220    nir_type_invalid,
16221    NULL,
16222 };
16223 
16224 static const nir_search_variable search270_1_1 = {
16225    { nir_search_value_variable, 0 },
16226    2, /* b */
16227    true,
16228    nir_type_invalid,
16229    NULL,
16230 };
16231 
16232 static const nir_search_variable search270_1_2 = {
16233    { nir_search_value_variable, 0 },
16234    3, /* c */
16235    true,
16236    nir_type_invalid,
16237    NULL,
16238 };
16239 static const nir_search_expression search270_1 = {
16240    { nir_search_value_expression, 0 },
16241    false,
16242    nir_op_bcsel,
16243    { &search270_1_0.value, &search270_1_1.value, &search270_1_2.value },
16244    NULL,
16245 };
16246 static const nir_search_expression search270 = {
16247    { nir_search_value_expression, 0 },
16248    false,
16249    nir_op_flt,
16250    { &search270_0.value, &search270_1.value },
16251    NULL,
16252 };
16253 
16254 static const nir_search_variable replace270_0 = {
16255    { nir_search_value_variable, 0 },
16256    1, /* a */
16257    false,
16258    nir_type_invalid,
16259    NULL,
16260 };
16261 
16262 static const nir_search_variable replace270_1_0 = {
16263    { nir_search_value_variable, 0 },
16264    0, /* d */
16265    false,
16266    nir_type_invalid,
16267    NULL,
16268 };
16269 
16270 static const nir_search_variable replace270_1_1 = {
16271    { nir_search_value_variable, 0 },
16272    2, /* b */
16273    false,
16274    nir_type_invalid,
16275    NULL,
16276 };
16277 static const nir_search_expression replace270_1 = {
16278    { nir_search_value_expression, 0 },
16279    false,
16280    nir_op_flt,
16281    { &replace270_1_0.value, &replace270_1_1.value },
16282    NULL,
16283 };
16284 
16285 static const nir_search_variable replace270_2_0 = {
16286    { nir_search_value_variable, 0 },
16287    0, /* d */
16288    false,
16289    nir_type_invalid,
16290    NULL,
16291 };
16292 
16293 static const nir_search_variable replace270_2_1 = {
16294    { nir_search_value_variable, 0 },
16295    3, /* c */
16296    false,
16297    nir_type_invalid,
16298    NULL,
16299 };
16300 static const nir_search_expression replace270_2 = {
16301    { nir_search_value_expression, 0 },
16302    false,
16303    nir_op_flt,
16304    { &replace270_2_0.value, &replace270_2_1.value },
16305    NULL,
16306 };
16307 static const nir_search_expression replace270 = {
16308    { nir_search_value_expression, 0 },
16309    false,
16310    nir_op_bcsel,
16311    { &replace270_0.value, &replace270_1.value, &replace270_2.value },
16312    NULL,
16313 };
16314 
16315 static const struct transform nir_opt_algebraic_flt_xforms[] = {
16316    { &search71, &replace71.value, 0 },
16317    { &search72, &replace72.value, 0 },
16318    { &search126, &replace126.value, 0 },
16319    { &search127, &replace127.value, 0 },
16320    { &search269, &replace269.value, 0 },
16321    { &search270, &replace270.value, 0 },
16322 };
16323 
16324 static const nir_search_variable search132_0 = {
16325    { nir_search_value_variable, 0 },
16326    0, /* a */
16327    false,
16328    nir_type_invalid,
16329    NULL,
16330 };
16331 
16332 static const nir_search_variable search132_1 = {
16333    { nir_search_value_variable, 0 },
16334    0, /* a */
16335    false,
16336    nir_type_invalid,
16337    NULL,
16338 };
16339 static const nir_search_expression search132 = {
16340    { nir_search_value_expression, 0 },
16341    false,
16342    nir_op_ult,
16343    { &search132_0.value, &search132_1.value },
16344    NULL,
16345 };
16346 
16347 static const nir_search_constant replace132 = {
16348    { nir_search_value_constant, 32 },
16349    nir_type_bool32, { NIR_FALSE /* False */ },
16350 };
16351 
16352 static const nir_search_variable search285_0_0 = {
16353    { nir_search_value_variable, 0 },
16354    0, /* a */
16355    false,
16356    nir_type_invalid,
16357    NULL,
16358 };
16359 
16360 static const nir_search_variable search285_0_1 = {
16361    { nir_search_value_variable, 0 },
16362    1, /* b */
16363    true,
16364    nir_type_invalid,
16365    NULL,
16366 };
16367 
16368 static const nir_search_variable search285_0_2 = {
16369    { nir_search_value_variable, 0 },
16370    2, /* c */
16371    true,
16372    nir_type_invalid,
16373    NULL,
16374 };
16375 static const nir_search_expression search285_0 = {
16376    { nir_search_value_expression, 0 },
16377    false,
16378    nir_op_bcsel,
16379    { &search285_0_0.value, &search285_0_1.value, &search285_0_2.value },
16380    NULL,
16381 };
16382 
16383 static const nir_search_variable search285_1 = {
16384    { nir_search_value_variable, 0 },
16385    3, /* d */
16386    true,
16387    nir_type_invalid,
16388    NULL,
16389 };
16390 static const nir_search_expression search285 = {
16391    { nir_search_value_expression, 0 },
16392    false,
16393    nir_op_ult,
16394    { &search285_0.value, &search285_1.value },
16395    NULL,
16396 };
16397 
16398 static const nir_search_variable replace285_0 = {
16399    { nir_search_value_variable, 0 },
16400    0, /* a */
16401    false,
16402    nir_type_invalid,
16403    NULL,
16404 };
16405 
16406 static const nir_search_variable replace285_1_0 = {
16407    { nir_search_value_variable, 0 },
16408    1, /* b */
16409    false,
16410    nir_type_invalid,
16411    NULL,
16412 };
16413 
16414 static const nir_search_variable replace285_1_1 = {
16415    { nir_search_value_variable, 0 },
16416    3, /* d */
16417    false,
16418    nir_type_invalid,
16419    NULL,
16420 };
16421 static const nir_search_expression replace285_1 = {
16422    { nir_search_value_expression, 0 },
16423    false,
16424    nir_op_ult,
16425    { &replace285_1_0.value, &replace285_1_1.value },
16426    NULL,
16427 };
16428 
16429 static const nir_search_variable replace285_2_0 = {
16430    { nir_search_value_variable, 0 },
16431    2, /* c */
16432    false,
16433    nir_type_invalid,
16434    NULL,
16435 };
16436 
16437 static const nir_search_variable replace285_2_1 = {
16438    { nir_search_value_variable, 0 },
16439    3, /* d */
16440    false,
16441    nir_type_invalid,
16442    NULL,
16443 };
16444 static const nir_search_expression replace285_2 = {
16445    { nir_search_value_expression, 0 },
16446    false,
16447    nir_op_ult,
16448    { &replace285_2_0.value, &replace285_2_1.value },
16449    NULL,
16450 };
16451 static const nir_search_expression replace285 = {
16452    { nir_search_value_expression, 0 },
16453    false,
16454    nir_op_bcsel,
16455    { &replace285_0.value, &replace285_1.value, &replace285_2.value },
16456    NULL,
16457 };
16458 
16459 static const nir_search_variable search286_0 = {
16460    { nir_search_value_variable, 0 },
16461    0, /* d */
16462    true,
16463    nir_type_invalid,
16464    NULL,
16465 };
16466 
16467 static const nir_search_variable search286_1_0 = {
16468    { nir_search_value_variable, 0 },
16469    1, /* a */
16470    false,
16471    nir_type_invalid,
16472    NULL,
16473 };
16474 
16475 static const nir_search_variable search286_1_1 = {
16476    { nir_search_value_variable, 0 },
16477    2, /* b */
16478    true,
16479    nir_type_invalid,
16480    NULL,
16481 };
16482 
16483 static const nir_search_variable search286_1_2 = {
16484    { nir_search_value_variable, 0 },
16485    3, /* c */
16486    true,
16487    nir_type_invalid,
16488    NULL,
16489 };
16490 static const nir_search_expression search286_1 = {
16491    { nir_search_value_expression, 0 },
16492    false,
16493    nir_op_bcsel,
16494    { &search286_1_0.value, &search286_1_1.value, &search286_1_2.value },
16495    NULL,
16496 };
16497 static const nir_search_expression search286 = {
16498    { nir_search_value_expression, 0 },
16499    false,
16500    nir_op_ult,
16501    { &search286_0.value, &search286_1.value },
16502    NULL,
16503 };
16504 
16505 static const nir_search_variable replace286_0 = {
16506    { nir_search_value_variable, 0 },
16507    1, /* a */
16508    false,
16509    nir_type_invalid,
16510    NULL,
16511 };
16512 
16513 static const nir_search_variable replace286_1_0 = {
16514    { nir_search_value_variable, 0 },
16515    0, /* d */
16516    false,
16517    nir_type_invalid,
16518    NULL,
16519 };
16520 
16521 static const nir_search_variable replace286_1_1 = {
16522    { nir_search_value_variable, 0 },
16523    2, /* b */
16524    false,
16525    nir_type_invalid,
16526    NULL,
16527 };
16528 static const nir_search_expression replace286_1 = {
16529    { nir_search_value_expression, 0 },
16530    false,
16531    nir_op_ult,
16532    { &replace286_1_0.value, &replace286_1_1.value },
16533    NULL,
16534 };
16535 
16536 static const nir_search_variable replace286_2_0 = {
16537    { nir_search_value_variable, 0 },
16538    0, /* d */
16539    false,
16540    nir_type_invalid,
16541    NULL,
16542 };
16543 
16544 static const nir_search_variable replace286_2_1 = {
16545    { nir_search_value_variable, 0 },
16546    3, /* c */
16547    false,
16548    nir_type_invalid,
16549    NULL,
16550 };
16551 static const nir_search_expression replace286_2 = {
16552    { nir_search_value_expression, 0 },
16553    false,
16554    nir_op_ult,
16555    { &replace286_2_0.value, &replace286_2_1.value },
16556    NULL,
16557 };
16558 static const nir_search_expression replace286 = {
16559    { nir_search_value_expression, 0 },
16560    false,
16561    nir_op_bcsel,
16562    { &replace286_0.value, &replace286_1.value, &replace286_2.value },
16563    NULL,
16564 };
16565 
16566 static const struct transform nir_opt_algebraic_ult_xforms[] = {
16567    { &search132, &replace132.value, 0 },
16568    { &search285, &replace285.value, 0 },
16569    { &search286, &replace286.value, 0 },
16570 };
16571 
16572 static const nir_search_variable search196_0_0 = {
16573    { nir_search_value_variable, 0 },
16574    0, /* a */
16575    false,
16576    nir_type_invalid,
16577    NULL,
16578 };
16579 static const nir_search_expression search196_0 = {
16580    { nir_search_value_expression, 0 },
16581    false,
16582    nir_op_ftrunc,
16583    { &search196_0_0.value },
16584    NULL,
16585 };
16586 static const nir_search_expression search196 = {
16587    { nir_search_value_expression, 0 },
16588    false,
16589    nir_op_f2i32,
16590    { &search196_0.value },
16591    NULL,
16592 };
16593 
16594 static const nir_search_variable replace196_0 = {
16595    { nir_search_value_variable, 0 },
16596    0, /* a */
16597    false,
16598    nir_type_invalid,
16599    NULL,
16600 };
16601 static const nir_search_expression replace196 = {
16602    { nir_search_value_expression, 0 },
16603    false,
16604    nir_op_f2i32,
16605    { &replace196_0.value },
16606    NULL,
16607 };
16608 
16609 static const struct transform nir_opt_algebraic_f2i32_xforms[] = {
16610    { &search196, &replace196.value, 0 },
16611 };
16612 
16613 static const nir_search_variable search10_0_0 = {
16614    { nir_search_value_variable, 0 },
16615    0, /* a */
16616    false,
16617    nir_type_invalid,
16618    NULL,
16619 };
16620 static const nir_search_expression search10_0 = {
16621    { nir_search_value_expression, 0 },
16622    false,
16623    nir_op_fneg,
16624    { &search10_0_0.value },
16625    NULL,
16626 };
16627 static const nir_search_expression search10 = {
16628    { nir_search_value_expression, 0 },
16629    false,
16630    nir_op_fneg,
16631    { &search10_0.value },
16632    NULL,
16633 };
16634 
16635 static const nir_search_variable replace10 = {
16636    { nir_search_value_variable, 0 },
16637    0, /* a */
16638    false,
16639    nir_type_invalid,
16640    NULL,
16641 };
16642 
16643 static const nir_search_variable search217_0 = {
16644    { nir_search_value_variable, 0 },
16645    0, /* a */
16646    false,
16647    nir_type_invalid,
16648    NULL,
16649 };
16650 static const nir_search_expression search217 = {
16651    { nir_search_value_expression, 0 },
16652    false,
16653    nir_op_fneg,
16654    { &search217_0.value },
16655    NULL,
16656 };
16657 
16658 static const nir_search_constant replace217_0 = {
16659    { nir_search_value_constant, 0 },
16660    nir_type_float, { 0x0 /* 0.0 */ },
16661 };
16662 
16663 static const nir_search_variable replace217_1 = {
16664    { nir_search_value_variable, 0 },
16665    0, /* a */
16666    false,
16667    nir_type_invalid,
16668    NULL,
16669 };
16670 static const nir_search_expression replace217 = {
16671    { nir_search_value_expression, 0 },
16672    false,
16673    nir_op_fsub,
16674    { &replace217_0.value, &replace217_1.value },
16675    NULL,
16676 };
16677 
16678 static const struct transform nir_opt_algebraic_fneg_xforms[] = {
16679    { &search10, &replace10.value, 0 },
16680    { &search217, &replace217.value, 20 },
16681 };
16682 
16683 static const nir_search_variable search211_0 = {
16684    { nir_search_value_variable, 0 },
16685    0, /* a */
16686    false,
16687    nir_type_invalid,
16688    NULL,
16689 };
16690 
16691 static const nir_search_constant search211_1_0 = {
16692    { nir_search_value_constant, 0 },
16693    nir_type_float, { 0x0 /* 0.0 */ },
16694 };
16695 
16696 static const nir_search_variable search211_1_1 = {
16697    { nir_search_value_variable, 0 },
16698    1, /* b */
16699    false,
16700    nir_type_invalid,
16701    NULL,
16702 };
16703 static const nir_search_expression search211_1 = {
16704    { nir_search_value_expression, 0 },
16705    false,
16706    nir_op_fsub,
16707    { &search211_1_0.value, &search211_1_1.value },
16708    NULL,
16709 };
16710 static const nir_search_expression search211 = {
16711    { nir_search_value_expression, 0 },
16712    true,
16713    nir_op_fsub,
16714    { &search211_0.value, &search211_1.value },
16715    NULL,
16716 };
16717 
16718 static const nir_search_variable replace211_0 = {
16719    { nir_search_value_variable, 0 },
16720    0, /* a */
16721    false,
16722    nir_type_invalid,
16723    NULL,
16724 };
16725 
16726 static const nir_search_variable replace211_1 = {
16727    { nir_search_value_variable, 0 },
16728    1, /* b */
16729    false,
16730    nir_type_invalid,
16731    NULL,
16732 };
16733 static const nir_search_expression replace211 = {
16734    { nir_search_value_expression, 0 },
16735    false,
16736    nir_op_fadd,
16737    { &replace211_0.value, &replace211_1.value },
16738    NULL,
16739 };
16740 
16741 static const nir_search_variable search215_0 = {
16742    { nir_search_value_variable, 0 },
16743    0, /* a */
16744    false,
16745    nir_type_invalid,
16746    NULL,
16747 };
16748 
16749 static const nir_search_variable search215_1 = {
16750    { nir_search_value_variable, 0 },
16751    1, /* b */
16752    false,
16753    nir_type_invalid,
16754    NULL,
16755 };
16756 static const nir_search_expression search215 = {
16757    { nir_search_value_expression, 0 },
16758    false,
16759    nir_op_fsub,
16760    { &search215_0.value, &search215_1.value },
16761    NULL,
16762 };
16763 
16764 static const nir_search_variable replace215_0 = {
16765    { nir_search_value_variable, 0 },
16766    0, /* a */
16767    false,
16768    nir_type_invalid,
16769    NULL,
16770 };
16771 
16772 static const nir_search_variable replace215_1_0 = {
16773    { nir_search_value_variable, 0 },
16774    1, /* b */
16775    false,
16776    nir_type_invalid,
16777    NULL,
16778 };
16779 static const nir_search_expression replace215_1 = {
16780    { nir_search_value_expression, 0 },
16781    false,
16782    nir_op_fneg,
16783    { &replace215_1_0.value },
16784    NULL,
16785 };
16786 static const nir_search_expression replace215 = {
16787    { nir_search_value_expression, 0 },
16788    false,
16789    nir_op_fadd,
16790    { &replace215_0.value, &replace215_1.value },
16791    NULL,
16792 };
16793 
16794 static const struct transform nir_opt_algebraic_fsub_xforms[] = {
16795    { &search211, &replace211.value, 0 },
16796    { &search215, &replace215.value, 19 },
16797 };
16798 
16799 static const nir_search_variable search119_0_0 = {
16800    { nir_search_value_variable, 0 },
16801    0, /* a */
16802    false,
16803    nir_type_invalid,
16804    NULL,
16805 };
16806 static const nir_search_expression search119_0 = {
16807    { nir_search_value_expression, 0 },
16808    false,
16809    nir_op_fneg,
16810    { &search119_0_0.value },
16811    NULL,
16812 };
16813 
16814 static const nir_search_variable search119_1 = {
16815    { nir_search_value_variable, 0 },
16816    0, /* a */
16817    false,
16818    nir_type_invalid,
16819    NULL,
16820 };
16821 static const nir_search_expression search119 = {
16822    { nir_search_value_expression, 0 },
16823    false,
16824    nir_op_fne,
16825    { &search119_0.value, &search119_1.value },
16826    NULL,
16827 };
16828 
16829 static const nir_search_variable replace119_0 = {
16830    { nir_search_value_variable, 0 },
16831    0, /* a */
16832    false,
16833    nir_type_invalid,
16834    NULL,
16835 };
16836 
16837 static const nir_search_constant replace119_1 = {
16838    { nir_search_value_constant, 0 },
16839    nir_type_float, { 0x0 /* 0.0 */ },
16840 };
16841 static const nir_search_expression replace119 = {
16842    { nir_search_value_expression, 0 },
16843    false,
16844    nir_op_fne,
16845    { &replace119_0.value, &replace119_1.value },
16846    NULL,
16847 };
16848 
16849 static const nir_search_variable search275_0_0 = {
16850    { nir_search_value_variable, 0 },
16851    0, /* a */
16852    false,
16853    nir_type_invalid,
16854    NULL,
16855 };
16856 
16857 static const nir_search_variable search275_0_1 = {
16858    { nir_search_value_variable, 0 },
16859    1, /* b */
16860    true,
16861    nir_type_invalid,
16862    NULL,
16863 };
16864 
16865 static const nir_search_variable search275_0_2 = {
16866    { nir_search_value_variable, 0 },
16867    2, /* c */
16868    true,
16869    nir_type_invalid,
16870    NULL,
16871 };
16872 static const nir_search_expression search275_0 = {
16873    { nir_search_value_expression, 0 },
16874    false,
16875    nir_op_bcsel,
16876    { &search275_0_0.value, &search275_0_1.value, &search275_0_2.value },
16877    NULL,
16878 };
16879 
16880 static const nir_search_variable search275_1 = {
16881    { nir_search_value_variable, 0 },
16882    3, /* d */
16883    true,
16884    nir_type_invalid,
16885    NULL,
16886 };
16887 static const nir_search_expression search275 = {
16888    { nir_search_value_expression, 0 },
16889    false,
16890    nir_op_fne,
16891    { &search275_0.value, &search275_1.value },
16892    NULL,
16893 };
16894 
16895 static const nir_search_variable replace275_0 = {
16896    { nir_search_value_variable, 0 },
16897    0, /* a */
16898    false,
16899    nir_type_invalid,
16900    NULL,
16901 };
16902 
16903 static const nir_search_variable replace275_1_0 = {
16904    { nir_search_value_variable, 0 },
16905    1, /* b */
16906    false,
16907    nir_type_invalid,
16908    NULL,
16909 };
16910 
16911 static const nir_search_variable replace275_1_1 = {
16912    { nir_search_value_variable, 0 },
16913    3, /* d */
16914    false,
16915    nir_type_invalid,
16916    NULL,
16917 };
16918 static const nir_search_expression replace275_1 = {
16919    { nir_search_value_expression, 0 },
16920    false,
16921    nir_op_fne,
16922    { &replace275_1_0.value, &replace275_1_1.value },
16923    NULL,
16924 };
16925 
16926 static const nir_search_variable replace275_2_0 = {
16927    { nir_search_value_variable, 0 },
16928    2, /* c */
16929    false,
16930    nir_type_invalid,
16931    NULL,
16932 };
16933 
16934 static const nir_search_variable replace275_2_1 = {
16935    { nir_search_value_variable, 0 },
16936    3, /* d */
16937    false,
16938    nir_type_invalid,
16939    NULL,
16940 };
16941 static const nir_search_expression replace275_2 = {
16942    { nir_search_value_expression, 0 },
16943    false,
16944    nir_op_fne,
16945    { &replace275_2_0.value, &replace275_2_1.value },
16946    NULL,
16947 };
16948 static const nir_search_expression replace275 = {
16949    { nir_search_value_expression, 0 },
16950    false,
16951    nir_op_bcsel,
16952    { &replace275_0.value, &replace275_1.value, &replace275_2.value },
16953    NULL,
16954 };
16955 
16956 static const nir_search_variable search276_0 = {
16957    { nir_search_value_variable, 0 },
16958    0, /* d */
16959    true,
16960    nir_type_invalid,
16961    NULL,
16962 };
16963 
16964 static const nir_search_variable search276_1_0 = {
16965    { nir_search_value_variable, 0 },
16966    1, /* a */
16967    false,
16968    nir_type_invalid,
16969    NULL,
16970 };
16971 
16972 static const nir_search_variable search276_1_1 = {
16973    { nir_search_value_variable, 0 },
16974    2, /* b */
16975    true,
16976    nir_type_invalid,
16977    NULL,
16978 };
16979 
16980 static const nir_search_variable search276_1_2 = {
16981    { nir_search_value_variable, 0 },
16982    3, /* c */
16983    true,
16984    nir_type_invalid,
16985    NULL,
16986 };
16987 static const nir_search_expression search276_1 = {
16988    { nir_search_value_expression, 0 },
16989    false,
16990    nir_op_bcsel,
16991    { &search276_1_0.value, &search276_1_1.value, &search276_1_2.value },
16992    NULL,
16993 };
16994 static const nir_search_expression search276 = {
16995    { nir_search_value_expression, 0 },
16996    false,
16997    nir_op_fne,
16998    { &search276_0.value, &search276_1.value },
16999    NULL,
17000 };
17001 
17002 static const nir_search_variable replace276_0 = {
17003    { nir_search_value_variable, 0 },
17004    1, /* a */
17005    false,
17006    nir_type_invalid,
17007    NULL,
17008 };
17009 
17010 static const nir_search_variable replace276_1_0 = {
17011    { nir_search_value_variable, 0 },
17012    0, /* d */
17013    false,
17014    nir_type_invalid,
17015    NULL,
17016 };
17017 
17018 static const nir_search_variable replace276_1_1 = {
17019    { nir_search_value_variable, 0 },
17020    2, /* b */
17021    false,
17022    nir_type_invalid,
17023    NULL,
17024 };
17025 static const nir_search_expression replace276_1 = {
17026    { nir_search_value_expression, 0 },
17027    false,
17028    nir_op_fne,
17029    { &replace276_1_0.value, &replace276_1_1.value },
17030    NULL,
17031 };
17032 
17033 static const nir_search_variable replace276_2_0 = {
17034    { nir_search_value_variable, 0 },
17035    0, /* d */
17036    false,
17037    nir_type_invalid,
17038    NULL,
17039 };
17040 
17041 static const nir_search_variable replace276_2_1 = {
17042    { nir_search_value_variable, 0 },
17043    3, /* c */
17044    false,
17045    nir_type_invalid,
17046    NULL,
17047 };
17048 static const nir_search_expression replace276_2 = {
17049    { nir_search_value_expression, 0 },
17050    false,
17051    nir_op_fne,
17052    { &replace276_2_0.value, &replace276_2_1.value },
17053    NULL,
17054 };
17055 static const nir_search_expression replace276 = {
17056    { nir_search_value_expression, 0 },
17057    false,
17058    nir_op_bcsel,
17059    { &replace276_0.value, &replace276_1.value, &replace276_2.value },
17060    NULL,
17061 };
17062 
17063 static const struct transform nir_opt_algebraic_fne_xforms[] = {
17064    { &search119, &replace119.value, 0 },
17065    { &search275, &replace275.value, 0 },
17066    { &search276, &replace276.value, 0 },
17067 };
17068 
17069 static const nir_search_variable search15_0_0 = {
17070    { nir_search_value_variable, 0 },
17071    0, /* a */
17072    false,
17073    nir_type_invalid,
17074    NULL,
17075 };
17076 static const nir_search_expression search15_0 = {
17077    { nir_search_value_expression, 0 },
17078    false,
17079    nir_op_iabs,
17080    { &search15_0_0.value },
17081    NULL,
17082 };
17083 static const nir_search_expression search15 = {
17084    { nir_search_value_expression, 0 },
17085    false,
17086    nir_op_iabs,
17087    { &search15_0.value },
17088    NULL,
17089 };
17090 
17091 static const nir_search_variable replace15_0 = {
17092    { nir_search_value_variable, 0 },
17093    0, /* a */
17094    false,
17095    nir_type_invalid,
17096    NULL,
17097 };
17098 static const nir_search_expression replace15 = {
17099    { nir_search_value_expression, 0 },
17100    false,
17101    nir_op_iabs,
17102    { &replace15_0.value },
17103    NULL,
17104 };
17105 
17106 static const nir_search_variable search16_0_0 = {
17107    { nir_search_value_variable, 0 },
17108    0, /* a */
17109    false,
17110    nir_type_invalid,
17111    NULL,
17112 };
17113 static const nir_search_expression search16_0 = {
17114    { nir_search_value_expression, 0 },
17115    false,
17116    nir_op_ineg,
17117    { &search16_0_0.value },
17118    NULL,
17119 };
17120 static const nir_search_expression search16 = {
17121    { nir_search_value_expression, 0 },
17122    false,
17123    nir_op_iabs,
17124    { &search16_0.value },
17125    NULL,
17126 };
17127 
17128 static const nir_search_variable replace16_0 = {
17129    { nir_search_value_variable, 0 },
17130    0, /* a */
17131    false,
17132    nir_type_invalid,
17133    NULL,
17134 };
17135 static const nir_search_expression replace16 = {
17136    { nir_search_value_expression, 0 },
17137    false,
17138    nir_op_iabs,
17139    { &replace16_0.value },
17140    NULL,
17141 };
17142 
17143 static const nir_search_variable search201_0_0 = {
17144    { nir_search_value_variable, 0 },
17145    0, /* a */
17146    false,
17147    nir_type_invalid,
17148    NULL,
17149 };
17150 static const nir_search_expression search201_0 = {
17151    { nir_search_value_expression, 0 },
17152    false,
17153    nir_op_b2i,
17154    { &search201_0_0.value },
17155    NULL,
17156 };
17157 static const nir_search_expression search201 = {
17158    { nir_search_value_expression, 0 },
17159    false,
17160    nir_op_iabs,
17161    { &search201_0.value },
17162    NULL,
17163 };
17164 
17165 static const nir_search_variable replace201_0 = {
17166    { nir_search_value_variable, 0 },
17167    0, /* a */
17168    false,
17169    nir_type_invalid,
17170    NULL,
17171 };
17172 static const nir_search_expression replace201 = {
17173    { nir_search_value_expression, 0 },
17174    false,
17175    nir_op_b2i,
17176    { &replace201_0.value },
17177    NULL,
17178 };
17179 
17180 static const nir_search_constant search222_0_0 = {
17181    { nir_search_value_constant, 0 },
17182    nir_type_int, { 0x0 /* 0 */ },
17183 };
17184 
17185 static const nir_search_variable search222_0_1 = {
17186    { nir_search_value_variable, 0 },
17187    0, /* a */
17188    false,
17189    nir_type_invalid,
17190    NULL,
17191 };
17192 static const nir_search_expression search222_0 = {
17193    { nir_search_value_expression, 0 },
17194    false,
17195    nir_op_isub,
17196    { &search222_0_0.value, &search222_0_1.value },
17197    NULL,
17198 };
17199 static const nir_search_expression search222 = {
17200    { nir_search_value_expression, 0 },
17201    false,
17202    nir_op_iabs,
17203    { &search222_0.value },
17204    NULL,
17205 };
17206 
17207 static const nir_search_variable replace222_0 = {
17208    { nir_search_value_variable, 0 },
17209    0, /* a */
17210    false,
17211    nir_type_invalid,
17212    NULL,
17213 };
17214 static const nir_search_expression replace222 = {
17215    { nir_search_value_expression, 0 },
17216    false,
17217    nir_op_iabs,
17218    { &replace222_0.value },
17219    NULL,
17220 };
17221 
17222 static const struct transform nir_opt_algebraic_iabs_xforms[] = {
17223    { &search15, &replace15.value, 0 },
17224    { &search16, &replace16.value, 0 },
17225    { &search201, &replace201.value, 0 },
17226    { &search222, &replace222.value, 0 },
17227 };
17228 
17229 static const nir_search_variable search257_0 = {
17230    { nir_search_value_variable, 0 },
17231    0, /* v */
17232    false,
17233    nir_type_invalid,
17234    NULL,
17235 };
17236 static const nir_search_expression search257 = {
17237    { nir_search_value_expression, 0 },
17238    false,
17239    nir_op_unpack_unorm_4x8,
17240    { &search257_0.value },
17241    NULL,
17242 };
17243 
17244 static const nir_search_variable replace257_0_0_0_0 = {
17245    { nir_search_value_variable, 0 },
17246    0, /* v */
17247    false,
17248    nir_type_invalid,
17249    NULL,
17250 };
17251 
17252 static const nir_search_constant replace257_0_0_0_1 = {
17253    { nir_search_value_constant, 0 },
17254    nir_type_int, { 0x0 /* 0 */ },
17255 };
17256 static const nir_search_expression replace257_0_0_0 = {
17257    { nir_search_value_expression, 0 },
17258    false,
17259    nir_op_extract_u8,
17260    { &replace257_0_0_0_0.value, &replace257_0_0_0_1.value },
17261    NULL,
17262 };
17263 
17264 static const nir_search_variable replace257_0_0_1_0 = {
17265    { nir_search_value_variable, 0 },
17266    0, /* v */
17267    false,
17268    nir_type_invalid,
17269    NULL,
17270 };
17271 
17272 static const nir_search_constant replace257_0_0_1_1 = {
17273    { nir_search_value_constant, 0 },
17274    nir_type_int, { 0x1 /* 1 */ },
17275 };
17276 static const nir_search_expression replace257_0_0_1 = {
17277    { nir_search_value_expression, 0 },
17278    false,
17279    nir_op_extract_u8,
17280    { &replace257_0_0_1_0.value, &replace257_0_0_1_1.value },
17281    NULL,
17282 };
17283 
17284 static const nir_search_variable replace257_0_0_2_0 = {
17285    { nir_search_value_variable, 0 },
17286    0, /* v */
17287    false,
17288    nir_type_invalid,
17289    NULL,
17290 };
17291 
17292 static const nir_search_constant replace257_0_0_2_1 = {
17293    { nir_search_value_constant, 0 },
17294    nir_type_int, { 0x2 /* 2 */ },
17295 };
17296 static const nir_search_expression replace257_0_0_2 = {
17297    { nir_search_value_expression, 0 },
17298    false,
17299    nir_op_extract_u8,
17300    { &replace257_0_0_2_0.value, &replace257_0_0_2_1.value },
17301    NULL,
17302 };
17303 
17304 static const nir_search_variable replace257_0_0_3_0 = {
17305    { nir_search_value_variable, 0 },
17306    0, /* v */
17307    false,
17308    nir_type_invalid,
17309    NULL,
17310 };
17311 
17312 static const nir_search_constant replace257_0_0_3_1 = {
17313    { nir_search_value_constant, 0 },
17314    nir_type_int, { 0x3 /* 3 */ },
17315 };
17316 static const nir_search_expression replace257_0_0_3 = {
17317    { nir_search_value_expression, 0 },
17318    false,
17319    nir_op_extract_u8,
17320    { &replace257_0_0_3_0.value, &replace257_0_0_3_1.value },
17321    NULL,
17322 };
17323 static const nir_search_expression replace257_0_0 = {
17324    { nir_search_value_expression, 0 },
17325    false,
17326    nir_op_vec4,
17327    { &replace257_0_0_0.value, &replace257_0_0_1.value, &replace257_0_0_2.value, &replace257_0_0_3.value },
17328    NULL,
17329 };
17330 static const nir_search_expression replace257_0 = {
17331    { nir_search_value_expression, 0 },
17332    false,
17333    nir_op_u2f32,
17334    { &replace257_0_0.value },
17335    NULL,
17336 };
17337 
17338 static const nir_search_constant replace257_1 = {
17339    { nir_search_value_constant, 0 },
17340    nir_type_float, { 0x406fe00000000000 /* 255.0 */ },
17341 };
17342 static const nir_search_expression replace257 = {
17343    { nir_search_value_expression, 0 },
17344    false,
17345    nir_op_fdiv,
17346    { &replace257_0.value, &replace257_1.value },
17347    NULL,
17348 };
17349 
17350 static const struct transform nir_opt_algebraic_unpack_unorm_4x8_xforms[] = {
17351    { &search257, &replace257.value, 34 },
17352 };
17353 
17354 static const nir_search_variable search79_0 = {
17355    { nir_search_value_variable, 0 },
17356    0, /* a */
17357    false,
17358    nir_type_invalid,
17359    NULL,
17360 };
17361 
17362 static const nir_search_variable search79_1 = {
17363    { nir_search_value_variable, 0 },
17364    0, /* a */
17365    false,
17366    nir_type_invalid,
17367    NULL,
17368 };
17369 static const nir_search_expression search79 = {
17370    { nir_search_value_expression, 0 },
17371    false,
17372    nir_op_fmin,
17373    { &search79_0.value, &search79_1.value },
17374    NULL,
17375 };
17376 
17377 static const nir_search_variable replace79 = {
17378    { nir_search_value_variable, 0 },
17379    0, /* a */
17380    false,
17381    nir_type_invalid,
17382    NULL,
17383 };
17384 
17385 static const nir_search_variable search85_0 = {
17386    { nir_search_value_variable, 0 },
17387    0, /* a */
17388    false,
17389    nir_type_invalid,
17390    NULL,
17391 };
17392 
17393 static const nir_search_variable search85_1_0 = {
17394    { nir_search_value_variable, 0 },
17395    0, /* a */
17396    false,
17397    nir_type_invalid,
17398    NULL,
17399 };
17400 static const nir_search_expression search85_1 = {
17401    { nir_search_value_expression, 0 },
17402    false,
17403    nir_op_fneg,
17404    { &search85_1_0.value },
17405    NULL,
17406 };
17407 static const nir_search_expression search85 = {
17408    { nir_search_value_expression, 0 },
17409    false,
17410    nir_op_fmin,
17411    { &search85_0.value, &search85_1.value },
17412    NULL,
17413 };
17414 
17415 static const nir_search_variable replace85_0_0 = {
17416    { nir_search_value_variable, 0 },
17417    0, /* a */
17418    false,
17419    nir_type_invalid,
17420    NULL,
17421 };
17422 static const nir_search_expression replace85_0 = {
17423    { nir_search_value_expression, 0 },
17424    false,
17425    nir_op_fabs,
17426    { &replace85_0_0.value },
17427    NULL,
17428 };
17429 static const nir_search_expression replace85 = {
17430    { nir_search_value_expression, 0 },
17431    false,
17432    nir_op_fneg,
17433    { &replace85_0.value },
17434    NULL,
17435 };
17436 
17437 static const nir_search_variable search87_0 = {
17438    { nir_search_value_variable, 0 },
17439    0, /* a */
17440    false,
17441    nir_type_invalid,
17442    NULL,
17443 };
17444 
17445 static const nir_search_variable search87_1_0_0 = {
17446    { nir_search_value_variable, 0 },
17447    0, /* a */
17448    false,
17449    nir_type_invalid,
17450    NULL,
17451 };
17452 static const nir_search_expression search87_1_0 = {
17453    { nir_search_value_expression, 0 },
17454    false,
17455    nir_op_fabs,
17456    { &search87_1_0_0.value },
17457    NULL,
17458 };
17459 static const nir_search_expression search87_1 = {
17460    { nir_search_value_expression, 0 },
17461    false,
17462    nir_op_fneg,
17463    { &search87_1_0.value },
17464    NULL,
17465 };
17466 static const nir_search_expression search87 = {
17467    { nir_search_value_expression, 0 },
17468    false,
17469    nir_op_fmin,
17470    { &search87_0.value, &search87_1.value },
17471    NULL,
17472 };
17473 
17474 static const nir_search_variable replace87_0_0 = {
17475    { nir_search_value_variable, 0 },
17476    0, /* a */
17477    false,
17478    nir_type_invalid,
17479    NULL,
17480 };
17481 static const nir_search_expression replace87_0 = {
17482    { nir_search_value_expression, 0 },
17483    false,
17484    nir_op_fabs,
17485    { &replace87_0_0.value },
17486    NULL,
17487 };
17488 static const nir_search_expression replace87 = {
17489    { nir_search_value_expression, 0 },
17490    false,
17491    nir_op_fneg,
17492    { &replace87_0.value },
17493    NULL,
17494 };
17495 
17496 static const nir_search_variable search89_0 = {
17497    { nir_search_value_variable, 0 },
17498    0, /* a */
17499    false,
17500    nir_type_invalid,
17501    NULL,
17502 };
17503 
17504 static const nir_search_variable search89_1_0 = {
17505    { nir_search_value_variable, 0 },
17506    0, /* a */
17507    false,
17508    nir_type_invalid,
17509    NULL,
17510 };
17511 static const nir_search_expression search89_1 = {
17512    { nir_search_value_expression, 0 },
17513    false,
17514    nir_op_fabs,
17515    { &search89_1_0.value },
17516    NULL,
17517 };
17518 static const nir_search_expression search89 = {
17519    { nir_search_value_expression, 0 },
17520    false,
17521    nir_op_fmin,
17522    { &search89_0.value, &search89_1.value },
17523    NULL,
17524 };
17525 
17526 static const nir_search_variable replace89 = {
17527    { nir_search_value_variable, 0 },
17528    0, /* a */
17529    false,
17530    nir_type_invalid,
17531    NULL,
17532 };
17533 
17534 static const nir_search_variable search97_0_0 = {
17535    { nir_search_value_variable, 0 },
17536    0, /* a */
17537    false,
17538    nir_type_invalid,
17539    NULL,
17540 };
17541 
17542 static const nir_search_constant search97_0_1 = {
17543    { nir_search_value_constant, 0 },
17544    nir_type_float, { 0x0 /* 0.0 */ },
17545 };
17546 static const nir_search_expression search97_0 = {
17547    { nir_search_value_expression, 0 },
17548    false,
17549    nir_op_fmax,
17550    { &search97_0_0.value, &search97_0_1.value },
17551    NULL,
17552 };
17553 
17554 static const nir_search_constant search97_1 = {
17555    { nir_search_value_constant, 0 },
17556    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
17557 };
17558 static const nir_search_expression search97 = {
17559    { nir_search_value_expression, 0 },
17560    true,
17561    nir_op_fmin,
17562    { &search97_0.value, &search97_1.value },
17563    NULL,
17564 };
17565 
17566 static const nir_search_variable replace97_0 = {
17567    { nir_search_value_variable, 0 },
17568    0, /* a */
17569    false,
17570    nir_type_invalid,
17571    NULL,
17572 };
17573 static const nir_search_expression replace97 = {
17574    { nir_search_value_expression, 0 },
17575    false,
17576    nir_op_fsat,
17577    { &replace97_0.value },
17578    NULL,
17579 };
17580 
17581 static const nir_search_variable search101_0_0_0_0 = {
17582    { nir_search_value_variable, 0 },
17583    0, /* a */
17584    false,
17585    nir_type_invalid,
17586    NULL,
17587 };
17588 
17589 static const nir_search_variable search101_0_0_0_1 = {
17590    { nir_search_value_variable, 0 },
17591    1, /* b */
17592    false,
17593    nir_type_invalid,
17594    NULL,
17595 };
17596 static const nir_search_expression search101_0_0_0 = {
17597    { nir_search_value_expression, 0 },
17598    false,
17599    nir_op_fmax,
17600    { &search101_0_0_0_0.value, &search101_0_0_0_1.value },
17601    NULL,
17602 };
17603 
17604 static const nir_search_variable search101_0_0_1 = {
17605    { nir_search_value_variable, 0 },
17606    2, /* c */
17607    false,
17608    nir_type_invalid,
17609    NULL,
17610 };
17611 static const nir_search_expression search101_0_0 = {
17612    { nir_search_value_expression, 0 },
17613    false,
17614    nir_op_fmin,
17615    { &search101_0_0_0.value, &search101_0_0_1.value },
17616    NULL,
17617 };
17618 
17619 static const nir_search_variable search101_0_1 = {
17620    { nir_search_value_variable, 0 },
17621    1, /* b */
17622    false,
17623    nir_type_invalid,
17624    NULL,
17625 };
17626 static const nir_search_expression search101_0 = {
17627    { nir_search_value_expression, 0 },
17628    false,
17629    nir_op_fmax,
17630    { &search101_0_0.value, &search101_0_1.value },
17631    NULL,
17632 };
17633 
17634 static const nir_search_variable search101_1 = {
17635    { nir_search_value_variable, 0 },
17636    2, /* c */
17637    false,
17638    nir_type_invalid,
17639    NULL,
17640 };
17641 static const nir_search_expression search101 = {
17642    { nir_search_value_expression, 0 },
17643    false,
17644    nir_op_fmin,
17645    { &search101_0.value, &search101_1.value },
17646    NULL,
17647 };
17648 
17649 static const nir_search_variable replace101_0_0 = {
17650    { nir_search_value_variable, 0 },
17651    0, /* a */
17652    false,
17653    nir_type_invalid,
17654    NULL,
17655 };
17656 
17657 static const nir_search_variable replace101_0_1 = {
17658    { nir_search_value_variable, 0 },
17659    1, /* b */
17660    false,
17661    nir_type_invalid,
17662    NULL,
17663 };
17664 static const nir_search_expression replace101_0 = {
17665    { nir_search_value_expression, 0 },
17666    false,
17667    nir_op_fmax,
17668    { &replace101_0_0.value, &replace101_0_1.value },
17669    NULL,
17670 };
17671 
17672 static const nir_search_variable replace101_1 = {
17673    { nir_search_value_variable, 0 },
17674    2, /* c */
17675    false,
17676    nir_type_invalid,
17677    NULL,
17678 };
17679 static const nir_search_expression replace101 = {
17680    { nir_search_value_expression, 0 },
17681    false,
17682    nir_op_fmin,
17683    { &replace101_0.value, &replace101_1.value },
17684    NULL,
17685 };
17686 
17687 static const nir_search_variable search105_0_0 = {
17688    { nir_search_value_variable, 0 },
17689    0, /* a */
17690    false,
17691    nir_type_invalid,
17692    NULL,
17693 };
17694 static const nir_search_expression search105_0 = {
17695    { nir_search_value_expression, 0 },
17696    false,
17697    nir_op_fsat,
17698    { &search105_0_0.value },
17699    NULL,
17700 };
17701 
17702 static const nir_search_variable search105_1 = {
17703    { nir_search_value_variable, 32 },
17704    1, /* b */
17705    true,
17706    nir_type_invalid,
17707    (is_zero_to_one),
17708 };
17709 static const nir_search_expression search105 = {
17710    { nir_search_value_expression, 0 },
17711    false,
17712    nir_op_fmin,
17713    { &search105_0.value, &search105_1.value },
17714    NULL,
17715 };
17716 
17717 static const nir_search_variable replace105_0_0 = {
17718    { nir_search_value_variable, 0 },
17719    0, /* a */
17720    false,
17721    nir_type_invalid,
17722    NULL,
17723 };
17724 
17725 static const nir_search_variable replace105_0_1 = {
17726    { nir_search_value_variable, 0 },
17727    1, /* b */
17728    false,
17729    nir_type_invalid,
17730    NULL,
17731 };
17732 static const nir_search_expression replace105_0 = {
17733    { nir_search_value_expression, 0 },
17734    false,
17735    nir_op_fmin,
17736    { &replace105_0_0.value, &replace105_0_1.value },
17737    NULL,
17738 };
17739 static const nir_search_expression replace105 = {
17740    { nir_search_value_expression, 0 },
17741    false,
17742    nir_op_fsat,
17743    { &replace105_0.value },
17744    NULL,
17745 };
17746 
17747 static const struct transform nir_opt_algebraic_fmin_xforms[] = {
17748    { &search79, &replace79.value, 0 },
17749    { &search85, &replace85.value, 0 },
17750    { &search87, &replace87.value, 0 },
17751    { &search89, &replace89.value, 0 },
17752    { &search97, &replace97.value, 9 },
17753    { &search101, &replace101.value, 0 },
17754    { &search105, &replace105.value, 0 },
17755 };
17756 
17757 static const nir_search_variable search131_0 = {
17758    { nir_search_value_variable, 0 },
17759    0, /* a */
17760    false,
17761    nir_type_invalid,
17762    NULL,
17763 };
17764 
17765 static const nir_search_variable search131_1 = {
17766    { nir_search_value_variable, 0 },
17767    0, /* a */
17768    false,
17769    nir_type_invalid,
17770    NULL,
17771 };
17772 static const nir_search_expression search131 = {
17773    { nir_search_value_expression, 0 },
17774    false,
17775    nir_op_ine,
17776    { &search131_0.value, &search131_1.value },
17777    NULL,
17778 };
17779 
17780 static const nir_search_constant replace131 = {
17781    { nir_search_value_constant, 32 },
17782    nir_type_bool32, { NIR_FALSE /* False */ },
17783 };
17784 
17785 static const nir_search_variable search181_0 = {
17786    { nir_search_value_variable, 32 },
17787    0, /* a */
17788    false,
17789    nir_type_bool32,
17790    NULL,
17791 };
17792 
17793 static const nir_search_constant search181_1 = {
17794    { nir_search_value_constant, 32 },
17795    nir_type_bool32, { NIR_TRUE /* True */ },
17796 };
17797 static const nir_search_expression search181 = {
17798    { nir_search_value_expression, 0 },
17799    false,
17800    nir_op_ine,
17801    { &search181_0.value, &search181_1.value },
17802    (is_not_used_by_if),
17803 };
17804 
17805 static const nir_search_variable replace181_0 = {
17806    { nir_search_value_variable, 0 },
17807    0, /* a */
17808    false,
17809    nir_type_invalid,
17810    NULL,
17811 };
17812 static const nir_search_expression replace181 = {
17813    { nir_search_value_expression, 0 },
17814    false,
17815    nir_op_inot,
17816    { &replace181_0.value },
17817    NULL,
17818 };
17819 
17820 static const nir_search_variable search182_0 = {
17821    { nir_search_value_variable, 32 },
17822    0, /* a */
17823    false,
17824    nir_type_bool32,
17825    NULL,
17826 };
17827 
17828 static const nir_search_constant search182_1 = {
17829    { nir_search_value_constant, 32 },
17830    nir_type_bool32, { NIR_FALSE /* False */ },
17831 };
17832 static const nir_search_expression search182 = {
17833    { nir_search_value_expression, 0 },
17834    false,
17835    nir_op_ine,
17836    { &search182_0.value, &search182_1.value },
17837    NULL,
17838 };
17839 
17840 static const nir_search_variable replace182 = {
17841    { nir_search_value_variable, 0 },
17842    0, /* a */
17843    false,
17844    nir_type_invalid,
17845    NULL,
17846 };
17847 
17848 static const nir_search_variable search283_0_0 = {
17849    { nir_search_value_variable, 0 },
17850    0, /* a */
17851    false,
17852    nir_type_invalid,
17853    NULL,
17854 };
17855 
17856 static const nir_search_variable search283_0_1 = {
17857    { nir_search_value_variable, 0 },
17858    1, /* b */
17859    true,
17860    nir_type_invalid,
17861    NULL,
17862 };
17863 
17864 static const nir_search_variable search283_0_2 = {
17865    { nir_search_value_variable, 0 },
17866    2, /* c */
17867    true,
17868    nir_type_invalid,
17869    NULL,
17870 };
17871 static const nir_search_expression search283_0 = {
17872    { nir_search_value_expression, 0 },
17873    false,
17874    nir_op_bcsel,
17875    { &search283_0_0.value, &search283_0_1.value, &search283_0_2.value },
17876    NULL,
17877 };
17878 
17879 static const nir_search_variable search283_1 = {
17880    { nir_search_value_variable, 0 },
17881    3, /* d */
17882    true,
17883    nir_type_invalid,
17884    NULL,
17885 };
17886 static const nir_search_expression search283 = {
17887    { nir_search_value_expression, 0 },
17888    false,
17889    nir_op_ine,
17890    { &search283_0.value, &search283_1.value },
17891    NULL,
17892 };
17893 
17894 static const nir_search_variable replace283_0 = {
17895    { nir_search_value_variable, 0 },
17896    0, /* a */
17897    false,
17898    nir_type_invalid,
17899    NULL,
17900 };
17901 
17902 static const nir_search_variable replace283_1_0 = {
17903    { nir_search_value_variable, 0 },
17904    1, /* b */
17905    false,
17906    nir_type_invalid,
17907    NULL,
17908 };
17909 
17910 static const nir_search_variable replace283_1_1 = {
17911    { nir_search_value_variable, 0 },
17912    3, /* d */
17913    false,
17914    nir_type_invalid,
17915    NULL,
17916 };
17917 static const nir_search_expression replace283_1 = {
17918    { nir_search_value_expression, 0 },
17919    false,
17920    nir_op_ine,
17921    { &replace283_1_0.value, &replace283_1_1.value },
17922    NULL,
17923 };
17924 
17925 static const nir_search_variable replace283_2_0 = {
17926    { nir_search_value_variable, 0 },
17927    2, /* c */
17928    false,
17929    nir_type_invalid,
17930    NULL,
17931 };
17932 
17933 static const nir_search_variable replace283_2_1 = {
17934    { nir_search_value_variable, 0 },
17935    3, /* d */
17936    false,
17937    nir_type_invalid,
17938    NULL,
17939 };
17940 static const nir_search_expression replace283_2 = {
17941    { nir_search_value_expression, 0 },
17942    false,
17943    nir_op_ine,
17944    { &replace283_2_0.value, &replace283_2_1.value },
17945    NULL,
17946 };
17947 static const nir_search_expression replace283 = {
17948    { nir_search_value_expression, 0 },
17949    false,
17950    nir_op_bcsel,
17951    { &replace283_0.value, &replace283_1.value, &replace283_2.value },
17952    NULL,
17953 };
17954 
17955 static const nir_search_variable search284_0 = {
17956    { nir_search_value_variable, 0 },
17957    0, /* d */
17958    true,
17959    nir_type_invalid,
17960    NULL,
17961 };
17962 
17963 static const nir_search_variable search284_1_0 = {
17964    { nir_search_value_variable, 0 },
17965    1, /* a */
17966    false,
17967    nir_type_invalid,
17968    NULL,
17969 };
17970 
17971 static const nir_search_variable search284_1_1 = {
17972    { nir_search_value_variable, 0 },
17973    2, /* b */
17974    true,
17975    nir_type_invalid,
17976    NULL,
17977 };
17978 
17979 static const nir_search_variable search284_1_2 = {
17980    { nir_search_value_variable, 0 },
17981    3, /* c */
17982    true,
17983    nir_type_invalid,
17984    NULL,
17985 };
17986 static const nir_search_expression search284_1 = {
17987    { nir_search_value_expression, 0 },
17988    false,
17989    nir_op_bcsel,
17990    { &search284_1_0.value, &search284_1_1.value, &search284_1_2.value },
17991    NULL,
17992 };
17993 static const nir_search_expression search284 = {
17994    { nir_search_value_expression, 0 },
17995    false,
17996    nir_op_ine,
17997    { &search284_0.value, &search284_1.value },
17998    NULL,
17999 };
18000 
18001 static const nir_search_variable replace284_0 = {
18002    { nir_search_value_variable, 0 },
18003    1, /* a */
18004    false,
18005    nir_type_invalid,
18006    NULL,
18007 };
18008 
18009 static const nir_search_variable replace284_1_0 = {
18010    { nir_search_value_variable, 0 },
18011    0, /* d */
18012    false,
18013    nir_type_invalid,
18014    NULL,
18015 };
18016 
18017 static const nir_search_variable replace284_1_1 = {
18018    { nir_search_value_variable, 0 },
18019    2, /* b */
18020    false,
18021    nir_type_invalid,
18022    NULL,
18023 };
18024 static const nir_search_expression replace284_1 = {
18025    { nir_search_value_expression, 0 },
18026    false,
18027    nir_op_ine,
18028    { &replace284_1_0.value, &replace284_1_1.value },
18029    NULL,
18030 };
18031 
18032 static const nir_search_variable replace284_2_0 = {
18033    { nir_search_value_variable, 0 },
18034    0, /* d */
18035    false,
18036    nir_type_invalid,
18037    NULL,
18038 };
18039 
18040 static const nir_search_variable replace284_2_1 = {
18041    { nir_search_value_variable, 0 },
18042    3, /* c */
18043    false,
18044    nir_type_invalid,
18045    NULL,
18046 };
18047 static const nir_search_expression replace284_2 = {
18048    { nir_search_value_expression, 0 },
18049    false,
18050    nir_op_ine,
18051    { &replace284_2_0.value, &replace284_2_1.value },
18052    NULL,
18053 };
18054 static const nir_search_expression replace284 = {
18055    { nir_search_value_expression, 0 },
18056    false,
18057    nir_op_bcsel,
18058    { &replace284_0.value, &replace284_1.value, &replace284_2.value },
18059    NULL,
18060 };
18061 
18062 static const struct transform nir_opt_algebraic_ine_xforms[] = {
18063    { &search131, &replace131.value, 0 },
18064    { &search181, &replace181.value, 0 },
18065    { &search182, &replace182.value, 0 },
18066    { &search283, &replace283.value, 0 },
18067    { &search284, &replace284.value, 0 },
18068 };
18069 
18070 static const nir_search_variable search2_0 = {
18071    { nir_search_value_variable, 0 },
18072    0, /* a */
18073    false,
18074    nir_type_invalid,
18075    NULL,
18076 };
18077 
18078 static const nir_search_constant search2_1 = {
18079    { nir_search_value_constant, 0 },
18080    nir_type_int, { 0x1 /* 1 */ },
18081 };
18082 static const nir_search_expression search2 = {
18083    { nir_search_value_expression, 0 },
18084    false,
18085    nir_op_udiv,
18086    { &search2_0.value, &search2_1.value },
18087    NULL,
18088 };
18089 
18090 static const nir_search_variable replace2 = {
18091    { nir_search_value_variable, 0 },
18092    0, /* a */
18093    false,
18094    nir_type_invalid,
18095    NULL,
18096 };
18097 
18098 static const nir_search_variable search6_0 = {
18099    { nir_search_value_variable, 0 },
18100    0, /* a */
18101    false,
18102    nir_type_invalid,
18103    NULL,
18104 };
18105 
18106 static const nir_search_variable search6_1 = {
18107    { nir_search_value_variable, 32 },
18108    1, /* b */
18109    true,
18110    nir_type_invalid,
18111    (is_pos_power_of_two),
18112 };
18113 static const nir_search_expression search6 = {
18114    { nir_search_value_expression, 0 },
18115    false,
18116    nir_op_udiv,
18117    { &search6_0.value, &search6_1.value },
18118    NULL,
18119 };
18120 
18121 static const nir_search_variable replace6_0 = {
18122    { nir_search_value_variable, 0 },
18123    0, /* a */
18124    false,
18125    nir_type_invalid,
18126    NULL,
18127 };
18128 
18129 static const nir_search_variable replace6_1_0 = {
18130    { nir_search_value_variable, 0 },
18131    1, /* b */
18132    false,
18133    nir_type_invalid,
18134    NULL,
18135 };
18136 static const nir_search_expression replace6_1 = {
18137    { nir_search_value_expression, 0 },
18138    false,
18139    nir_op_find_lsb,
18140    { &replace6_1_0.value },
18141    NULL,
18142 };
18143 static const nir_search_expression replace6 = {
18144    { nir_search_value_expression, 0 },
18145    false,
18146    nir_op_ushr,
18147    { &replace6_0.value, &replace6_1.value },
18148    NULL,
18149 };
18150 
18151 static const struct transform nir_opt_algebraic_udiv_xforms[] = {
18152    { &search2, &replace2.value, 0 },
18153    { &search6, &replace6.value, 0 },
18154 };
18155 
18156 static const nir_search_variable search248_0 = {
18157    { nir_search_value_variable, 0 },
18158    0, /* a */
18159    false,
18160    nir_type_invalid,
18161    NULL,
18162 };
18163 
18164 static const nir_search_variable search248_1 = {
18165    { nir_search_value_variable, 32 },
18166    1, /* b */
18167    false,
18168    nir_type_invalid,
18169    NULL,
18170 };
18171 static const nir_search_expression search248 = {
18172    { nir_search_value_expression, 0 },
18173    false,
18174    nir_op_extract_i8,
18175    { &search248_0.value, &search248_1.value },
18176    NULL,
18177 };
18178 
18179 static const nir_search_variable replace248_0_0 = {
18180    { nir_search_value_variable, 0 },
18181    0, /* a */
18182    false,
18183    nir_type_invalid,
18184    NULL,
18185 };
18186 
18187 static const nir_search_constant replace248_0_1_0_0 = {
18188    { nir_search_value_constant, 0 },
18189    nir_type_int, { 0x3 /* 3 */ },
18190 };
18191 
18192 static const nir_search_variable replace248_0_1_0_1 = {
18193    { nir_search_value_variable, 0 },
18194    1, /* b */
18195    false,
18196    nir_type_invalid,
18197    NULL,
18198 };
18199 static const nir_search_expression replace248_0_1_0 = {
18200    { nir_search_value_expression, 0 },
18201    false,
18202    nir_op_isub,
18203    { &replace248_0_1_0_0.value, &replace248_0_1_0_1.value },
18204    NULL,
18205 };
18206 
18207 static const nir_search_constant replace248_0_1_1 = {
18208    { nir_search_value_constant, 0 },
18209    nir_type_int, { 0x8 /* 8 */ },
18210 };
18211 static const nir_search_expression replace248_0_1 = {
18212    { nir_search_value_expression, 0 },
18213    false,
18214    nir_op_imul,
18215    { &replace248_0_1_0.value, &replace248_0_1_1.value },
18216    NULL,
18217 };
18218 static const nir_search_expression replace248_0 = {
18219    { nir_search_value_expression, 0 },
18220    false,
18221    nir_op_ishl,
18222    { &replace248_0_0.value, &replace248_0_1.value },
18223    NULL,
18224 };
18225 
18226 static const nir_search_constant replace248_1 = {
18227    { nir_search_value_constant, 0 },
18228    nir_type_int, { 0x18 /* 24 */ },
18229 };
18230 static const nir_search_expression replace248 = {
18231    { nir_search_value_expression, 0 },
18232    false,
18233    nir_op_ishr,
18234    { &replace248_0.value, &replace248_1.value },
18235    NULL,
18236 };
18237 
18238 static const struct transform nir_opt_algebraic_extract_i8_xforms[] = {
18239    { &search248, &replace248.value, 27 },
18240 };
18241 
18242 static const nir_search_variable search243_0 = {
18243    { nir_search_value_variable, 0 },
18244    0, /* a */
18245    false,
18246    nir_type_invalid,
18247    NULL,
18248 };
18249 
18250 static const nir_search_variable search243_1 = {
18251    { nir_search_value_variable, 0 },
18252    1, /* b */
18253    false,
18254    nir_type_invalid,
18255    NULL,
18256 };
18257 static const nir_search_expression search243 = {
18258    { nir_search_value_expression, 32 },
18259    false,
18260    nir_op_uadd_carry,
18261    { &search243_0.value, &search243_1.value },
18262    NULL,
18263 };
18264 
18265 static const nir_search_variable replace243_0_0_0 = {
18266    { nir_search_value_variable, 0 },
18267    0, /* a */
18268    false,
18269    nir_type_invalid,
18270    NULL,
18271 };
18272 
18273 static const nir_search_variable replace243_0_0_1 = {
18274    { nir_search_value_variable, 0 },
18275    1, /* b */
18276    false,
18277    nir_type_invalid,
18278    NULL,
18279 };
18280 static const nir_search_expression replace243_0_0 = {
18281    { nir_search_value_expression, 0 },
18282    false,
18283    nir_op_iadd,
18284    { &replace243_0_0_0.value, &replace243_0_0_1.value },
18285    NULL,
18286 };
18287 
18288 static const nir_search_variable replace243_0_1 = {
18289    { nir_search_value_variable, 0 },
18290    0, /* a */
18291    false,
18292    nir_type_invalid,
18293    NULL,
18294 };
18295 static const nir_search_expression replace243_0 = {
18296    { nir_search_value_expression, 0 },
18297    false,
18298    nir_op_ult,
18299    { &replace243_0_0.value, &replace243_0_1.value },
18300    NULL,
18301 };
18302 static const nir_search_expression replace243 = {
18303    { nir_search_value_expression, 0 },
18304    false,
18305    nir_op_b2i,
18306    { &replace243_0.value },
18307    NULL,
18308 };
18309 
18310 static const struct transform nir_opt_algebraic_uadd_carry_xforms[] = {
18311    { &search243, &replace243.value, 23 },
18312 };
18313 
18314 static const nir_search_variable search246_0 = {
18315    { nir_search_value_variable, 0 },
18316    0, /* value */
18317    false,
18318    nir_type_invalid,
18319    NULL,
18320 };
18321 
18322 static const nir_search_variable search246_1 = {
18323    { nir_search_value_variable, 0 },
18324    1, /* offset */
18325    false,
18326    nir_type_invalid,
18327    NULL,
18328 };
18329 
18330 static const nir_search_variable search246_2 = {
18331    { nir_search_value_variable, 0 },
18332    2, /* bits */
18333    false,
18334    nir_type_invalid,
18335    NULL,
18336 };
18337 static const nir_search_expression search246 = {
18338    { nir_search_value_expression, 0 },
18339    false,
18340    nir_op_ibitfield_extract,
18341    { &search246_0.value, &search246_1.value, &search246_2.value },
18342    NULL,
18343 };
18344 
18345 static const nir_search_constant replace246_0_0 = {
18346    { nir_search_value_constant, 0 },
18347    nir_type_int, { 0x1f /* 31 */ },
18348 };
18349 
18350 static const nir_search_variable replace246_0_1 = {
18351    { nir_search_value_variable, 0 },
18352    2, /* bits */
18353    false,
18354    nir_type_invalid,
18355    NULL,
18356 };
18357 static const nir_search_expression replace246_0 = {
18358    { nir_search_value_expression, 0 },
18359    false,
18360    nir_op_ilt,
18361    { &replace246_0_0.value, &replace246_0_1.value },
18362    NULL,
18363 };
18364 
18365 static const nir_search_variable replace246_1 = {
18366    { nir_search_value_variable, 0 },
18367    0, /* value */
18368    false,
18369    nir_type_invalid,
18370    NULL,
18371 };
18372 
18373 static const nir_search_variable replace246_2_0 = {
18374    { nir_search_value_variable, 0 },
18375    0, /* value */
18376    false,
18377    nir_type_invalid,
18378    NULL,
18379 };
18380 
18381 static const nir_search_variable replace246_2_1 = {
18382    { nir_search_value_variable, 0 },
18383    1, /* offset */
18384    false,
18385    nir_type_invalid,
18386    NULL,
18387 };
18388 
18389 static const nir_search_variable replace246_2_2 = {
18390    { nir_search_value_variable, 0 },
18391    2, /* bits */
18392    false,
18393    nir_type_invalid,
18394    NULL,
18395 };
18396 static const nir_search_expression replace246_2 = {
18397    { nir_search_value_expression, 0 },
18398    false,
18399    nir_op_ibfe,
18400    { &replace246_2_0.value, &replace246_2_1.value, &replace246_2_2.value },
18401    NULL,
18402 };
18403 static const nir_search_expression replace246 = {
18404    { nir_search_value_expression, 0 },
18405    false,
18406    nir_op_bcsel,
18407    { &replace246_0.value, &replace246_1.value, &replace246_2.value },
18408    NULL,
18409 };
18410 
18411 static const struct transform nir_opt_algebraic_ibitfield_extract_xforms[] = {
18412    { &search246, &replace246.value, 26 },
18413 };
18414 
18415 static const nir_search_variable search260_0 = {
18416    { nir_search_value_variable, 0 },
18417    0, /* x */
18418    false,
18419    nir_type_invalid,
18420    NULL,
18421 };
18422 
18423 static const nir_search_variable search260_1 = {
18424    { nir_search_value_variable, 0 },
18425    1, /* exp */
18426    false,
18427    nir_type_invalid,
18428    NULL,
18429 };
18430 static const nir_search_expression search260 = {
18431    { nir_search_value_expression, 32 },
18432    false,
18433    nir_op_ldexp,
18434    { &search260_0.value, &search260_1.value },
18435    NULL,
18436 };
18437 
18438 static const nir_search_variable replace260_0_0 = {
18439    { nir_search_value_variable, 0 },
18440    0, /* x */
18441    false,
18442    nir_type_invalid,
18443    NULL,
18444 };
18445 
18446 static const nir_search_variable replace260_0_1_0_0_0_0_0 = {
18447    { nir_search_value_variable, 0 },
18448    1, /* exp */
18449    false,
18450    nir_type_invalid,
18451    NULL,
18452 };
18453 
18454 static const nir_search_constant replace260_0_1_0_0_0_0_1 = {
18455    { nir_search_value_constant, 0 },
18456    nir_type_int, { -0xfc /* -252 */ },
18457 };
18458 static const nir_search_expression replace260_0_1_0_0_0_0 = {
18459    { nir_search_value_expression, 0 },
18460    false,
18461    nir_op_imax,
18462    { &replace260_0_1_0_0_0_0_0.value, &replace260_0_1_0_0_0_0_1.value },
18463    NULL,
18464 };
18465 
18466 static const nir_search_constant replace260_0_1_0_0_0_1 = {
18467    { nir_search_value_constant, 0 },
18468    nir_type_int, { 0xfe /* 254 */ },
18469 };
18470 static const nir_search_expression replace260_0_1_0_0_0 = {
18471    { nir_search_value_expression, 0 },
18472    false,
18473    nir_op_imin,
18474    { &replace260_0_1_0_0_0_0.value, &replace260_0_1_0_0_0_1.value },
18475    NULL,
18476 };
18477 
18478 static const nir_search_constant replace260_0_1_0_0_1 = {
18479    { nir_search_value_constant, 0 },
18480    nir_type_int, { 0x1 /* 1 */ },
18481 };
18482 static const nir_search_expression replace260_0_1_0_0 = {
18483    { nir_search_value_expression, 0 },
18484    false,
18485    nir_op_ishr,
18486    { &replace260_0_1_0_0_0.value, &replace260_0_1_0_0_1.value },
18487    NULL,
18488 };
18489 
18490 static const nir_search_constant replace260_0_1_0_1 = {
18491    { nir_search_value_constant, 0 },
18492    nir_type_int, { 0x7f /* 127 */ },
18493 };
18494 static const nir_search_expression replace260_0_1_0 = {
18495    { nir_search_value_expression, 0 },
18496    false,
18497    nir_op_iadd,
18498    { &replace260_0_1_0_0.value, &replace260_0_1_0_1.value },
18499    NULL,
18500 };
18501 
18502 static const nir_search_constant replace260_0_1_1 = {
18503    { nir_search_value_constant, 0 },
18504    nir_type_int, { 0x17 /* 23 */ },
18505 };
18506 static const nir_search_expression replace260_0_1 = {
18507    { nir_search_value_expression, 0 },
18508    false,
18509    nir_op_ishl,
18510    { &replace260_0_1_0.value, &replace260_0_1_1.value },
18511    NULL,
18512 };
18513 static const nir_search_expression replace260_0 = {
18514    { nir_search_value_expression, 0 },
18515    false,
18516    nir_op_fmul,
18517    { &replace260_0_0.value, &replace260_0_1.value },
18518    NULL,
18519 };
18520 
18521 static const nir_search_variable replace260_1_0_0_0_0_0 = {
18522    { nir_search_value_variable, 0 },
18523    1, /* exp */
18524    false,
18525    nir_type_invalid,
18526    NULL,
18527 };
18528 
18529 static const nir_search_constant replace260_1_0_0_0_0_1 = {
18530    { nir_search_value_constant, 0 },
18531    nir_type_int, { -0xfc /* -252 */ },
18532 };
18533 static const nir_search_expression replace260_1_0_0_0_0 = {
18534    { nir_search_value_expression, 0 },
18535    false,
18536    nir_op_imax,
18537    { &replace260_1_0_0_0_0_0.value, &replace260_1_0_0_0_0_1.value },
18538    NULL,
18539 };
18540 
18541 static const nir_search_constant replace260_1_0_0_0_1 = {
18542    { nir_search_value_constant, 0 },
18543    nir_type_int, { 0xfe /* 254 */ },
18544 };
18545 static const nir_search_expression replace260_1_0_0_0 = {
18546    { nir_search_value_expression, 0 },
18547    false,
18548    nir_op_imin,
18549    { &replace260_1_0_0_0_0.value, &replace260_1_0_0_0_1.value },
18550    NULL,
18551 };
18552 
18553 static const nir_search_variable replace260_1_0_0_1_0_0_0 = {
18554    { nir_search_value_variable, 0 },
18555    1, /* exp */
18556    false,
18557    nir_type_invalid,
18558    NULL,
18559 };
18560 
18561 static const nir_search_constant replace260_1_0_0_1_0_0_1 = {
18562    { nir_search_value_constant, 0 },
18563    nir_type_int, { -0xfc /* -252 */ },
18564 };
18565 static const nir_search_expression replace260_1_0_0_1_0_0 = {
18566    { nir_search_value_expression, 0 },
18567    false,
18568    nir_op_imax,
18569    { &replace260_1_0_0_1_0_0_0.value, &replace260_1_0_0_1_0_0_1.value },
18570    NULL,
18571 };
18572 
18573 static const nir_search_constant replace260_1_0_0_1_0_1 = {
18574    { nir_search_value_constant, 0 },
18575    nir_type_int, { 0xfe /* 254 */ },
18576 };
18577 static const nir_search_expression replace260_1_0_0_1_0 = {
18578    { nir_search_value_expression, 0 },
18579    false,
18580    nir_op_imin,
18581    { &replace260_1_0_0_1_0_0.value, &replace260_1_0_0_1_0_1.value },
18582    NULL,
18583 };
18584 
18585 static const nir_search_constant replace260_1_0_0_1_1 = {
18586    { nir_search_value_constant, 0 },
18587    nir_type_int, { 0x1 /* 1 */ },
18588 };
18589 static const nir_search_expression replace260_1_0_0_1 = {
18590    { nir_search_value_expression, 0 },
18591    false,
18592    nir_op_ishr,
18593    { &replace260_1_0_0_1_0.value, &replace260_1_0_0_1_1.value },
18594    NULL,
18595 };
18596 static const nir_search_expression replace260_1_0_0 = {
18597    { nir_search_value_expression, 0 },
18598    false,
18599    nir_op_isub,
18600    { &replace260_1_0_0_0.value, &replace260_1_0_0_1.value },
18601    NULL,
18602 };
18603 
18604 static const nir_search_constant replace260_1_0_1 = {
18605    { nir_search_value_constant, 0 },
18606    nir_type_int, { 0x7f /* 127 */ },
18607 };
18608 static const nir_search_expression replace260_1_0 = {
18609    { nir_search_value_expression, 0 },
18610    false,
18611    nir_op_iadd,
18612    { &replace260_1_0_0.value, &replace260_1_0_1.value },
18613    NULL,
18614 };
18615 
18616 static const nir_search_constant replace260_1_1 = {
18617    { nir_search_value_constant, 0 },
18618    nir_type_int, { 0x17 /* 23 */ },
18619 };
18620 static const nir_search_expression replace260_1 = {
18621    { nir_search_value_expression, 0 },
18622    false,
18623    nir_op_ishl,
18624    { &replace260_1_0.value, &replace260_1_1.value },
18625    NULL,
18626 };
18627 static const nir_search_expression replace260 = {
18628    { nir_search_value_expression, 0 },
18629    false,
18630    nir_op_fmul,
18631    { &replace260_0.value, &replace260_1.value },
18632    NULL,
18633 };
18634 
18635 static const nir_search_variable search261_0 = {
18636    { nir_search_value_variable, 0 },
18637    0, /* x */
18638    false,
18639    nir_type_invalid,
18640    NULL,
18641 };
18642 
18643 static const nir_search_variable search261_1 = {
18644    { nir_search_value_variable, 0 },
18645    1, /* exp */
18646    false,
18647    nir_type_invalid,
18648    NULL,
18649 };
18650 static const nir_search_expression search261 = {
18651    { nir_search_value_expression, 64 },
18652    false,
18653    nir_op_ldexp,
18654    { &search261_0.value, &search261_1.value },
18655    NULL,
18656 };
18657 
18658 static const nir_search_variable replace261_0_0 = {
18659    { nir_search_value_variable, 0 },
18660    0, /* x */
18661    false,
18662    nir_type_invalid,
18663    NULL,
18664 };
18665 
18666 static const nir_search_constant replace261_0_1_0 = {
18667    { nir_search_value_constant, 0 },
18668    nir_type_int, { 0x0 /* 0 */ },
18669 };
18670 
18671 static const nir_search_variable replace261_0_1_1_0_0_0_0_0 = {
18672    { nir_search_value_variable, 0 },
18673    1, /* exp */
18674    false,
18675    nir_type_invalid,
18676    NULL,
18677 };
18678 
18679 static const nir_search_constant replace261_0_1_1_0_0_0_0_1 = {
18680    { nir_search_value_constant, 0 },
18681    nir_type_int, { -0x7fc /* -2044 */ },
18682 };
18683 static const nir_search_expression replace261_0_1_1_0_0_0_0 = {
18684    { nir_search_value_expression, 0 },
18685    false,
18686    nir_op_imax,
18687    { &replace261_0_1_1_0_0_0_0_0.value, &replace261_0_1_1_0_0_0_0_1.value },
18688    NULL,
18689 };
18690 
18691 static const nir_search_constant replace261_0_1_1_0_0_0_1 = {
18692    { nir_search_value_constant, 0 },
18693    nir_type_int, { 0x7fe /* 2046 */ },
18694 };
18695 static const nir_search_expression replace261_0_1_1_0_0_0 = {
18696    { nir_search_value_expression, 0 },
18697    false,
18698    nir_op_imin,
18699    { &replace261_0_1_1_0_0_0_0.value, &replace261_0_1_1_0_0_0_1.value },
18700    NULL,
18701 };
18702 
18703 static const nir_search_constant replace261_0_1_1_0_0_1 = {
18704    { nir_search_value_constant, 0 },
18705    nir_type_int, { 0x1 /* 1 */ },
18706 };
18707 static const nir_search_expression replace261_0_1_1_0_0 = {
18708    { nir_search_value_expression, 0 },
18709    false,
18710    nir_op_ishr,
18711    { &replace261_0_1_1_0_0_0.value, &replace261_0_1_1_0_0_1.value },
18712    NULL,
18713 };
18714 
18715 static const nir_search_constant replace261_0_1_1_0_1 = {
18716    { nir_search_value_constant, 0 },
18717    nir_type_int, { 0x3ff /* 1023 */ },
18718 };
18719 static const nir_search_expression replace261_0_1_1_0 = {
18720    { nir_search_value_expression, 0 },
18721    false,
18722    nir_op_iadd,
18723    { &replace261_0_1_1_0_0.value, &replace261_0_1_1_0_1.value },
18724    NULL,
18725 };
18726 
18727 static const nir_search_constant replace261_0_1_1_1 = {
18728    { nir_search_value_constant, 0 },
18729    nir_type_int, { 0x14 /* 20 */ },
18730 };
18731 static const nir_search_expression replace261_0_1_1 = {
18732    { nir_search_value_expression, 0 },
18733    false,
18734    nir_op_ishl,
18735    { &replace261_0_1_1_0.value, &replace261_0_1_1_1.value },
18736    NULL,
18737 };
18738 static const nir_search_expression replace261_0_1 = {
18739    { nir_search_value_expression, 0 },
18740    false,
18741    nir_op_pack_64_2x32_split,
18742    { &replace261_0_1_0.value, &replace261_0_1_1.value },
18743    NULL,
18744 };
18745 static const nir_search_expression replace261_0 = {
18746    { nir_search_value_expression, 0 },
18747    false,
18748    nir_op_fmul,
18749    { &replace261_0_0.value, &replace261_0_1.value },
18750    NULL,
18751 };
18752 
18753 static const nir_search_constant replace261_1_0 = {
18754    { nir_search_value_constant, 0 },
18755    nir_type_int, { 0x0 /* 0 */ },
18756 };
18757 
18758 static const nir_search_variable replace261_1_1_0_0_0_0_0 = {
18759    { nir_search_value_variable, 0 },
18760    1, /* exp */
18761    false,
18762    nir_type_invalid,
18763    NULL,
18764 };
18765 
18766 static const nir_search_constant replace261_1_1_0_0_0_0_1 = {
18767    { nir_search_value_constant, 0 },
18768    nir_type_int, { -0x7fc /* -2044 */ },
18769 };
18770 static const nir_search_expression replace261_1_1_0_0_0_0 = {
18771    { nir_search_value_expression, 0 },
18772    false,
18773    nir_op_imax,
18774    { &replace261_1_1_0_0_0_0_0.value, &replace261_1_1_0_0_0_0_1.value },
18775    NULL,
18776 };
18777 
18778 static const nir_search_constant replace261_1_1_0_0_0_1 = {
18779    { nir_search_value_constant, 0 },
18780    nir_type_int, { 0x7fe /* 2046 */ },
18781 };
18782 static const nir_search_expression replace261_1_1_0_0_0 = {
18783    { nir_search_value_expression, 0 },
18784    false,
18785    nir_op_imin,
18786    { &replace261_1_1_0_0_0_0.value, &replace261_1_1_0_0_0_1.value },
18787    NULL,
18788 };
18789 
18790 static const nir_search_variable replace261_1_1_0_0_1_0_0_0 = {
18791    { nir_search_value_variable, 0 },
18792    1, /* exp */
18793    false,
18794    nir_type_invalid,
18795    NULL,
18796 };
18797 
18798 static const nir_search_constant replace261_1_1_0_0_1_0_0_1 = {
18799    { nir_search_value_constant, 0 },
18800    nir_type_int, { -0x7fc /* -2044 */ },
18801 };
18802 static const nir_search_expression replace261_1_1_0_0_1_0_0 = {
18803    { nir_search_value_expression, 0 },
18804    false,
18805    nir_op_imax,
18806    { &replace261_1_1_0_0_1_0_0_0.value, &replace261_1_1_0_0_1_0_0_1.value },
18807    NULL,
18808 };
18809 
18810 static const nir_search_constant replace261_1_1_0_0_1_0_1 = {
18811    { nir_search_value_constant, 0 },
18812    nir_type_int, { 0x7fe /* 2046 */ },
18813 };
18814 static const nir_search_expression replace261_1_1_0_0_1_0 = {
18815    { nir_search_value_expression, 0 },
18816    false,
18817    nir_op_imin,
18818    { &replace261_1_1_0_0_1_0_0.value, &replace261_1_1_0_0_1_0_1.value },
18819    NULL,
18820 };
18821 
18822 static const nir_search_constant replace261_1_1_0_0_1_1 = {
18823    { nir_search_value_constant, 0 },
18824    nir_type_int, { 0x1 /* 1 */ },
18825 };
18826 static const nir_search_expression replace261_1_1_0_0_1 = {
18827    { nir_search_value_expression, 0 },
18828    false,
18829    nir_op_ishr,
18830    { &replace261_1_1_0_0_1_0.value, &replace261_1_1_0_0_1_1.value },
18831    NULL,
18832 };
18833 static const nir_search_expression replace261_1_1_0_0 = {
18834    { nir_search_value_expression, 0 },
18835    false,
18836    nir_op_isub,
18837    { &replace261_1_1_0_0_0.value, &replace261_1_1_0_0_1.value },
18838    NULL,
18839 };
18840 
18841 static const nir_search_constant replace261_1_1_0_1 = {
18842    { nir_search_value_constant, 0 },
18843    nir_type_int, { 0x3ff /* 1023 */ },
18844 };
18845 static const nir_search_expression replace261_1_1_0 = {
18846    { nir_search_value_expression, 0 },
18847    false,
18848    nir_op_iadd,
18849    { &replace261_1_1_0_0.value, &replace261_1_1_0_1.value },
18850    NULL,
18851 };
18852 
18853 static const nir_search_constant replace261_1_1_1 = {
18854    { nir_search_value_constant, 0 },
18855    nir_type_int, { 0x14 /* 20 */ },
18856 };
18857 static const nir_search_expression replace261_1_1 = {
18858    { nir_search_value_expression, 0 },
18859    false,
18860    nir_op_ishl,
18861    { &replace261_1_1_0.value, &replace261_1_1_1.value },
18862    NULL,
18863 };
18864 static const nir_search_expression replace261_1 = {
18865    { nir_search_value_expression, 0 },
18866    false,
18867    nir_op_pack_64_2x32_split,
18868    { &replace261_1_0.value, &replace261_1_1.value },
18869    NULL,
18870 };
18871 static const nir_search_expression replace261 = {
18872    { nir_search_value_expression, 0 },
18873    false,
18874    nir_op_fmul,
18875    { &replace261_0.value, &replace261_1.value },
18876    NULL,
18877 };
18878 
18879 static const struct transform nir_opt_algebraic_ldexp_xforms[] = {
18880    { &search260, &replace260.value, 0 },
18881    { &search261, &replace261.value, 0 },
18882 };
18883 
18884 static const nir_search_variable search250_0 = {
18885    { nir_search_value_variable, 0 },
18886    0, /* a */
18887    false,
18888    nir_type_invalid,
18889    NULL,
18890 };
18891 
18892 static const nir_search_variable search250_1 = {
18893    { nir_search_value_variable, 32 },
18894    1, /* b */
18895    false,
18896    nir_type_invalid,
18897    NULL,
18898 };
18899 static const nir_search_expression search250 = {
18900    { nir_search_value_expression, 0 },
18901    false,
18902    nir_op_extract_i16,
18903    { &search250_0.value, &search250_1.value },
18904    NULL,
18905 };
18906 
18907 static const nir_search_variable replace250_0_0 = {
18908    { nir_search_value_variable, 0 },
18909    0, /* a */
18910    false,
18911    nir_type_invalid,
18912    NULL,
18913 };
18914 
18915 static const nir_search_constant replace250_0_1_0_0 = {
18916    { nir_search_value_constant, 0 },
18917    nir_type_int, { 0x1 /* 1 */ },
18918 };
18919 
18920 static const nir_search_variable replace250_0_1_0_1 = {
18921    { nir_search_value_variable, 0 },
18922    1, /* b */
18923    false,
18924    nir_type_invalid,
18925    NULL,
18926 };
18927 static const nir_search_expression replace250_0_1_0 = {
18928    { nir_search_value_expression, 0 },
18929    false,
18930    nir_op_isub,
18931    { &replace250_0_1_0_0.value, &replace250_0_1_0_1.value },
18932    NULL,
18933 };
18934 
18935 static const nir_search_constant replace250_0_1_1 = {
18936    { nir_search_value_constant, 0 },
18937    nir_type_int, { 0x10 /* 16 */ },
18938 };
18939 static const nir_search_expression replace250_0_1 = {
18940    { nir_search_value_expression, 0 },
18941    false,
18942    nir_op_imul,
18943    { &replace250_0_1_0.value, &replace250_0_1_1.value },
18944    NULL,
18945 };
18946 static const nir_search_expression replace250_0 = {
18947    { nir_search_value_expression, 0 },
18948    false,
18949    nir_op_ishl,
18950    { &replace250_0_0.value, &replace250_0_1.value },
18951    NULL,
18952 };
18953 
18954 static const nir_search_constant replace250_1 = {
18955    { nir_search_value_constant, 0 },
18956    nir_type_int, { 0x10 /* 16 */ },
18957 };
18958 static const nir_search_expression replace250 = {
18959    { nir_search_value_expression, 0 },
18960    false,
18961    nir_op_ishr,
18962    { &replace250_0.value, &replace250_1.value },
18963    NULL,
18964 };
18965 
18966 static const struct transform nir_opt_algebraic_extract_i16_xforms[] = {
18967    { &search250, &replace250.value, 28 },
18968 };
18969 
18970 static bool
nir_opt_algebraic_block(nir_block * block,const bool * condition_flags,void * mem_ctx)18971 nir_opt_algebraic_block(nir_block *block, const bool *condition_flags,
18972                    void *mem_ctx)
18973 {
18974    bool progress = false;
18975 
18976    nir_foreach_instr_reverse_safe(instr, block) {
18977       if (instr->type != nir_instr_type_alu)
18978          continue;
18979 
18980       nir_alu_instr *alu = nir_instr_as_alu(instr);
18981       if (!alu->dest.dest.is_ssa)
18982          continue;
18983 
18984       switch (alu->op) {
18985       case nir_op_iand:
18986          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_iand_xforms); i++) {
18987             const struct transform *xform = &nir_opt_algebraic_iand_xforms[i];
18988             if (condition_flags[xform->condition_offset] &&
18989                 nir_replace_instr(alu, xform->search, xform->replace,
18990                                   mem_ctx)) {
18991                progress = true;
18992                break;
18993             }
18994          }
18995          break;
18996       case nir_op_i2b:
18997          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_i2b_xforms); i++) {
18998             const struct transform *xform = &nir_opt_algebraic_i2b_xforms[i];
18999             if (condition_flags[xform->condition_offset] &&
19000                 nir_replace_instr(alu, xform->search, xform->replace,
19001                                   mem_ctx)) {
19002                progress = true;
19003                break;
19004             }
19005          }
19006          break;
19007       case nir_op_ixor:
19008          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ixor_xforms); i++) {
19009             const struct transform *xform = &nir_opt_algebraic_ixor_xforms[i];
19010             if (condition_flags[xform->condition_offset] &&
19011                 nir_replace_instr(alu, xform->search, xform->replace,
19012                                   mem_ctx)) {
19013                progress = true;
19014                break;
19015             }
19016          }
19017          break;
19018       case nir_op_seq:
19019          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_seq_xforms); i++) {
19020             const struct transform *xform = &nir_opt_algebraic_seq_xforms[i];
19021             if (condition_flags[xform->condition_offset] &&
19022                 nir_replace_instr(alu, xform->search, xform->replace,
19023                                   mem_ctx)) {
19024                progress = true;
19025                break;
19026             }
19027          }
19028          break;
19029       case nir_op_ilt:
19030          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ilt_xforms); i++) {
19031             const struct transform *xform = &nir_opt_algebraic_ilt_xforms[i];
19032             if (condition_flags[xform->condition_offset] &&
19033                 nir_replace_instr(alu, xform->search, xform->replace,
19034                                   mem_ctx)) {
19035                progress = true;
19036                break;
19037             }
19038          }
19039          break;
19040       case nir_op_umod:
19041          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_umod_xforms); i++) {
19042             const struct transform *xform = &nir_opt_algebraic_umod_xforms[i];
19043             if (condition_flags[xform->condition_offset] &&
19044                 nir_replace_instr(alu, xform->search, xform->replace,
19045                                   mem_ctx)) {
19046                progress = true;
19047                break;
19048             }
19049          }
19050          break;
19051       case nir_op_imul:
19052          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_imul_xforms); i++) {
19053             const struct transform *xform = &nir_opt_algebraic_imul_xforms[i];
19054             if (condition_flags[xform->condition_offset] &&
19055                 nir_replace_instr(alu, xform->search, xform->replace,
19056                                   mem_ctx)) {
19057                progress = true;
19058                break;
19059             }
19060          }
19061          break;
19062       case nir_op_uge:
19063          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_uge_xforms); i++) {
19064             const struct transform *xform = &nir_opt_algebraic_uge_xforms[i];
19065             if (condition_flags[xform->condition_offset] &&
19066                 nir_replace_instr(alu, xform->search, xform->replace,
19067                                   mem_ctx)) {
19068                progress = true;
19069                break;
19070             }
19071          }
19072          break;
19073       case nir_op_ineg:
19074          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ineg_xforms); i++) {
19075             const struct transform *xform = &nir_opt_algebraic_ineg_xforms[i];
19076             if (condition_flags[xform->condition_offset] &&
19077                 nir_replace_instr(alu, xform->search, xform->replace,
19078                                   mem_ctx)) {
19079                progress = true;
19080                break;
19081             }
19082          }
19083          break;
19084       case nir_op_fmul:
19085          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fmul_xforms); i++) {
19086             const struct transform *xform = &nir_opt_algebraic_fmul_xforms[i];
19087             if (condition_flags[xform->condition_offset] &&
19088                 nir_replace_instr(alu, xform->search, xform->replace,
19089                                   mem_ctx)) {
19090                progress = true;
19091                break;
19092             }
19093          }
19094          break;
19095       case nir_op_unpack_64_2x32_split_x:
19096          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_unpack_64_2x32_split_x_xforms); i++) {
19097             const struct transform *xform = &nir_opt_algebraic_unpack_64_2x32_split_x_xforms[i];
19098             if (condition_flags[xform->condition_offset] &&
19099                 nir_replace_instr(alu, xform->search, xform->replace,
19100                                   mem_ctx)) {
19101                progress = true;
19102                break;
19103             }
19104          }
19105          break;
19106       case nir_op_ffma:
19107          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ffma_xforms); i++) {
19108             const struct transform *xform = &nir_opt_algebraic_ffma_xforms[i];
19109             if (condition_flags[xform->condition_offset] &&
19110                 nir_replace_instr(alu, xform->search, xform->replace,
19111                                   mem_ctx)) {
19112                progress = true;
19113                break;
19114             }
19115          }
19116          break;
19117       case nir_op_umin:
19118          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_umin_xforms); i++) {
19119             const struct transform *xform = &nir_opt_algebraic_umin_xforms[i];
19120             if (condition_flags[xform->condition_offset] &&
19121                 nir_replace_instr(alu, xform->search, xform->replace,
19122                                   mem_ctx)) {
19123                progress = true;
19124                break;
19125             }
19126          }
19127          break;
19128       case nir_op_umax:
19129          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_umax_xforms); i++) {
19130             const struct transform *xform = &nir_opt_algebraic_umax_xforms[i];
19131             if (condition_flags[xform->condition_offset] &&
19132                 nir_replace_instr(alu, xform->search, xform->replace,
19133                                   mem_ctx)) {
19134                progress = true;
19135                break;
19136             }
19137          }
19138          break;
19139       case nir_op_bcsel:
19140          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_bcsel_xforms); i++) {
19141             const struct transform *xform = &nir_opt_algebraic_bcsel_xforms[i];
19142             if (condition_flags[xform->condition_offset] &&
19143                 nir_replace_instr(alu, xform->search, xform->replace,
19144                                   mem_ctx)) {
19145                progress = true;
19146                break;
19147             }
19148          }
19149          break;
19150       case nir_op_sge:
19151          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_sge_xforms); i++) {
19152             const struct transform *xform = &nir_opt_algebraic_sge_xforms[i];
19153             if (condition_flags[xform->condition_offset] &&
19154                 nir_replace_instr(alu, xform->search, xform->replace,
19155                                   mem_ctx)) {
19156                progress = true;
19157                break;
19158             }
19159          }
19160          break;
19161       case nir_op_fsqrt:
19162          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fsqrt_xforms); i++) {
19163             const struct transform *xform = &nir_opt_algebraic_fsqrt_xforms[i];
19164             if (condition_flags[xform->condition_offset] &&
19165                 nir_replace_instr(alu, xform->search, xform->replace,
19166                                   mem_ctx)) {
19167                progress = true;
19168                break;
19169             }
19170          }
19171          break;
19172       case nir_op_iadd:
19173          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_iadd_xforms); i++) {
19174             const struct transform *xform = &nir_opt_algebraic_iadd_xforms[i];
19175             if (condition_flags[xform->condition_offset] &&
19176                 nir_replace_instr(alu, xform->search, xform->replace,
19177                                   mem_ctx)) {
19178                progress = true;
19179                break;
19180             }
19181          }
19182          break;
19183       case nir_op_pack_unorm_2x16:
19184          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_pack_unorm_2x16_xforms); i++) {
19185             const struct transform *xform = &nir_opt_algebraic_pack_unorm_2x16_xforms[i];
19186             if (condition_flags[xform->condition_offset] &&
19187                 nir_replace_instr(alu, xform->search, xform->replace,
19188                                   mem_ctx)) {
19189                progress = true;
19190                break;
19191             }
19192          }
19193          break;
19194       case nir_op_pack_unorm_4x8:
19195          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_pack_unorm_4x8_xforms); i++) {
19196             const struct transform *xform = &nir_opt_algebraic_pack_unorm_4x8_xforms[i];
19197             if (condition_flags[xform->condition_offset] &&
19198                 nir_replace_instr(alu, xform->search, xform->replace,
19199                                   mem_ctx)) {
19200                progress = true;
19201                break;
19202             }
19203          }
19204          break;
19205       case nir_op_pack_snorm_4x8:
19206          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_pack_snorm_4x8_xforms); i++) {
19207             const struct transform *xform = &nir_opt_algebraic_pack_snorm_4x8_xforms[i];
19208             if (condition_flags[xform->condition_offset] &&
19209                 nir_replace_instr(alu, xform->search, xform->replace,
19210                                   mem_ctx)) {
19211                progress = true;
19212                break;
19213             }
19214          }
19215          break;
19216       case nir_op_fand:
19217          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fand_xforms); i++) {
19218             const struct transform *xform = &nir_opt_algebraic_fand_xforms[i];
19219             if (condition_flags[xform->condition_offset] &&
19220                 nir_replace_instr(alu, xform->search, xform->replace,
19221                                   mem_ctx)) {
19222                progress = true;
19223                break;
19224             }
19225          }
19226          break;
19227       case nir_op_fabs:
19228          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fabs_xforms); i++) {
19229             const struct transform *xform = &nir_opt_algebraic_fabs_xforms[i];
19230             if (condition_flags[xform->condition_offset] &&
19231                 nir_replace_instr(alu, xform->search, xform->replace,
19232                                   mem_ctx)) {
19233                progress = true;
19234                break;
19235             }
19236          }
19237          break;
19238       case nir_op_imod:
19239          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_imod_xforms); i++) {
19240             const struct transform *xform = &nir_opt_algebraic_imod_xforms[i];
19241             if (condition_flags[xform->condition_offset] &&
19242                 nir_replace_instr(alu, xform->search, xform->replace,
19243                                   mem_ctx)) {
19244                progress = true;
19245                break;
19246             }
19247          }
19248          break;
19249       case nir_op_ieq:
19250          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ieq_xforms); i++) {
19251             const struct transform *xform = &nir_opt_algebraic_ieq_xforms[i];
19252             if (condition_flags[xform->condition_offset] &&
19253                 nir_replace_instr(alu, xform->search, xform->replace,
19254                                   mem_ctx)) {
19255                progress = true;
19256                break;
19257             }
19258          }
19259          break;
19260       case nir_op_usub_borrow:
19261          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_usub_borrow_xforms); i++) {
19262             const struct transform *xform = &nir_opt_algebraic_usub_borrow_xforms[i];
19263             if (condition_flags[xform->condition_offset] &&
19264                 nir_replace_instr(alu, xform->search, xform->replace,
19265                                   mem_ctx)) {
19266                progress = true;
19267                break;
19268             }
19269          }
19270          break;
19271       case nir_op_imin:
19272          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_imin_xforms); i++) {
19273             const struct transform *xform = &nir_opt_algebraic_imin_xforms[i];
19274             if (condition_flags[xform->condition_offset] &&
19275                 nir_replace_instr(alu, xform->search, xform->replace,
19276                                   mem_ctx)) {
19277                progress = true;
19278                break;
19279             }
19280          }
19281          break;
19282       case nir_op_frsq:
19283          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_frsq_xforms); i++) {
19284             const struct transform *xform = &nir_opt_algebraic_frsq_xforms[i];
19285             if (condition_flags[xform->condition_offset] &&
19286                 nir_replace_instr(alu, xform->search, xform->replace,
19287                                   mem_ctx)) {
19288                progress = true;
19289                break;
19290             }
19291          }
19292          break;
19293       case nir_op_usadd_4x8:
19294          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_usadd_4x8_xforms); i++) {
19295             const struct transform *xform = &nir_opt_algebraic_usadd_4x8_xforms[i];
19296             if (condition_flags[xform->condition_offset] &&
19297                 nir_replace_instr(alu, xform->search, xform->replace,
19298                                   mem_ctx)) {
19299                progress = true;
19300                break;
19301             }
19302          }
19303          break;
19304       case nir_op_idiv:
19305          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_idiv_xforms); i++) {
19306             const struct transform *xform = &nir_opt_algebraic_idiv_xforms[i];
19307             if (condition_flags[xform->condition_offset] &&
19308                 nir_replace_instr(alu, xform->search, xform->replace,
19309                                   mem_ctx)) {
19310                progress = true;
19311                break;
19312             }
19313          }
19314          break;
19315       case nir_op_extract_u8:
19316          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_extract_u8_xforms); i++) {
19317             const struct transform *xform = &nir_opt_algebraic_extract_u8_xforms[i];
19318             if (condition_flags[xform->condition_offset] &&
19319                 nir_replace_instr(alu, xform->search, xform->replace,
19320                                   mem_ctx)) {
19321                progress = true;
19322                break;
19323             }
19324          }
19325          break;
19326       case nir_op_pack_snorm_2x16:
19327          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_pack_snorm_2x16_xforms); i++) {
19328             const struct transform *xform = &nir_opt_algebraic_pack_snorm_2x16_xforms[i];
19329             if (condition_flags[xform->condition_offset] &&
19330                 nir_replace_instr(alu, xform->search, xform->replace,
19331                                   mem_ctx)) {
19332                progress = true;
19333                break;
19334             }
19335          }
19336          break;
19337       case nir_op_fpow:
19338          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fpow_xforms); i++) {
19339             const struct transform *xform = &nir_opt_algebraic_fpow_xforms[i];
19340             if (condition_flags[xform->condition_offset] &&
19341                 nir_replace_instr(alu, xform->search, xform->replace,
19342                                   mem_ctx)) {
19343                progress = true;
19344                break;
19345             }
19346          }
19347          break;
19348       case nir_op_ige:
19349          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ige_xforms); i++) {
19350             const struct transform *xform = &nir_opt_algebraic_ige_xforms[i];
19351             if (condition_flags[xform->condition_offset] &&
19352                 nir_replace_instr(alu, xform->search, xform->replace,
19353                                   mem_ctx)) {
19354                progress = true;
19355                break;
19356             }
19357          }
19358          break;
19359       case nir_op_fdiv:
19360          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fdiv_xforms); i++) {
19361             const struct transform *xform = &nir_opt_algebraic_fdiv_xforms[i];
19362             if (condition_flags[xform->condition_offset] &&
19363                 nir_replace_instr(alu, xform->search, xform->replace,
19364                                   mem_ctx)) {
19365                progress = true;
19366                break;
19367             }
19368          }
19369          break;
19370       case nir_op_ffract:
19371          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ffract_xforms); i++) {
19372             const struct transform *xform = &nir_opt_algebraic_ffract_xforms[i];
19373             if (condition_flags[xform->condition_offset] &&
19374                 nir_replace_instr(alu, xform->search, xform->replace,
19375                                   mem_ctx)) {
19376                progress = true;
19377                break;
19378             }
19379          }
19380          break;
19381       case nir_op_fadd:
19382          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fadd_xforms); i++) {
19383             const struct transform *xform = &nir_opt_algebraic_fadd_xforms[i];
19384             if (condition_flags[xform->condition_offset] &&
19385                 nir_replace_instr(alu, xform->search, xform->replace,
19386                                   mem_ctx)) {
19387                progress = true;
19388                break;
19389             }
19390          }
19391          break;
19392       case nir_op_ishl:
19393          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ishl_xforms); i++) {
19394             const struct transform *xform = &nir_opt_algebraic_ishl_xforms[i];
19395             if (condition_flags[xform->condition_offset] &&
19396                 nir_replace_instr(alu, xform->search, xform->replace,
19397                                   mem_ctx)) {
19398                progress = true;
19399                break;
19400             }
19401          }
19402          break;
19403       case nir_op_f2u32:
19404          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_f2u32_xforms); i++) {
19405             const struct transform *xform = &nir_opt_algebraic_f2u32_xforms[i];
19406             if (condition_flags[xform->condition_offset] &&
19407                 nir_replace_instr(alu, xform->search, xform->replace,
19408                                   mem_ctx)) {
19409                progress = true;
19410                break;
19411             }
19412          }
19413          break;
19414       case nir_op_flog2:
19415          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_flog2_xforms); i++) {
19416             const struct transform *xform = &nir_opt_algebraic_flog2_xforms[i];
19417             if (condition_flags[xform->condition_offset] &&
19418                 nir_replace_instr(alu, xform->search, xform->replace,
19419                                   mem_ctx)) {
19420                progress = true;
19421                break;
19422             }
19423          }
19424          break;
19425       case nir_op_inot:
19426          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_inot_xforms); i++) {
19427             const struct transform *xform = &nir_opt_algebraic_inot_xforms[i];
19428             if (condition_flags[xform->condition_offset] &&
19429                 nir_replace_instr(alu, xform->search, xform->replace,
19430                                   mem_ctx)) {
19431                progress = true;
19432                break;
19433             }
19434          }
19435          break;
19436       case nir_op_sne:
19437          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_sne_xforms); i++) {
19438             const struct transform *xform = &nir_opt_algebraic_sne_xforms[i];
19439             if (condition_flags[xform->condition_offset] &&
19440                 nir_replace_instr(alu, xform->search, xform->replace,
19441                                   mem_ctx)) {
19442                progress = true;
19443                break;
19444             }
19445          }
19446          break;
19447       case nir_op_fmod:
19448          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fmod_xforms); i++) {
19449             const struct transform *xform = &nir_opt_algebraic_fmod_xforms[i];
19450             if (condition_flags[xform->condition_offset] &&
19451                 nir_replace_instr(alu, xform->search, xform->replace,
19452                                   mem_ctx)) {
19453                progress = true;
19454                break;
19455             }
19456          }
19457          break;
19458       case nir_op_pack_64_2x32_split:
19459          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_pack_64_2x32_split_xforms); i++) {
19460             const struct transform *xform = &nir_opt_algebraic_pack_64_2x32_split_xforms[i];
19461             if (condition_flags[xform->condition_offset] &&
19462                 nir_replace_instr(alu, xform->search, xform->replace,
19463                                   mem_ctx)) {
19464                progress = true;
19465                break;
19466             }
19467          }
19468          break;
19469       case nir_op_fcsel:
19470          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fcsel_xforms); i++) {
19471             const struct transform *xform = &nir_opt_algebraic_fcsel_xforms[i];
19472             if (condition_flags[xform->condition_offset] &&
19473                 nir_replace_instr(alu, xform->search, xform->replace,
19474                                   mem_ctx)) {
19475                progress = true;
19476                break;
19477             }
19478          }
19479          break;
19480       case nir_op_isub:
19481          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_isub_xforms); i++) {
19482             const struct transform *xform = &nir_opt_algebraic_isub_xforms[i];
19483             if (condition_flags[xform->condition_offset] &&
19484                 nir_replace_instr(alu, xform->search, xform->replace,
19485                                   mem_ctx)) {
19486                progress = true;
19487                break;
19488             }
19489          }
19490          break;
19491       case nir_op_fmax:
19492          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fmax_xforms); i++) {
19493             const struct transform *xform = &nir_opt_algebraic_fmax_xforms[i];
19494             if (condition_flags[xform->condition_offset] &&
19495                 nir_replace_instr(alu, xform->search, xform->replace,
19496                                   mem_ctx)) {
19497                progress = true;
19498                break;
19499             }
19500          }
19501          break;
19502       case nir_op_umul_unorm_4x8:
19503          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_umul_unorm_4x8_xforms); i++) {
19504             const struct transform *xform = &nir_opt_algebraic_umul_unorm_4x8_xforms[i];
19505             if (condition_flags[xform->condition_offset] &&
19506                 nir_replace_instr(alu, xform->search, xform->replace,
19507                                   mem_ctx)) {
19508                progress = true;
19509                break;
19510             }
19511          }
19512          break;
19513       case nir_op_bitfield_insert:
19514          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_bitfield_insert_xforms); i++) {
19515             const struct transform *xform = &nir_opt_algebraic_bitfield_insert_xforms[i];
19516             if (condition_flags[xform->condition_offset] &&
19517                 nir_replace_instr(alu, xform->search, xform->replace,
19518                                   mem_ctx)) {
19519                progress = true;
19520                break;
19521             }
19522          }
19523          break;
19524       case nir_op_feq:
19525          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_feq_xforms); i++) {
19526             const struct transform *xform = &nir_opt_algebraic_feq_xforms[i];
19527             if (condition_flags[xform->condition_offset] &&
19528                 nir_replace_instr(alu, xform->search, xform->replace,
19529                                   mem_ctx)) {
19530                progress = true;
19531                break;
19532             }
19533          }
19534          break;
19535       case nir_op_flrp:
19536          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_flrp_xforms); i++) {
19537             const struct transform *xform = &nir_opt_algebraic_flrp_xforms[i];
19538             if (condition_flags[xform->condition_offset] &&
19539                 nir_replace_instr(alu, xform->search, xform->replace,
19540                                   mem_ctx)) {
19541                progress = true;
19542                break;
19543             }
19544          }
19545          break;
19546       case nir_op_ior:
19547          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ior_xforms); i++) {
19548             const struct transform *xform = &nir_opt_algebraic_ior_xforms[i];
19549             if (condition_flags[xform->condition_offset] &&
19550                 nir_replace_instr(alu, xform->search, xform->replace,
19551                                   mem_ctx)) {
19552                progress = true;
19553                break;
19554             }
19555          }
19556          break;
19557       case nir_op_ussub_4x8:
19558          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ussub_4x8_xforms); i++) {
19559             const struct transform *xform = &nir_opt_algebraic_ussub_4x8_xforms[i];
19560             if (condition_flags[xform->condition_offset] &&
19561                 nir_replace_instr(alu, xform->search, xform->replace,
19562                                   mem_ctx)) {
19563                progress = true;
19564                break;
19565             }
19566          }
19567          break;
19568       case nir_op_unpack_snorm_4x8:
19569          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_unpack_snorm_4x8_xforms); i++) {
19570             const struct transform *xform = &nir_opt_algebraic_unpack_snorm_4x8_xforms[i];
19571             if (condition_flags[xform->condition_offset] &&
19572                 nir_replace_instr(alu, xform->search, xform->replace,
19573                                   mem_ctx)) {
19574                progress = true;
19575                break;
19576             }
19577          }
19578          break;
19579       case nir_op_frem:
19580          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_frem_xforms); i++) {
19581             const struct transform *xform = &nir_opt_algebraic_frem_xforms[i];
19582             if (condition_flags[xform->condition_offset] &&
19583                 nir_replace_instr(alu, xform->search, xform->replace,
19584                                   mem_ctx)) {
19585                progress = true;
19586                break;
19587             }
19588          }
19589          break;
19590       case nir_op_unpack_64_2x32_split_y:
19591          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_unpack_64_2x32_split_y_xforms); i++) {
19592             const struct transform *xform = &nir_opt_algebraic_unpack_64_2x32_split_y_xforms[i];
19593             if (condition_flags[xform->condition_offset] &&
19594                 nir_replace_instr(alu, xform->search, xform->replace,
19595                                   mem_ctx)) {
19596                progress = true;
19597                break;
19598             }
19599          }
19600          break;
19601       case nir_op_unpack_unorm_2x16:
19602          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_unpack_unorm_2x16_xforms); i++) {
19603             const struct transform *xform = &nir_opt_algebraic_unpack_unorm_2x16_xforms[i];
19604             if (condition_flags[xform->condition_offset] &&
19605                 nir_replace_instr(alu, xform->search, xform->replace,
19606                                   mem_ctx)) {
19607                progress = true;
19608                break;
19609             }
19610          }
19611          break;
19612       case nir_op_unpack_snorm_2x16:
19613          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_unpack_snorm_2x16_xforms); i++) {
19614             const struct transform *xform = &nir_opt_algebraic_unpack_snorm_2x16_xforms[i];
19615             if (condition_flags[xform->condition_offset] &&
19616                 nir_replace_instr(alu, xform->search, xform->replace,
19617                                   mem_ctx)) {
19618                progress = true;
19619                break;
19620             }
19621          }
19622          break;
19623       case nir_op_imax:
19624          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_imax_xforms); i++) {
19625             const struct transform *xform = &nir_opt_algebraic_imax_xforms[i];
19626             if (condition_flags[xform->condition_offset] &&
19627                 nir_replace_instr(alu, xform->search, xform->replace,
19628                                   mem_ctx)) {
19629                progress = true;
19630                break;
19631             }
19632          }
19633          break;
19634       case nir_op_fsat:
19635          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fsat_xforms); i++) {
19636             const struct transform *xform = &nir_opt_algebraic_fsat_xforms[i];
19637             if (condition_flags[xform->condition_offset] &&
19638                 nir_replace_instr(alu, xform->search, xform->replace,
19639                                   mem_ctx)) {
19640                progress = true;
19641                break;
19642             }
19643          }
19644          break;
19645       case nir_op_extract_u16:
19646          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_extract_u16_xforms); i++) {
19647             const struct transform *xform = &nir_opt_algebraic_extract_u16_xforms[i];
19648             if (condition_flags[xform->condition_offset] &&
19649                 nir_replace_instr(alu, xform->search, xform->replace,
19650                                   mem_ctx)) {
19651                progress = true;
19652                break;
19653             }
19654          }
19655          break;
19656       case nir_op_fge:
19657          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fge_xforms); i++) {
19658             const struct transform *xform = &nir_opt_algebraic_fge_xforms[i];
19659             if (condition_flags[xform->condition_offset] &&
19660                 nir_replace_instr(alu, xform->search, xform->replace,
19661                                   mem_ctx)) {
19662                progress = true;
19663                break;
19664             }
19665          }
19666          break;
19667       case nir_op_frcp:
19668          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_frcp_xforms); i++) {
19669             const struct transform *xform = &nir_opt_algebraic_frcp_xforms[i];
19670             if (condition_flags[xform->condition_offset] &&
19671                 nir_replace_instr(alu, xform->search, xform->replace,
19672                                   mem_ctx)) {
19673                progress = true;
19674                break;
19675             }
19676          }
19677          break;
19678       case nir_op_fxor:
19679          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fxor_xforms); i++) {
19680             const struct transform *xform = &nir_opt_algebraic_fxor_xforms[i];
19681             if (condition_flags[xform->condition_offset] &&
19682                 nir_replace_instr(alu, xform->search, xform->replace,
19683                                   mem_ctx)) {
19684                progress = true;
19685                break;
19686             }
19687          }
19688          break;
19689       case nir_op_ushr:
19690          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ushr_xforms); i++) {
19691             const struct transform *xform = &nir_opt_algebraic_ushr_xforms[i];
19692             if (condition_flags[xform->condition_offset] &&
19693                 nir_replace_instr(alu, xform->search, xform->replace,
19694                                   mem_ctx)) {
19695                progress = true;
19696                break;
19697             }
19698          }
19699          break;
19700       case nir_op_fexp2:
19701          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fexp2_xforms); i++) {
19702             const struct transform *xform = &nir_opt_algebraic_fexp2_xforms[i];
19703             if (condition_flags[xform->condition_offset] &&
19704                 nir_replace_instr(alu, xform->search, xform->replace,
19705                                   mem_ctx)) {
19706                progress = true;
19707                break;
19708             }
19709          }
19710          break;
19711       case nir_op_ishr:
19712          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ishr_xforms); i++) {
19713             const struct transform *xform = &nir_opt_algebraic_ishr_xforms[i];
19714             if (condition_flags[xform->condition_offset] &&
19715                 nir_replace_instr(alu, xform->search, xform->replace,
19716                                   mem_ctx)) {
19717                progress = true;
19718                break;
19719             }
19720          }
19721          break;
19722       case nir_op_ubitfield_extract:
19723          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ubitfield_extract_xforms); i++) {
19724             const struct transform *xform = &nir_opt_algebraic_ubitfield_extract_xforms[i];
19725             if (condition_flags[xform->condition_offset] &&
19726                 nir_replace_instr(alu, xform->search, xform->replace,
19727                                   mem_ctx)) {
19728                progress = true;
19729                break;
19730             }
19731          }
19732          break;
19733       case nir_op_slt:
19734          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_slt_xforms); i++) {
19735             const struct transform *xform = &nir_opt_algebraic_slt_xforms[i];
19736             if (condition_flags[xform->condition_offset] &&
19737                 nir_replace_instr(alu, xform->search, xform->replace,
19738                                   mem_ctx)) {
19739                progress = true;
19740                break;
19741             }
19742          }
19743          break;
19744       case nir_op_flt:
19745          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_flt_xforms); i++) {
19746             const struct transform *xform = &nir_opt_algebraic_flt_xforms[i];
19747             if (condition_flags[xform->condition_offset] &&
19748                 nir_replace_instr(alu, xform->search, xform->replace,
19749                                   mem_ctx)) {
19750                progress = true;
19751                break;
19752             }
19753          }
19754          break;
19755       case nir_op_ult:
19756          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ult_xforms); i++) {
19757             const struct transform *xform = &nir_opt_algebraic_ult_xforms[i];
19758             if (condition_flags[xform->condition_offset] &&
19759                 nir_replace_instr(alu, xform->search, xform->replace,
19760                                   mem_ctx)) {
19761                progress = true;
19762                break;
19763             }
19764          }
19765          break;
19766       case nir_op_f2i32:
19767          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_f2i32_xforms); i++) {
19768             const struct transform *xform = &nir_opt_algebraic_f2i32_xforms[i];
19769             if (condition_flags[xform->condition_offset] &&
19770                 nir_replace_instr(alu, xform->search, xform->replace,
19771                                   mem_ctx)) {
19772                progress = true;
19773                break;
19774             }
19775          }
19776          break;
19777       case nir_op_fneg:
19778          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fneg_xforms); i++) {
19779             const struct transform *xform = &nir_opt_algebraic_fneg_xforms[i];
19780             if (condition_flags[xform->condition_offset] &&
19781                 nir_replace_instr(alu, xform->search, xform->replace,
19782                                   mem_ctx)) {
19783                progress = true;
19784                break;
19785             }
19786          }
19787          break;
19788       case nir_op_fsub:
19789          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fsub_xforms); i++) {
19790             const struct transform *xform = &nir_opt_algebraic_fsub_xforms[i];
19791             if (condition_flags[xform->condition_offset] &&
19792                 nir_replace_instr(alu, xform->search, xform->replace,
19793                                   mem_ctx)) {
19794                progress = true;
19795                break;
19796             }
19797          }
19798          break;
19799       case nir_op_fne:
19800          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fne_xforms); i++) {
19801             const struct transform *xform = &nir_opt_algebraic_fne_xforms[i];
19802             if (condition_flags[xform->condition_offset] &&
19803                 nir_replace_instr(alu, xform->search, xform->replace,
19804                                   mem_ctx)) {
19805                progress = true;
19806                break;
19807             }
19808          }
19809          break;
19810       case nir_op_iabs:
19811          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_iabs_xforms); i++) {
19812             const struct transform *xform = &nir_opt_algebraic_iabs_xforms[i];
19813             if (condition_flags[xform->condition_offset] &&
19814                 nir_replace_instr(alu, xform->search, xform->replace,
19815                                   mem_ctx)) {
19816                progress = true;
19817                break;
19818             }
19819          }
19820          break;
19821       case nir_op_unpack_unorm_4x8:
19822          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_unpack_unorm_4x8_xforms); i++) {
19823             const struct transform *xform = &nir_opt_algebraic_unpack_unorm_4x8_xforms[i];
19824             if (condition_flags[xform->condition_offset] &&
19825                 nir_replace_instr(alu, xform->search, xform->replace,
19826                                   mem_ctx)) {
19827                progress = true;
19828                break;
19829             }
19830          }
19831          break;
19832       case nir_op_fmin:
19833          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_fmin_xforms); i++) {
19834             const struct transform *xform = &nir_opt_algebraic_fmin_xforms[i];
19835             if (condition_flags[xform->condition_offset] &&
19836                 nir_replace_instr(alu, xform->search, xform->replace,
19837                                   mem_ctx)) {
19838                progress = true;
19839                break;
19840             }
19841          }
19842          break;
19843       case nir_op_ine:
19844          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ine_xforms); i++) {
19845             const struct transform *xform = &nir_opt_algebraic_ine_xforms[i];
19846             if (condition_flags[xform->condition_offset] &&
19847                 nir_replace_instr(alu, xform->search, xform->replace,
19848                                   mem_ctx)) {
19849                progress = true;
19850                break;
19851             }
19852          }
19853          break;
19854       case nir_op_udiv:
19855          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_udiv_xforms); i++) {
19856             const struct transform *xform = &nir_opt_algebraic_udiv_xforms[i];
19857             if (condition_flags[xform->condition_offset] &&
19858                 nir_replace_instr(alu, xform->search, xform->replace,
19859                                   mem_ctx)) {
19860                progress = true;
19861                break;
19862             }
19863          }
19864          break;
19865       case nir_op_extract_i8:
19866          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_extract_i8_xforms); i++) {
19867             const struct transform *xform = &nir_opt_algebraic_extract_i8_xforms[i];
19868             if (condition_flags[xform->condition_offset] &&
19869                 nir_replace_instr(alu, xform->search, xform->replace,
19870                                   mem_ctx)) {
19871                progress = true;
19872                break;
19873             }
19874          }
19875          break;
19876       case nir_op_uadd_carry:
19877          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_uadd_carry_xforms); i++) {
19878             const struct transform *xform = &nir_opt_algebraic_uadd_carry_xforms[i];
19879             if (condition_flags[xform->condition_offset] &&
19880                 nir_replace_instr(alu, xform->search, xform->replace,
19881                                   mem_ctx)) {
19882                progress = true;
19883                break;
19884             }
19885          }
19886          break;
19887       case nir_op_ibitfield_extract:
19888          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ibitfield_extract_xforms); i++) {
19889             const struct transform *xform = &nir_opt_algebraic_ibitfield_extract_xforms[i];
19890             if (condition_flags[xform->condition_offset] &&
19891                 nir_replace_instr(alu, xform->search, xform->replace,
19892                                   mem_ctx)) {
19893                progress = true;
19894                break;
19895             }
19896          }
19897          break;
19898       case nir_op_ldexp:
19899          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_ldexp_xforms); i++) {
19900             const struct transform *xform = &nir_opt_algebraic_ldexp_xforms[i];
19901             if (condition_flags[xform->condition_offset] &&
19902                 nir_replace_instr(alu, xform->search, xform->replace,
19903                                   mem_ctx)) {
19904                progress = true;
19905                break;
19906             }
19907          }
19908          break;
19909       case nir_op_extract_i16:
19910          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_extract_i16_xforms); i++) {
19911             const struct transform *xform = &nir_opt_algebraic_extract_i16_xforms[i];
19912             if (condition_flags[xform->condition_offset] &&
19913                 nir_replace_instr(alu, xform->search, xform->replace,
19914                                   mem_ctx)) {
19915                progress = true;
19916                break;
19917             }
19918          }
19919          break;
19920       default:
19921          break;
19922       }
19923    }
19924 
19925    return progress;
19926 }
19927 
19928 static bool
nir_opt_algebraic_impl(nir_function_impl * impl,const bool * condition_flags)19929 nir_opt_algebraic_impl(nir_function_impl *impl, const bool *condition_flags)
19930 {
19931    void *mem_ctx = ralloc_parent(impl);
19932    bool progress = false;
19933 
19934    nir_foreach_block_reverse(block, impl) {
19935       progress |= nir_opt_algebraic_block(block, condition_flags, mem_ctx);
19936    }
19937 
19938    if (progress)
19939       nir_metadata_preserve(impl, nir_metadata_block_index |
19940                                   nir_metadata_dominance);
19941 
19942    return progress;
19943 }
19944 
19945 
19946 bool
nir_opt_algebraic(nir_shader * shader)19947 nir_opt_algebraic(nir_shader *shader)
19948 {
19949    bool progress = false;
19950    bool condition_flags[37];
19951    const nir_shader_compiler_options *options = shader->options;
19952    (void) options;
19953 
19954    condition_flags[0] = true;
19955    condition_flags[1] = options->lower_idiv;
19956    condition_flags[2] = options->lower_flrp32;
19957    condition_flags[3] = options->lower_flrp64;
19958    condition_flags[4] = options->lower_ffract;
19959    condition_flags[5] = !options->lower_flrp32;
19960    condition_flags[6] = !options->lower_flrp64;
19961    condition_flags[7] = options->lower_ffma;
19962    condition_flags[8] = options->fuse_ffma;
19963    condition_flags[9] = !options->lower_fsat;
19964    condition_flags[10] = options->lower_fsat;
19965    condition_flags[11] = options->lower_scmp;
19966    condition_flags[12] = options->lower_fpow;
19967    condition_flags[13] = !options->lower_fpow;
19968    condition_flags[14] = options->lower_fdiv;
19969    condition_flags[15] = options->lower_fsqrt;
19970    condition_flags[16] = !options->lower_fsqrt;
19971    condition_flags[17] = !options->lower_extract_byte;
19972    condition_flags[18] = !options->lower_extract_word;
19973    condition_flags[19] = options->lower_sub;
19974    condition_flags[20] = options->lower_negate;
19975    condition_flags[21] = options->lower_fmod32;
19976    condition_flags[22] = options->lower_fmod64;
19977    condition_flags[23] = options->lower_uadd_carry;
19978    condition_flags[24] = options->lower_usub_borrow;
19979    condition_flags[25] = options->lower_bitfield_insert;
19980    condition_flags[26] = options->lower_bitfield_extract;
19981    condition_flags[27] = options->lower_extract_byte;
19982    condition_flags[28] = options->lower_extract_word;
19983    condition_flags[29] = options->lower_pack_unorm_2x16;
19984    condition_flags[30] = options->lower_pack_unorm_4x8;
19985    condition_flags[31] = options->lower_pack_snorm_2x16;
19986    condition_flags[32] = options->lower_pack_snorm_4x8;
19987    condition_flags[33] = options->lower_unpack_unorm_2x16;
19988    condition_flags[34] = options->lower_unpack_unorm_4x8;
19989    condition_flags[35] = options->lower_unpack_snorm_2x16;
19990    condition_flags[36] = options->lower_unpack_snorm_4x8;
19991 
19992    nir_foreach_function(function, shader) {
19993       if (function->impl)
19994          progress |= nir_opt_algebraic_impl(function->impl, condition_flags);
19995    }
19996 
19997    return progress;
19998 }
19999 
20000 
20001 #include "nir.h"
20002 #include "nir_search.h"
20003 #include "nir_search_helpers.h"
20004 
20005 #ifndef NIR_OPT_ALGEBRAIC_STRUCT_DEFS
20006 #define NIR_OPT_ALGEBRAIC_STRUCT_DEFS
20007 
20008 struct transform {
20009    const nir_search_expression *search;
20010    const nir_search_value *replace;
20011    unsigned condition_offset;
20012 };
20013 
20014 #endif
20015 
20016 
20017 static const nir_search_variable search289_0_0 = {
20018    { nir_search_value_variable, 0 },
20019    0, /* a */
20020    false,
20021    nir_type_invalid,
20022    (is_not_const),
20023 };
20024 
20025 static const nir_search_variable search289_0_1 = {
20026    { nir_search_value_variable, 0 },
20027    1, /* b */
20028    true,
20029    nir_type_invalid,
20030    NULL,
20031 };
20032 static const nir_search_expression search289_0 = {
20033    { nir_search_value_expression, 0 },
20034    false,
20035    nir_op_fmul,
20036    { &search289_0_0.value, &search289_0_1.value },
20037    (is_used_once),
20038 };
20039 
20040 static const nir_search_variable search289_1 = {
20041    { nir_search_value_variable, 0 },
20042    2, /* c */
20043    false,
20044    nir_type_invalid,
20045    (is_not_const),
20046 };
20047 static const nir_search_expression search289 = {
20048    { nir_search_value_expression, 0 },
20049    true,
20050    nir_op_fmul,
20051    { &search289_0.value, &search289_1.value },
20052    (is_used_once),
20053 };
20054 
20055 static const nir_search_variable replace289_0_0 = {
20056    { nir_search_value_variable, 0 },
20057    0, /* a */
20058    false,
20059    nir_type_invalid,
20060    NULL,
20061 };
20062 
20063 static const nir_search_variable replace289_0_1 = {
20064    { nir_search_value_variable, 0 },
20065    2, /* c */
20066    false,
20067    nir_type_invalid,
20068    NULL,
20069 };
20070 static const nir_search_expression replace289_0 = {
20071    { nir_search_value_expression, 0 },
20072    false,
20073    nir_op_fmul,
20074    { &replace289_0_0.value, &replace289_0_1.value },
20075    NULL,
20076 };
20077 
20078 static const nir_search_variable replace289_1 = {
20079    { nir_search_value_variable, 0 },
20080    1, /* b */
20081    false,
20082    nir_type_invalid,
20083    NULL,
20084 };
20085 static const nir_search_expression replace289 = {
20086    { nir_search_value_expression, 0 },
20087    false,
20088    nir_op_fmul,
20089    { &replace289_0.value, &replace289_1.value },
20090    NULL,
20091 };
20092 
20093 static const struct transform nir_opt_algebraic_before_ffma_fmul_xforms[] = {
20094    { &search289, &replace289.value, 0 },
20095 };
20096 
20097 static const nir_search_variable search290_0_0 = {
20098    { nir_search_value_variable, 0 },
20099    0, /* a */
20100    false,
20101    nir_type_invalid,
20102    (is_not_const),
20103 };
20104 
20105 static const nir_search_variable search290_0_1 = {
20106    { nir_search_value_variable, 0 },
20107    1, /* b */
20108    true,
20109    nir_type_invalid,
20110    NULL,
20111 };
20112 static const nir_search_expression search290_0 = {
20113    { nir_search_value_expression, 0 },
20114    false,
20115    nir_op_imul,
20116    { &search290_0_0.value, &search290_0_1.value },
20117    (is_used_once),
20118 };
20119 
20120 static const nir_search_variable search290_1 = {
20121    { nir_search_value_variable, 0 },
20122    2, /* c */
20123    false,
20124    nir_type_invalid,
20125    (is_not_const),
20126 };
20127 static const nir_search_expression search290 = {
20128    { nir_search_value_expression, 0 },
20129    false,
20130    nir_op_imul,
20131    { &search290_0.value, &search290_1.value },
20132    (is_used_once),
20133 };
20134 
20135 static const nir_search_variable replace290_0_0 = {
20136    { nir_search_value_variable, 0 },
20137    0, /* a */
20138    false,
20139    nir_type_invalid,
20140    NULL,
20141 };
20142 
20143 static const nir_search_variable replace290_0_1 = {
20144    { nir_search_value_variable, 0 },
20145    2, /* c */
20146    false,
20147    nir_type_invalid,
20148    NULL,
20149 };
20150 static const nir_search_expression replace290_0 = {
20151    { nir_search_value_expression, 0 },
20152    false,
20153    nir_op_imul,
20154    { &replace290_0_0.value, &replace290_0_1.value },
20155    NULL,
20156 };
20157 
20158 static const nir_search_variable replace290_1 = {
20159    { nir_search_value_variable, 0 },
20160    1, /* b */
20161    false,
20162    nir_type_invalid,
20163    NULL,
20164 };
20165 static const nir_search_expression replace290 = {
20166    { nir_search_value_expression, 0 },
20167    false,
20168    nir_op_imul,
20169    { &replace290_0.value, &replace290_1.value },
20170    NULL,
20171 };
20172 
20173 static const struct transform nir_opt_algebraic_before_ffma_imul_xforms[] = {
20174    { &search290, &replace290.value, 0 },
20175 };
20176 
20177 static const nir_search_variable search292_0_0 = {
20178    { nir_search_value_variable, 0 },
20179    0, /* a */
20180    false,
20181    nir_type_invalid,
20182    (is_not_const),
20183 };
20184 
20185 static const nir_search_variable search292_0_1 = {
20186    { nir_search_value_variable, 0 },
20187    1, /* b */
20188    true,
20189    nir_type_invalid,
20190    NULL,
20191 };
20192 static const nir_search_expression search292_0 = {
20193    { nir_search_value_expression, 0 },
20194    false,
20195    nir_op_iadd,
20196    { &search292_0_0.value, &search292_0_1.value },
20197    (is_used_once),
20198 };
20199 
20200 static const nir_search_variable search292_1 = {
20201    { nir_search_value_variable, 0 },
20202    2, /* c */
20203    false,
20204    nir_type_invalid,
20205    (is_not_const),
20206 };
20207 static const nir_search_expression search292 = {
20208    { nir_search_value_expression, 0 },
20209    false,
20210    nir_op_iadd,
20211    { &search292_0.value, &search292_1.value },
20212    (is_used_once),
20213 };
20214 
20215 static const nir_search_variable replace292_0_0 = {
20216    { nir_search_value_variable, 0 },
20217    0, /* a */
20218    false,
20219    nir_type_invalid,
20220    NULL,
20221 };
20222 
20223 static const nir_search_variable replace292_0_1 = {
20224    { nir_search_value_variable, 0 },
20225    2, /* c */
20226    false,
20227    nir_type_invalid,
20228    NULL,
20229 };
20230 static const nir_search_expression replace292_0 = {
20231    { nir_search_value_expression, 0 },
20232    false,
20233    nir_op_iadd,
20234    { &replace292_0_0.value, &replace292_0_1.value },
20235    NULL,
20236 };
20237 
20238 static const nir_search_variable replace292_1 = {
20239    { nir_search_value_variable, 0 },
20240    1, /* b */
20241    false,
20242    nir_type_invalid,
20243    NULL,
20244 };
20245 static const nir_search_expression replace292 = {
20246    { nir_search_value_expression, 0 },
20247    false,
20248    nir_op_iadd,
20249    { &replace292_0.value, &replace292_1.value },
20250    NULL,
20251 };
20252 
20253 static const nir_search_variable search294_0_0 = {
20254    { nir_search_value_variable, 0 },
20255    0, /* a */
20256    false,
20257    nir_type_invalid,
20258    NULL,
20259 };
20260 
20261 static const nir_search_variable search294_0_1 = {
20262    { nir_search_value_variable, 0 },
20263    1, /* b */
20264    false,
20265    nir_type_invalid,
20266    NULL,
20267 };
20268 static const nir_search_expression search294_0 = {
20269    { nir_search_value_expression, 0 },
20270    false,
20271    nir_op_imul,
20272    { &search294_0_0.value, &search294_0_1.value },
20273    NULL,
20274 };
20275 
20276 static const nir_search_variable search294_1_0 = {
20277    { nir_search_value_variable, 0 },
20278    0, /* a */
20279    false,
20280    nir_type_invalid,
20281    NULL,
20282 };
20283 
20284 static const nir_search_variable search294_1_1 = {
20285    { nir_search_value_variable, 0 },
20286    2, /* c */
20287    false,
20288    nir_type_invalid,
20289    NULL,
20290 };
20291 static const nir_search_expression search294_1 = {
20292    { nir_search_value_expression, 0 },
20293    false,
20294    nir_op_imul,
20295    { &search294_1_0.value, &search294_1_1.value },
20296    NULL,
20297 };
20298 static const nir_search_expression search294 = {
20299    { nir_search_value_expression, 0 },
20300    false,
20301    nir_op_iadd,
20302    { &search294_0.value, &search294_1.value },
20303    NULL,
20304 };
20305 
20306 static const nir_search_variable replace294_0 = {
20307    { nir_search_value_variable, 0 },
20308    0, /* a */
20309    false,
20310    nir_type_invalid,
20311    NULL,
20312 };
20313 
20314 static const nir_search_variable replace294_1_0 = {
20315    { nir_search_value_variable, 0 },
20316    1, /* b */
20317    false,
20318    nir_type_invalid,
20319    NULL,
20320 };
20321 
20322 static const nir_search_variable replace294_1_1 = {
20323    { nir_search_value_variable, 0 },
20324    2, /* c */
20325    false,
20326    nir_type_invalid,
20327    NULL,
20328 };
20329 static const nir_search_expression replace294_1 = {
20330    { nir_search_value_expression, 0 },
20331    false,
20332    nir_op_iadd,
20333    { &replace294_1_0.value, &replace294_1_1.value },
20334    NULL,
20335 };
20336 static const nir_search_expression replace294 = {
20337    { nir_search_value_expression, 0 },
20338    false,
20339    nir_op_imul,
20340    { &replace294_0.value, &replace294_1.value },
20341    NULL,
20342 };
20343 
20344 static const nir_search_variable search296_0_0 = {
20345    { nir_search_value_variable, 0 },
20346    0, /* a */
20347    false,
20348    nir_type_invalid,
20349    NULL,
20350 };
20351 static const nir_search_expression search296_0 = {
20352    { nir_search_value_expression, 0 },
20353    false,
20354    nir_op_ineg,
20355    { &search296_0_0.value },
20356    NULL,
20357 };
20358 
20359 static const nir_search_variable search296_1 = {
20360    { nir_search_value_variable, 0 },
20361    0, /* a */
20362    false,
20363    nir_type_invalid,
20364    NULL,
20365 };
20366 static const nir_search_expression search296 = {
20367    { nir_search_value_expression, 0 },
20368    false,
20369    nir_op_iadd,
20370    { &search296_0.value, &search296_1.value },
20371    NULL,
20372 };
20373 
20374 static const nir_search_constant replace296 = {
20375    { nir_search_value_constant, 0 },
20376    nir_type_int, { 0x0 /* 0 */ },
20377 };
20378 
20379 static const nir_search_variable search297_0_0 = {
20380    { nir_search_value_variable, 0 },
20381    0, /* a */
20382    false,
20383    nir_type_invalid,
20384    NULL,
20385 };
20386 static const nir_search_expression search297_0 = {
20387    { nir_search_value_expression, 0 },
20388    false,
20389    nir_op_ineg,
20390    { &search297_0_0.value },
20391    NULL,
20392 };
20393 
20394 static const nir_search_variable search297_1_0 = {
20395    { nir_search_value_variable, 0 },
20396    0, /* a */
20397    false,
20398    nir_type_invalid,
20399    NULL,
20400 };
20401 
20402 static const nir_search_variable search297_1_1 = {
20403    { nir_search_value_variable, 0 },
20404    1, /* b */
20405    false,
20406    nir_type_invalid,
20407    NULL,
20408 };
20409 static const nir_search_expression search297_1 = {
20410    { nir_search_value_expression, 0 },
20411    false,
20412    nir_op_iadd,
20413    { &search297_1_0.value, &search297_1_1.value },
20414    NULL,
20415 };
20416 static const nir_search_expression search297 = {
20417    { nir_search_value_expression, 0 },
20418    false,
20419    nir_op_iadd,
20420    { &search297_0.value, &search297_1.value },
20421    NULL,
20422 };
20423 
20424 static const nir_search_variable replace297 = {
20425    { nir_search_value_variable, 0 },
20426    1, /* b */
20427    false,
20428    nir_type_invalid,
20429    NULL,
20430 };
20431 
20432 static const nir_search_variable search298_0 = {
20433    { nir_search_value_variable, 0 },
20434    0, /* a */
20435    false,
20436    nir_type_invalid,
20437    NULL,
20438 };
20439 
20440 static const nir_search_variable search298_1_0_0 = {
20441    { nir_search_value_variable, 0 },
20442    0, /* a */
20443    false,
20444    nir_type_invalid,
20445    NULL,
20446 };
20447 static const nir_search_expression search298_1_0 = {
20448    { nir_search_value_expression, 0 },
20449    false,
20450    nir_op_ineg,
20451    { &search298_1_0_0.value },
20452    NULL,
20453 };
20454 
20455 static const nir_search_variable search298_1_1 = {
20456    { nir_search_value_variable, 0 },
20457    1, /* b */
20458    false,
20459    nir_type_invalid,
20460    NULL,
20461 };
20462 static const nir_search_expression search298_1 = {
20463    { nir_search_value_expression, 0 },
20464    false,
20465    nir_op_iadd,
20466    { &search298_1_0.value, &search298_1_1.value },
20467    NULL,
20468 };
20469 static const nir_search_expression search298 = {
20470    { nir_search_value_expression, 0 },
20471    false,
20472    nir_op_iadd,
20473    { &search298_0.value, &search298_1.value },
20474    NULL,
20475 };
20476 
20477 static const nir_search_variable replace298 = {
20478    { nir_search_value_variable, 0 },
20479    1, /* b */
20480    false,
20481    nir_type_invalid,
20482    NULL,
20483 };
20484 
20485 static const struct transform nir_opt_algebraic_before_ffma_iadd_xforms[] = {
20486    { &search292, &replace292.value, 0 },
20487    { &search294, &replace294.value, 0 },
20488    { &search296, &replace296.value, 0 },
20489    { &search297, &replace297.value, 0 },
20490    { &search298, &replace298.value, 0 },
20491 };
20492 
20493 static const nir_search_variable search291_0_0 = {
20494    { nir_search_value_variable, 0 },
20495    0, /* a */
20496    false,
20497    nir_type_invalid,
20498    (is_not_const),
20499 };
20500 
20501 static const nir_search_variable search291_0_1 = {
20502    { nir_search_value_variable, 0 },
20503    1, /* b */
20504    true,
20505    nir_type_invalid,
20506    NULL,
20507 };
20508 static const nir_search_expression search291_0 = {
20509    { nir_search_value_expression, 0 },
20510    false,
20511    nir_op_fadd,
20512    { &search291_0_0.value, &search291_0_1.value },
20513    (is_used_once),
20514 };
20515 
20516 static const nir_search_variable search291_1 = {
20517    { nir_search_value_variable, 0 },
20518    2, /* c */
20519    false,
20520    nir_type_invalid,
20521    (is_not_const),
20522 };
20523 static const nir_search_expression search291 = {
20524    { nir_search_value_expression, 0 },
20525    true,
20526    nir_op_fadd,
20527    { &search291_0.value, &search291_1.value },
20528    (is_used_once),
20529 };
20530 
20531 static const nir_search_variable replace291_0_0 = {
20532    { nir_search_value_variable, 0 },
20533    0, /* a */
20534    false,
20535    nir_type_invalid,
20536    NULL,
20537 };
20538 
20539 static const nir_search_variable replace291_0_1 = {
20540    { nir_search_value_variable, 0 },
20541    2, /* c */
20542    false,
20543    nir_type_invalid,
20544    NULL,
20545 };
20546 static const nir_search_expression replace291_0 = {
20547    { nir_search_value_expression, 0 },
20548    false,
20549    nir_op_fadd,
20550    { &replace291_0_0.value, &replace291_0_1.value },
20551    NULL,
20552 };
20553 
20554 static const nir_search_variable replace291_1 = {
20555    { nir_search_value_variable, 0 },
20556    1, /* b */
20557    false,
20558    nir_type_invalid,
20559    NULL,
20560 };
20561 static const nir_search_expression replace291 = {
20562    { nir_search_value_expression, 0 },
20563    false,
20564    nir_op_fadd,
20565    { &replace291_0.value, &replace291_1.value },
20566    NULL,
20567 };
20568 
20569 static const nir_search_variable search293_0_0 = {
20570    { nir_search_value_variable, 0 },
20571    0, /* a */
20572    false,
20573    nir_type_invalid,
20574    NULL,
20575 };
20576 
20577 static const nir_search_variable search293_0_1 = {
20578    { nir_search_value_variable, 0 },
20579    1, /* b */
20580    false,
20581    nir_type_invalid,
20582    NULL,
20583 };
20584 static const nir_search_expression search293_0 = {
20585    { nir_search_value_expression, 0 },
20586    false,
20587    nir_op_fmul,
20588    { &search293_0_0.value, &search293_0_1.value },
20589    NULL,
20590 };
20591 
20592 static const nir_search_variable search293_1_0 = {
20593    { nir_search_value_variable, 0 },
20594    0, /* a */
20595    false,
20596    nir_type_invalid,
20597    NULL,
20598 };
20599 
20600 static const nir_search_variable search293_1_1 = {
20601    { nir_search_value_variable, 0 },
20602    2, /* c */
20603    false,
20604    nir_type_invalid,
20605    NULL,
20606 };
20607 static const nir_search_expression search293_1 = {
20608    { nir_search_value_expression, 0 },
20609    false,
20610    nir_op_fmul,
20611    { &search293_1_0.value, &search293_1_1.value },
20612    NULL,
20613 };
20614 static const nir_search_expression search293 = {
20615    { nir_search_value_expression, 0 },
20616    true,
20617    nir_op_fadd,
20618    { &search293_0.value, &search293_1.value },
20619    NULL,
20620 };
20621 
20622 static const nir_search_variable replace293_0 = {
20623    { nir_search_value_variable, 0 },
20624    0, /* a */
20625    false,
20626    nir_type_invalid,
20627    NULL,
20628 };
20629 
20630 static const nir_search_variable replace293_1_0 = {
20631    { nir_search_value_variable, 0 },
20632    1, /* b */
20633    false,
20634    nir_type_invalid,
20635    NULL,
20636 };
20637 
20638 static const nir_search_variable replace293_1_1 = {
20639    { nir_search_value_variable, 0 },
20640    2, /* c */
20641    false,
20642    nir_type_invalid,
20643    NULL,
20644 };
20645 static const nir_search_expression replace293_1 = {
20646    { nir_search_value_expression, 0 },
20647    false,
20648    nir_op_fadd,
20649    { &replace293_1_0.value, &replace293_1_1.value },
20650    NULL,
20651 };
20652 static const nir_search_expression replace293 = {
20653    { nir_search_value_expression, 0 },
20654    false,
20655    nir_op_fmul,
20656    { &replace293_0.value, &replace293_1.value },
20657    NULL,
20658 };
20659 
20660 static const nir_search_variable search295_0_0 = {
20661    { nir_search_value_variable, 0 },
20662    0, /* a */
20663    false,
20664    nir_type_invalid,
20665    NULL,
20666 };
20667 static const nir_search_expression search295_0 = {
20668    { nir_search_value_expression, 0 },
20669    false,
20670    nir_op_fneg,
20671    { &search295_0_0.value },
20672    NULL,
20673 };
20674 
20675 static const nir_search_variable search295_1 = {
20676    { nir_search_value_variable, 0 },
20677    0, /* a */
20678    false,
20679    nir_type_invalid,
20680    NULL,
20681 };
20682 static const nir_search_expression search295 = {
20683    { nir_search_value_expression, 0 },
20684    true,
20685    nir_op_fadd,
20686    { &search295_0.value, &search295_1.value },
20687    NULL,
20688 };
20689 
20690 static const nir_search_constant replace295 = {
20691    { nir_search_value_constant, 0 },
20692    nir_type_float, { 0x0 /* 0.0 */ },
20693 };
20694 
20695 static const nir_search_variable search299_0_0 = {
20696    { nir_search_value_variable, 0 },
20697    0, /* a */
20698    false,
20699    nir_type_invalid,
20700    NULL,
20701 };
20702 static const nir_search_expression search299_0 = {
20703    { nir_search_value_expression, 0 },
20704    false,
20705    nir_op_fneg,
20706    { &search299_0_0.value },
20707    NULL,
20708 };
20709 
20710 static const nir_search_variable search299_1_0 = {
20711    { nir_search_value_variable, 0 },
20712    0, /* a */
20713    false,
20714    nir_type_invalid,
20715    NULL,
20716 };
20717 
20718 static const nir_search_variable search299_1_1 = {
20719    { nir_search_value_variable, 0 },
20720    1, /* b */
20721    false,
20722    nir_type_invalid,
20723    NULL,
20724 };
20725 static const nir_search_expression search299_1 = {
20726    { nir_search_value_expression, 0 },
20727    false,
20728    nir_op_fadd,
20729    { &search299_1_0.value, &search299_1_1.value },
20730    NULL,
20731 };
20732 static const nir_search_expression search299 = {
20733    { nir_search_value_expression, 0 },
20734    true,
20735    nir_op_fadd,
20736    { &search299_0.value, &search299_1.value },
20737    NULL,
20738 };
20739 
20740 static const nir_search_variable replace299 = {
20741    { nir_search_value_variable, 0 },
20742    1, /* b */
20743    false,
20744    nir_type_invalid,
20745    NULL,
20746 };
20747 
20748 static const nir_search_variable search300_0 = {
20749    { nir_search_value_variable, 0 },
20750    0, /* a */
20751    false,
20752    nir_type_invalid,
20753    NULL,
20754 };
20755 
20756 static const nir_search_variable search300_1_0_0 = {
20757    { nir_search_value_variable, 0 },
20758    0, /* a */
20759    false,
20760    nir_type_invalid,
20761    NULL,
20762 };
20763 static const nir_search_expression search300_1_0 = {
20764    { nir_search_value_expression, 0 },
20765    false,
20766    nir_op_fneg,
20767    { &search300_1_0_0.value },
20768    NULL,
20769 };
20770 
20771 static const nir_search_variable search300_1_1 = {
20772    { nir_search_value_variable, 0 },
20773    1, /* b */
20774    false,
20775    nir_type_invalid,
20776    NULL,
20777 };
20778 static const nir_search_expression search300_1 = {
20779    { nir_search_value_expression, 0 },
20780    false,
20781    nir_op_fadd,
20782    { &search300_1_0.value, &search300_1_1.value },
20783    NULL,
20784 };
20785 static const nir_search_expression search300 = {
20786    { nir_search_value_expression, 0 },
20787    true,
20788    nir_op_fadd,
20789    { &search300_0.value, &search300_1.value },
20790    NULL,
20791 };
20792 
20793 static const nir_search_variable replace300 = {
20794    { nir_search_value_variable, 0 },
20795    1, /* b */
20796    false,
20797    nir_type_invalid,
20798    NULL,
20799 };
20800 
20801 static const struct transform nir_opt_algebraic_before_ffma_fadd_xforms[] = {
20802    { &search291, &replace291.value, 0 },
20803    { &search293, &replace293.value, 0 },
20804    { &search295, &replace295.value, 0 },
20805    { &search299, &replace299.value, 0 },
20806    { &search300, &replace300.value, 0 },
20807 };
20808 
20809 static bool
nir_opt_algebraic_before_ffma_block(nir_block * block,const bool * condition_flags,void * mem_ctx)20810 nir_opt_algebraic_before_ffma_block(nir_block *block, const bool *condition_flags,
20811                    void *mem_ctx)
20812 {
20813    bool progress = false;
20814 
20815    nir_foreach_instr_reverse_safe(instr, block) {
20816       if (instr->type != nir_instr_type_alu)
20817          continue;
20818 
20819       nir_alu_instr *alu = nir_instr_as_alu(instr);
20820       if (!alu->dest.dest.is_ssa)
20821          continue;
20822 
20823       switch (alu->op) {
20824       case nir_op_fmul:
20825          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_before_ffma_fmul_xforms); i++) {
20826             const struct transform *xform = &nir_opt_algebraic_before_ffma_fmul_xforms[i];
20827             if (condition_flags[xform->condition_offset] &&
20828                 nir_replace_instr(alu, xform->search, xform->replace,
20829                                   mem_ctx)) {
20830                progress = true;
20831                break;
20832             }
20833          }
20834          break;
20835       case nir_op_imul:
20836          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_before_ffma_imul_xforms); i++) {
20837             const struct transform *xform = &nir_opt_algebraic_before_ffma_imul_xforms[i];
20838             if (condition_flags[xform->condition_offset] &&
20839                 nir_replace_instr(alu, xform->search, xform->replace,
20840                                   mem_ctx)) {
20841                progress = true;
20842                break;
20843             }
20844          }
20845          break;
20846       case nir_op_iadd:
20847          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_before_ffma_iadd_xforms); i++) {
20848             const struct transform *xform = &nir_opt_algebraic_before_ffma_iadd_xforms[i];
20849             if (condition_flags[xform->condition_offset] &&
20850                 nir_replace_instr(alu, xform->search, xform->replace,
20851                                   mem_ctx)) {
20852                progress = true;
20853                break;
20854             }
20855          }
20856          break;
20857       case nir_op_fadd:
20858          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_before_ffma_fadd_xforms); i++) {
20859             const struct transform *xform = &nir_opt_algebraic_before_ffma_fadd_xforms[i];
20860             if (condition_flags[xform->condition_offset] &&
20861                 nir_replace_instr(alu, xform->search, xform->replace,
20862                                   mem_ctx)) {
20863                progress = true;
20864                break;
20865             }
20866          }
20867          break;
20868       default:
20869          break;
20870       }
20871    }
20872 
20873    return progress;
20874 }
20875 
20876 static bool
nir_opt_algebraic_before_ffma_impl(nir_function_impl * impl,const bool * condition_flags)20877 nir_opt_algebraic_before_ffma_impl(nir_function_impl *impl, const bool *condition_flags)
20878 {
20879    void *mem_ctx = ralloc_parent(impl);
20880    bool progress = false;
20881 
20882    nir_foreach_block_reverse(block, impl) {
20883       progress |= nir_opt_algebraic_before_ffma_block(block, condition_flags, mem_ctx);
20884    }
20885 
20886    if (progress)
20887       nir_metadata_preserve(impl, nir_metadata_block_index |
20888                                   nir_metadata_dominance);
20889 
20890    return progress;
20891 }
20892 
20893 
20894 bool
nir_opt_algebraic_before_ffma(nir_shader * shader)20895 nir_opt_algebraic_before_ffma(nir_shader *shader)
20896 {
20897    bool progress = false;
20898    bool condition_flags[37];
20899    const nir_shader_compiler_options *options = shader->options;
20900    (void) options;
20901 
20902    condition_flags[0] = true;
20903    condition_flags[1] = options->lower_idiv;
20904    condition_flags[2] = options->lower_flrp32;
20905    condition_flags[3] = options->lower_flrp64;
20906    condition_flags[4] = options->lower_ffract;
20907    condition_flags[5] = !options->lower_flrp32;
20908    condition_flags[6] = !options->lower_flrp64;
20909    condition_flags[7] = options->lower_ffma;
20910    condition_flags[8] = options->fuse_ffma;
20911    condition_flags[9] = !options->lower_fsat;
20912    condition_flags[10] = options->lower_fsat;
20913    condition_flags[11] = options->lower_scmp;
20914    condition_flags[12] = options->lower_fpow;
20915    condition_flags[13] = !options->lower_fpow;
20916    condition_flags[14] = options->lower_fdiv;
20917    condition_flags[15] = options->lower_fsqrt;
20918    condition_flags[16] = !options->lower_fsqrt;
20919    condition_flags[17] = !options->lower_extract_byte;
20920    condition_flags[18] = !options->lower_extract_word;
20921    condition_flags[19] = options->lower_sub;
20922    condition_flags[20] = options->lower_negate;
20923    condition_flags[21] = options->lower_fmod32;
20924    condition_flags[22] = options->lower_fmod64;
20925    condition_flags[23] = options->lower_uadd_carry;
20926    condition_flags[24] = options->lower_usub_borrow;
20927    condition_flags[25] = options->lower_bitfield_insert;
20928    condition_flags[26] = options->lower_bitfield_extract;
20929    condition_flags[27] = options->lower_extract_byte;
20930    condition_flags[28] = options->lower_extract_word;
20931    condition_flags[29] = options->lower_pack_unorm_2x16;
20932    condition_flags[30] = options->lower_pack_unorm_4x8;
20933    condition_flags[31] = options->lower_pack_snorm_2x16;
20934    condition_flags[32] = options->lower_pack_snorm_4x8;
20935    condition_flags[33] = options->lower_unpack_unorm_2x16;
20936    condition_flags[34] = options->lower_unpack_unorm_4x8;
20937    condition_flags[35] = options->lower_unpack_snorm_2x16;
20938    condition_flags[36] = options->lower_unpack_snorm_4x8;
20939 
20940    nir_foreach_function(function, shader) {
20941       if (function->impl)
20942          progress |= nir_opt_algebraic_before_ffma_impl(function->impl, condition_flags);
20943    }
20944 
20945    return progress;
20946 }
20947 
20948 
20949 #include "nir.h"
20950 #include "nir_search.h"
20951 #include "nir_search_helpers.h"
20952 
20953 #ifndef NIR_OPT_ALGEBRAIC_STRUCT_DEFS
20954 #define NIR_OPT_ALGEBRAIC_STRUCT_DEFS
20955 
20956 struct transform {
20957    const nir_search_expression *search;
20958    const nir_search_value *replace;
20959    unsigned condition_offset;
20960 };
20961 
20962 #endif
20963 
20964 
20965 static const nir_search_variable search309_0_0 = {
20966    { nir_search_value_variable, 0 },
20967    0, /* a */
20968    false,
20969    nir_type_invalid,
20970    NULL,
20971 };
20972 static const nir_search_expression search309_0 = {
20973    { nir_search_value_expression, 0 },
20974    false,
20975    nir_op_inot,
20976    { &search309_0_0.value },
20977    NULL,
20978 };
20979 static const nir_search_expression search309 = {
20980    { nir_search_value_expression, 0 },
20981    false,
20982    nir_op_b2f,
20983    { &search309_0.value },
20984    (is_used_more_than_once),
20985 };
20986 
20987 static const nir_search_variable replace309_0 = {
20988    { nir_search_value_variable, 0 },
20989    0, /* a */
20990    false,
20991    nir_type_invalid,
20992    NULL,
20993 };
20994 
20995 static const nir_search_constant replace309_1 = {
20996    { nir_search_value_constant, 0 },
20997    nir_type_float, { 0x0 /* 0.0 */ },
20998 };
20999 
21000 static const nir_search_constant replace309_2 = {
21001    { nir_search_value_constant, 0 },
21002    nir_type_float, { 0x3ff0000000000000 /* 1.0 */ },
21003 };
21004 static const nir_search_expression replace309 = {
21005    { nir_search_value_expression, 0 },
21006    false,
21007    nir_op_bcsel,
21008    { &replace309_0.value, &replace309_1.value, &replace309_2.value },
21009    NULL,
21010 };
21011 
21012 static const struct transform nir_opt_algebraic_late_b2f_xforms[] = {
21013    { &search309, &replace309.value, 0 },
21014 };
21015 
21016 static const nir_search_variable search307_0 = {
21017    { nir_search_value_variable, 0 },
21018    0, /* a */
21019    false,
21020    nir_type_invalid,
21021    NULL,
21022 };
21023 
21024 static const nir_search_variable search307_1 = {
21025    { nir_search_value_variable, 0 },
21026    1, /* b */
21027    false,
21028    nir_type_invalid,
21029    NULL,
21030 };
21031 static const nir_search_expression search307 = {
21032    { nir_search_value_expression, 0 },
21033    false,
21034    nir_op_fdot4,
21035    { &search307_0.value, &search307_1.value },
21036    NULL,
21037 };
21038 
21039 static const nir_search_variable replace307_0 = {
21040    { nir_search_value_variable, 0 },
21041    0, /* a */
21042    false,
21043    nir_type_invalid,
21044    NULL,
21045 };
21046 
21047 static const nir_search_variable replace307_1 = {
21048    { nir_search_value_variable, 0 },
21049    1, /* b */
21050    false,
21051    nir_type_invalid,
21052    NULL,
21053 };
21054 static const nir_search_expression replace307 = {
21055    { nir_search_value_expression, 0 },
21056    false,
21057    nir_op_fdot_replicated4,
21058    { &replace307_0.value, &replace307_1.value },
21059    NULL,
21060 };
21061 
21062 static const struct transform nir_opt_algebraic_late_fdot4_xforms[] = {
21063    { &search307, &replace307.value, 37 },
21064 };
21065 
21066 static const nir_search_variable search301_0_0 = {
21067    { nir_search_value_variable, 0 },
21068    0, /* a */
21069    false,
21070    nir_type_invalid,
21071    NULL,
21072 };
21073 
21074 static const nir_search_variable search301_0_1 = {
21075    { nir_search_value_variable, 0 },
21076    1, /* b */
21077    false,
21078    nir_type_invalid,
21079    NULL,
21080 };
21081 static const nir_search_expression search301_0 = {
21082    { nir_search_value_expression, 0 },
21083    false,
21084    nir_op_fadd,
21085    { &search301_0_0.value, &search301_0_1.value },
21086    NULL,
21087 };
21088 
21089 static const nir_search_constant search301_1 = {
21090    { nir_search_value_constant, 0 },
21091    nir_type_float, { 0x0 /* 0.0 */ },
21092 };
21093 static const nir_search_expression search301 = {
21094    { nir_search_value_expression, 0 },
21095    false,
21096    nir_op_flt,
21097    { &search301_0.value, &search301_1.value },
21098    NULL,
21099 };
21100 
21101 static const nir_search_variable replace301_0 = {
21102    { nir_search_value_variable, 0 },
21103    0, /* a */
21104    false,
21105    nir_type_invalid,
21106    NULL,
21107 };
21108 
21109 static const nir_search_variable replace301_1_0 = {
21110    { nir_search_value_variable, 0 },
21111    1, /* b */
21112    false,
21113    nir_type_invalid,
21114    NULL,
21115 };
21116 static const nir_search_expression replace301_1 = {
21117    { nir_search_value_expression, 0 },
21118    false,
21119    nir_op_fneg,
21120    { &replace301_1_0.value },
21121    NULL,
21122 };
21123 static const nir_search_expression replace301 = {
21124    { nir_search_value_expression, 0 },
21125    false,
21126    nir_op_flt,
21127    { &replace301_0.value, &replace301_1.value },
21128    NULL,
21129 };
21130 
21131 static const struct transform nir_opt_algebraic_late_flt_xforms[] = {
21132    { &search301, &replace301.value, 0 },
21133 };
21134 
21135 static const nir_search_variable search305_0 = {
21136    { nir_search_value_variable, 0 },
21137    0, /* a */
21138    false,
21139    nir_type_invalid,
21140    NULL,
21141 };
21142 
21143 static const nir_search_variable search305_1 = {
21144    { nir_search_value_variable, 0 },
21145    1, /* b */
21146    false,
21147    nir_type_invalid,
21148    NULL,
21149 };
21150 static const nir_search_expression search305 = {
21151    { nir_search_value_expression, 0 },
21152    false,
21153    nir_op_fdot2,
21154    { &search305_0.value, &search305_1.value },
21155    NULL,
21156 };
21157 
21158 static const nir_search_variable replace305_0 = {
21159    { nir_search_value_variable, 0 },
21160    0, /* a */
21161    false,
21162    nir_type_invalid,
21163    NULL,
21164 };
21165 
21166 static const nir_search_variable replace305_1 = {
21167    { nir_search_value_variable, 0 },
21168    1, /* b */
21169    false,
21170    nir_type_invalid,
21171    NULL,
21172 };
21173 static const nir_search_expression replace305 = {
21174    { nir_search_value_expression, 0 },
21175    false,
21176    nir_op_fdot_replicated2,
21177    { &replace305_0.value, &replace305_1.value },
21178    NULL,
21179 };
21180 
21181 static const struct transform nir_opt_algebraic_late_fdot2_xforms[] = {
21182    { &search305, &replace305.value, 37 },
21183 };
21184 
21185 static const nir_search_variable search306_0 = {
21186    { nir_search_value_variable, 0 },
21187    0, /* a */
21188    false,
21189    nir_type_invalid,
21190    NULL,
21191 };
21192 
21193 static const nir_search_variable search306_1 = {
21194    { nir_search_value_variable, 0 },
21195    1, /* b */
21196    false,
21197    nir_type_invalid,
21198    NULL,
21199 };
21200 static const nir_search_expression search306 = {
21201    { nir_search_value_expression, 0 },
21202    false,
21203    nir_op_fdot3,
21204    { &search306_0.value, &search306_1.value },
21205    NULL,
21206 };
21207 
21208 static const nir_search_variable replace306_0 = {
21209    { nir_search_value_variable, 0 },
21210    0, /* a */
21211    false,
21212    nir_type_invalid,
21213    NULL,
21214 };
21215 
21216 static const nir_search_variable replace306_1 = {
21217    { nir_search_value_variable, 0 },
21218    1, /* b */
21219    false,
21220    nir_type_invalid,
21221    NULL,
21222 };
21223 static const nir_search_expression replace306 = {
21224    { nir_search_value_expression, 0 },
21225    false,
21226    nir_op_fdot_replicated3,
21227    { &replace306_0.value, &replace306_1.value },
21228    NULL,
21229 };
21230 
21231 static const struct transform nir_opt_algebraic_late_fdot3_xforms[] = {
21232    { &search306, &replace306.value, 37 },
21233 };
21234 
21235 static const nir_search_variable search310_0_0_0 = {
21236    { nir_search_value_variable, 0 },
21237    0, /* a */
21238    false,
21239    nir_type_invalid,
21240    NULL,
21241 };
21242 static const nir_search_expression search310_0_0 = {
21243    { nir_search_value_expression, 0 },
21244    false,
21245    nir_op_inot,
21246    { &search310_0_0_0.value },
21247    NULL,
21248 };
21249 static const nir_search_expression search310_0 = {
21250    { nir_search_value_expression, 0 },
21251    false,
21252    nir_op_b2f,
21253    { &search310_0_0.value },
21254    NULL,
21255 };
21256 static const nir_search_expression search310 = {
21257    { nir_search_value_expression, 0 },
21258    false,
21259    nir_op_fneg,
21260    { &search310_0.value },
21261    (is_used_more_than_once),
21262 };
21263 
21264 static const nir_search_variable replace310_0 = {
21265    { nir_search_value_variable, 0 },
21266    0, /* a */
21267    false,
21268    nir_type_invalid,
21269    NULL,
21270 };
21271 
21272 static const nir_search_constant replace310_1 = {
21273    { nir_search_value_constant, 0 },
21274    nir_type_float, { 0x8000000000000000L /* -0.0 */ },
21275 };
21276 
21277 static const nir_search_constant replace310_2 = {
21278    { nir_search_value_constant, 0 },
21279    nir_type_float, { 0xbff0000000000000L /* -1.0 */ },
21280 };
21281 static const nir_search_expression replace310 = {
21282    { nir_search_value_expression, 0 },
21283    false,
21284    nir_op_bcsel,
21285    { &replace310_0.value, &replace310_1.value, &replace310_2.value },
21286    NULL,
21287 };
21288 
21289 static const struct transform nir_opt_algebraic_late_fneg_xforms[] = {
21290    { &search310, &replace310.value, 0 },
21291 };
21292 
21293 static const nir_search_variable search312_0_0 = {
21294    { nir_search_value_variable, 0 },
21295    0, /* c */
21296    true,
21297    nir_type_invalid,
21298    NULL,
21299 };
21300 
21301 static const nir_search_variable search312_0_1 = {
21302    { nir_search_value_variable, 0 },
21303    1, /* a */
21304    false,
21305    nir_type_invalid,
21306    NULL,
21307 };
21308 static const nir_search_expression search312_0 = {
21309    { nir_search_value_expression, 0 },
21310    false,
21311    nir_op_fadd,
21312    { &search312_0_0.value, &search312_0_1.value },
21313    (is_used_once),
21314 };
21315 
21316 static const nir_search_variable search312_1_0 = {
21317    { nir_search_value_variable, 0 },
21318    0, /* c */
21319    true,
21320    nir_type_invalid,
21321    NULL,
21322 };
21323 
21324 static const nir_search_variable search312_1_1 = {
21325    { nir_search_value_variable, 0 },
21326    2, /* b */
21327    false,
21328    nir_type_invalid,
21329    NULL,
21330 };
21331 static const nir_search_expression search312_1 = {
21332    { nir_search_value_expression, 0 },
21333    false,
21334    nir_op_fadd,
21335    { &search312_1_0.value, &search312_1_1.value },
21336    (is_used_once),
21337 };
21338 static const nir_search_expression search312 = {
21339    { nir_search_value_expression, 0 },
21340    false,
21341    nir_op_fmax,
21342    { &search312_0.value, &search312_1.value },
21343    NULL,
21344 };
21345 
21346 static const nir_search_variable replace312_0 = {
21347    { nir_search_value_variable, 0 },
21348    0, /* c */
21349    false,
21350    nir_type_invalid,
21351    NULL,
21352 };
21353 
21354 static const nir_search_variable replace312_1_0 = {
21355    { nir_search_value_variable, 0 },
21356    1, /* a */
21357    false,
21358    nir_type_invalid,
21359    NULL,
21360 };
21361 
21362 static const nir_search_variable replace312_1_1 = {
21363    { nir_search_value_variable, 0 },
21364    2, /* b */
21365    false,
21366    nir_type_invalid,
21367    NULL,
21368 };
21369 static const nir_search_expression replace312_1 = {
21370    { nir_search_value_expression, 0 },
21371    false,
21372    nir_op_fmax,
21373    { &replace312_1_0.value, &replace312_1_1.value },
21374    NULL,
21375 };
21376 static const nir_search_expression replace312 = {
21377    { nir_search_value_expression, 0 },
21378    false,
21379    nir_op_fadd,
21380    { &replace312_0.value, &replace312_1.value },
21381    NULL,
21382 };
21383 
21384 static const struct transform nir_opt_algebraic_late_fmax_xforms[] = {
21385    { &search312, &replace312.value, 0 },
21386 };
21387 
21388 static const nir_search_variable search304_0_0 = {
21389    { nir_search_value_variable, 0 },
21390    0, /* a */
21391    false,
21392    nir_type_invalid,
21393    NULL,
21394 };
21395 
21396 static const nir_search_variable search304_0_1 = {
21397    { nir_search_value_variable, 0 },
21398    1, /* b */
21399    false,
21400    nir_type_invalid,
21401    NULL,
21402 };
21403 static const nir_search_expression search304_0 = {
21404    { nir_search_value_expression, 0 },
21405    false,
21406    nir_op_fadd,
21407    { &search304_0_0.value, &search304_0_1.value },
21408    NULL,
21409 };
21410 
21411 static const nir_search_constant search304_1 = {
21412    { nir_search_value_constant, 0 },
21413    nir_type_float, { 0x0 /* 0.0 */ },
21414 };
21415 static const nir_search_expression search304 = {
21416    { nir_search_value_expression, 0 },
21417    true,
21418    nir_op_fne,
21419    { &search304_0.value, &search304_1.value },
21420    NULL,
21421 };
21422 
21423 static const nir_search_variable replace304_0 = {
21424    { nir_search_value_variable, 0 },
21425    0, /* a */
21426    false,
21427    nir_type_invalid,
21428    NULL,
21429 };
21430 
21431 static const nir_search_variable replace304_1_0 = {
21432    { nir_search_value_variable, 0 },
21433    1, /* b */
21434    false,
21435    nir_type_invalid,
21436    NULL,
21437 };
21438 static const nir_search_expression replace304_1 = {
21439    { nir_search_value_expression, 0 },
21440    false,
21441    nir_op_fneg,
21442    { &replace304_1_0.value },
21443    NULL,
21444 };
21445 static const nir_search_expression replace304 = {
21446    { nir_search_value_expression, 0 },
21447    false,
21448    nir_op_fne,
21449    { &replace304_0.value, &replace304_1.value },
21450    NULL,
21451 };
21452 
21453 static const struct transform nir_opt_algebraic_late_fne_xforms[] = {
21454    { &search304, &replace304.value, 0 },
21455 };
21456 
21457 static const nir_search_variable search311_0_0 = {
21458    { nir_search_value_variable, 0 },
21459    0, /* c */
21460    true,
21461    nir_type_invalid,
21462    NULL,
21463 };
21464 
21465 static const nir_search_variable search311_0_1 = {
21466    { nir_search_value_variable, 0 },
21467    1, /* a */
21468    false,
21469    nir_type_invalid,
21470    NULL,
21471 };
21472 static const nir_search_expression search311_0 = {
21473    { nir_search_value_expression, 0 },
21474    false,
21475    nir_op_fadd,
21476    { &search311_0_0.value, &search311_0_1.value },
21477    (is_used_once),
21478 };
21479 
21480 static const nir_search_variable search311_1_0 = {
21481    { nir_search_value_variable, 0 },
21482    0, /* c */
21483    true,
21484    nir_type_invalid,
21485    NULL,
21486 };
21487 
21488 static const nir_search_variable search311_1_1 = {
21489    { nir_search_value_variable, 0 },
21490    2, /* b */
21491    false,
21492    nir_type_invalid,
21493    NULL,
21494 };
21495 static const nir_search_expression search311_1 = {
21496    { nir_search_value_expression, 0 },
21497    false,
21498    nir_op_fadd,
21499    { &search311_1_0.value, &search311_1_1.value },
21500    (is_used_once),
21501 };
21502 static const nir_search_expression search311 = {
21503    { nir_search_value_expression, 0 },
21504    false,
21505    nir_op_fmin,
21506    { &search311_0.value, &search311_1.value },
21507    NULL,
21508 };
21509 
21510 static const nir_search_variable replace311_0 = {
21511    { nir_search_value_variable, 0 },
21512    0, /* c */
21513    false,
21514    nir_type_invalid,
21515    NULL,
21516 };
21517 
21518 static const nir_search_variable replace311_1_0 = {
21519    { nir_search_value_variable, 0 },
21520    1, /* a */
21521    false,
21522    nir_type_invalid,
21523    NULL,
21524 };
21525 
21526 static const nir_search_variable replace311_1_1 = {
21527    { nir_search_value_variable, 0 },
21528    2, /* b */
21529    false,
21530    nir_type_invalid,
21531    NULL,
21532 };
21533 static const nir_search_expression replace311_1 = {
21534    { nir_search_value_expression, 0 },
21535    false,
21536    nir_op_fmin,
21537    { &replace311_1_0.value, &replace311_1_1.value },
21538    NULL,
21539 };
21540 static const nir_search_expression replace311 = {
21541    { nir_search_value_expression, 0 },
21542    false,
21543    nir_op_fadd,
21544    { &replace311_0.value, &replace311_1.value },
21545    NULL,
21546 };
21547 
21548 static const struct transform nir_opt_algebraic_late_fmin_xforms[] = {
21549    { &search311, &replace311.value, 0 },
21550 };
21551 
21552 static const nir_search_variable search303_0_0 = {
21553    { nir_search_value_variable, 0 },
21554    0, /* a */
21555    false,
21556    nir_type_invalid,
21557    NULL,
21558 };
21559 
21560 static const nir_search_variable search303_0_1 = {
21561    { nir_search_value_variable, 0 },
21562    1, /* b */
21563    false,
21564    nir_type_invalid,
21565    NULL,
21566 };
21567 static const nir_search_expression search303_0 = {
21568    { nir_search_value_expression, 0 },
21569    false,
21570    nir_op_fadd,
21571    { &search303_0_0.value, &search303_0_1.value },
21572    NULL,
21573 };
21574 
21575 static const nir_search_constant search303_1 = {
21576    { nir_search_value_constant, 0 },
21577    nir_type_float, { 0x0 /* 0.0 */ },
21578 };
21579 static const nir_search_expression search303 = {
21580    { nir_search_value_expression, 0 },
21581    true,
21582    nir_op_feq,
21583    { &search303_0.value, &search303_1.value },
21584    NULL,
21585 };
21586 
21587 static const nir_search_variable replace303_0 = {
21588    { nir_search_value_variable, 0 },
21589    0, /* a */
21590    false,
21591    nir_type_invalid,
21592    NULL,
21593 };
21594 
21595 static const nir_search_variable replace303_1_0 = {
21596    { nir_search_value_variable, 0 },
21597    1, /* b */
21598    false,
21599    nir_type_invalid,
21600    NULL,
21601 };
21602 static const nir_search_expression replace303_1 = {
21603    { nir_search_value_expression, 0 },
21604    false,
21605    nir_op_fneg,
21606    { &replace303_1_0.value },
21607    NULL,
21608 };
21609 static const nir_search_expression replace303 = {
21610    { nir_search_value_expression, 0 },
21611    false,
21612    nir_op_feq,
21613    { &replace303_0.value, &replace303_1.value },
21614    NULL,
21615 };
21616 
21617 static const struct transform nir_opt_algebraic_late_feq_xforms[] = {
21618    { &search303, &replace303.value, 0 },
21619 };
21620 
21621 static const nir_search_variable search302_0_0 = {
21622    { nir_search_value_variable, 0 },
21623    0, /* a */
21624    false,
21625    nir_type_invalid,
21626    NULL,
21627 };
21628 
21629 static const nir_search_variable search302_0_1 = {
21630    { nir_search_value_variable, 0 },
21631    1, /* b */
21632    false,
21633    nir_type_invalid,
21634    NULL,
21635 };
21636 static const nir_search_expression search302_0 = {
21637    { nir_search_value_expression, 0 },
21638    false,
21639    nir_op_fadd,
21640    { &search302_0_0.value, &search302_0_1.value },
21641    NULL,
21642 };
21643 
21644 static const nir_search_constant search302_1 = {
21645    { nir_search_value_constant, 0 },
21646    nir_type_float, { 0x0 /* 0.0 */ },
21647 };
21648 static const nir_search_expression search302 = {
21649    { nir_search_value_expression, 0 },
21650    true,
21651    nir_op_fge,
21652    { &search302_0.value, &search302_1.value },
21653    NULL,
21654 };
21655 
21656 static const nir_search_variable replace302_0 = {
21657    { nir_search_value_variable, 0 },
21658    0, /* a */
21659    false,
21660    nir_type_invalid,
21661    NULL,
21662 };
21663 
21664 static const nir_search_variable replace302_1_0 = {
21665    { nir_search_value_variable, 0 },
21666    1, /* b */
21667    false,
21668    nir_type_invalid,
21669    NULL,
21670 };
21671 static const nir_search_expression replace302_1 = {
21672    { nir_search_value_expression, 0 },
21673    false,
21674    nir_op_fneg,
21675    { &replace302_1_0.value },
21676    NULL,
21677 };
21678 static const nir_search_expression replace302 = {
21679    { nir_search_value_expression, 0 },
21680    false,
21681    nir_op_fge,
21682    { &replace302_0.value, &replace302_1.value },
21683    NULL,
21684 };
21685 
21686 static const struct transform nir_opt_algebraic_late_fge_xforms[] = {
21687    { &search302, &replace302.value, 0 },
21688 };
21689 
21690 static const nir_search_variable search308_0 = {
21691    { nir_search_value_variable, 0 },
21692    0, /* a */
21693    false,
21694    nir_type_invalid,
21695    NULL,
21696 };
21697 
21698 static const nir_search_variable search308_1 = {
21699    { nir_search_value_variable, 0 },
21700    1, /* b */
21701    false,
21702    nir_type_invalid,
21703    NULL,
21704 };
21705 static const nir_search_expression search308 = {
21706    { nir_search_value_expression, 0 },
21707    false,
21708    nir_op_fdph,
21709    { &search308_0.value, &search308_1.value },
21710    NULL,
21711 };
21712 
21713 static const nir_search_variable replace308_0 = {
21714    { nir_search_value_variable, 0 },
21715    0, /* a */
21716    false,
21717    nir_type_invalid,
21718    NULL,
21719 };
21720 
21721 static const nir_search_variable replace308_1 = {
21722    { nir_search_value_variable, 0 },
21723    1, /* b */
21724    false,
21725    nir_type_invalid,
21726    NULL,
21727 };
21728 static const nir_search_expression replace308 = {
21729    { nir_search_value_expression, 0 },
21730    false,
21731    nir_op_fdph_replicated,
21732    { &replace308_0.value, &replace308_1.value },
21733    NULL,
21734 };
21735 
21736 static const struct transform nir_opt_algebraic_late_fdph_xforms[] = {
21737    { &search308, &replace308.value, 37 },
21738 };
21739 
21740 static bool
nir_opt_algebraic_late_block(nir_block * block,const bool * condition_flags,void * mem_ctx)21741 nir_opt_algebraic_late_block(nir_block *block, const bool *condition_flags,
21742                    void *mem_ctx)
21743 {
21744    bool progress = false;
21745 
21746    nir_foreach_instr_reverse_safe(instr, block) {
21747       if (instr->type != nir_instr_type_alu)
21748          continue;
21749 
21750       nir_alu_instr *alu = nir_instr_as_alu(instr);
21751       if (!alu->dest.dest.is_ssa)
21752          continue;
21753 
21754       switch (alu->op) {
21755       case nir_op_b2f:
21756          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_b2f_xforms); i++) {
21757             const struct transform *xform = &nir_opt_algebraic_late_b2f_xforms[i];
21758             if (condition_flags[xform->condition_offset] &&
21759                 nir_replace_instr(alu, xform->search, xform->replace,
21760                                   mem_ctx)) {
21761                progress = true;
21762                break;
21763             }
21764          }
21765          break;
21766       case nir_op_fdot4:
21767          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fdot4_xforms); i++) {
21768             const struct transform *xform = &nir_opt_algebraic_late_fdot4_xforms[i];
21769             if (condition_flags[xform->condition_offset] &&
21770                 nir_replace_instr(alu, xform->search, xform->replace,
21771                                   mem_ctx)) {
21772                progress = true;
21773                break;
21774             }
21775          }
21776          break;
21777       case nir_op_flt:
21778          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_flt_xforms); i++) {
21779             const struct transform *xform = &nir_opt_algebraic_late_flt_xforms[i];
21780             if (condition_flags[xform->condition_offset] &&
21781                 nir_replace_instr(alu, xform->search, xform->replace,
21782                                   mem_ctx)) {
21783                progress = true;
21784                break;
21785             }
21786          }
21787          break;
21788       case nir_op_fdot2:
21789          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fdot2_xforms); i++) {
21790             const struct transform *xform = &nir_opt_algebraic_late_fdot2_xforms[i];
21791             if (condition_flags[xform->condition_offset] &&
21792                 nir_replace_instr(alu, xform->search, xform->replace,
21793                                   mem_ctx)) {
21794                progress = true;
21795                break;
21796             }
21797          }
21798          break;
21799       case nir_op_fdot3:
21800          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fdot3_xforms); i++) {
21801             const struct transform *xform = &nir_opt_algebraic_late_fdot3_xforms[i];
21802             if (condition_flags[xform->condition_offset] &&
21803                 nir_replace_instr(alu, xform->search, xform->replace,
21804                                   mem_ctx)) {
21805                progress = true;
21806                break;
21807             }
21808          }
21809          break;
21810       case nir_op_fneg:
21811          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fneg_xforms); i++) {
21812             const struct transform *xform = &nir_opt_algebraic_late_fneg_xforms[i];
21813             if (condition_flags[xform->condition_offset] &&
21814                 nir_replace_instr(alu, xform->search, xform->replace,
21815                                   mem_ctx)) {
21816                progress = true;
21817                break;
21818             }
21819          }
21820          break;
21821       case nir_op_fmax:
21822          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fmax_xforms); i++) {
21823             const struct transform *xform = &nir_opt_algebraic_late_fmax_xforms[i];
21824             if (condition_flags[xform->condition_offset] &&
21825                 nir_replace_instr(alu, xform->search, xform->replace,
21826                                   mem_ctx)) {
21827                progress = true;
21828                break;
21829             }
21830          }
21831          break;
21832       case nir_op_fne:
21833          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fne_xforms); i++) {
21834             const struct transform *xform = &nir_opt_algebraic_late_fne_xforms[i];
21835             if (condition_flags[xform->condition_offset] &&
21836                 nir_replace_instr(alu, xform->search, xform->replace,
21837                                   mem_ctx)) {
21838                progress = true;
21839                break;
21840             }
21841          }
21842          break;
21843       case nir_op_fmin:
21844          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fmin_xforms); i++) {
21845             const struct transform *xform = &nir_opt_algebraic_late_fmin_xforms[i];
21846             if (condition_flags[xform->condition_offset] &&
21847                 nir_replace_instr(alu, xform->search, xform->replace,
21848                                   mem_ctx)) {
21849                progress = true;
21850                break;
21851             }
21852          }
21853          break;
21854       case nir_op_feq:
21855          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_feq_xforms); i++) {
21856             const struct transform *xform = &nir_opt_algebraic_late_feq_xforms[i];
21857             if (condition_flags[xform->condition_offset] &&
21858                 nir_replace_instr(alu, xform->search, xform->replace,
21859                                   mem_ctx)) {
21860                progress = true;
21861                break;
21862             }
21863          }
21864          break;
21865       case nir_op_fge:
21866          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fge_xforms); i++) {
21867             const struct transform *xform = &nir_opt_algebraic_late_fge_xforms[i];
21868             if (condition_flags[xform->condition_offset] &&
21869                 nir_replace_instr(alu, xform->search, xform->replace,
21870                                   mem_ctx)) {
21871                progress = true;
21872                break;
21873             }
21874          }
21875          break;
21876       case nir_op_fdph:
21877          for (unsigned i = 0; i < ARRAY_SIZE(nir_opt_algebraic_late_fdph_xforms); i++) {
21878             const struct transform *xform = &nir_opt_algebraic_late_fdph_xforms[i];
21879             if (condition_flags[xform->condition_offset] &&
21880                 nir_replace_instr(alu, xform->search, xform->replace,
21881                                   mem_ctx)) {
21882                progress = true;
21883                break;
21884             }
21885          }
21886          break;
21887       default:
21888          break;
21889       }
21890    }
21891 
21892    return progress;
21893 }
21894 
21895 static bool
nir_opt_algebraic_late_impl(nir_function_impl * impl,const bool * condition_flags)21896 nir_opt_algebraic_late_impl(nir_function_impl *impl, const bool *condition_flags)
21897 {
21898    void *mem_ctx = ralloc_parent(impl);
21899    bool progress = false;
21900 
21901    nir_foreach_block_reverse(block, impl) {
21902       progress |= nir_opt_algebraic_late_block(block, condition_flags, mem_ctx);
21903    }
21904 
21905    if (progress)
21906       nir_metadata_preserve(impl, nir_metadata_block_index |
21907                                   nir_metadata_dominance);
21908 
21909    return progress;
21910 }
21911 
21912 
21913 bool
nir_opt_algebraic_late(nir_shader * shader)21914 nir_opt_algebraic_late(nir_shader *shader)
21915 {
21916    bool progress = false;
21917    bool condition_flags[38];
21918    const nir_shader_compiler_options *options = shader->options;
21919    (void) options;
21920 
21921    condition_flags[0] = true;
21922    condition_flags[1] = options->lower_idiv;
21923    condition_flags[2] = options->lower_flrp32;
21924    condition_flags[3] = options->lower_flrp64;
21925    condition_flags[4] = options->lower_ffract;
21926    condition_flags[5] = !options->lower_flrp32;
21927    condition_flags[6] = !options->lower_flrp64;
21928    condition_flags[7] = options->lower_ffma;
21929    condition_flags[8] = options->fuse_ffma;
21930    condition_flags[9] = !options->lower_fsat;
21931    condition_flags[10] = options->lower_fsat;
21932    condition_flags[11] = options->lower_scmp;
21933    condition_flags[12] = options->lower_fpow;
21934    condition_flags[13] = !options->lower_fpow;
21935    condition_flags[14] = options->lower_fdiv;
21936    condition_flags[15] = options->lower_fsqrt;
21937    condition_flags[16] = !options->lower_fsqrt;
21938    condition_flags[17] = !options->lower_extract_byte;
21939    condition_flags[18] = !options->lower_extract_word;
21940    condition_flags[19] = options->lower_sub;
21941    condition_flags[20] = options->lower_negate;
21942    condition_flags[21] = options->lower_fmod32;
21943    condition_flags[22] = options->lower_fmod64;
21944    condition_flags[23] = options->lower_uadd_carry;
21945    condition_flags[24] = options->lower_usub_borrow;
21946    condition_flags[25] = options->lower_bitfield_insert;
21947    condition_flags[26] = options->lower_bitfield_extract;
21948    condition_flags[27] = options->lower_extract_byte;
21949    condition_flags[28] = options->lower_extract_word;
21950    condition_flags[29] = options->lower_pack_unorm_2x16;
21951    condition_flags[30] = options->lower_pack_unorm_4x8;
21952    condition_flags[31] = options->lower_pack_snorm_2x16;
21953    condition_flags[32] = options->lower_pack_snorm_4x8;
21954    condition_flags[33] = options->lower_unpack_unorm_2x16;
21955    condition_flags[34] = options->lower_unpack_unorm_4x8;
21956    condition_flags[35] = options->lower_unpack_snorm_2x16;
21957    condition_flags[36] = options->lower_unpack_snorm_4x8;
21958    condition_flags[37] = options->fdot_replicates;
21959 
21960    nir_foreach_function(function, shader) {
21961       if (function->impl)
21962          progress |= nir_opt_algebraic_late_impl(function->impl, condition_flags);
21963    }
21964 
21965    return progress;
21966 }
21967 
21968