1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* AArch64PostLegalizerCombinerImpl Combiner Match Table *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_GICOMBINER_DEPS
10
11#include "llvm/ADT/SparseBitVector.h"
12namespace llvm {
13
14extern cl::OptionCategory GICombinerOptionCategory;
15
16} // namespace llvm
17
18#endif // GET_GICOMBINER_DEPS
19
20#ifdef GET_GICOMBINER_TYPES
21
22struct AArch64PostLegalizerCombinerImplRuleConfig {
23 SparseBitVector<> DisabledRules;
24
25 bool isRuleEnabled(unsigned RuleID) const;
26 bool parseCommandLineOption();
27 bool setRuleEnabled(StringRef RuleIdentifier);
28 bool setRuleDisabled(StringRef RuleIdentifier);
29};
30
31static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) {
32 uint64_t I;
33 // getAtInteger(...) returns false on success
34 bool Parsed = !RuleIdentifier.getAsInteger(0, I);
35 if (Parsed)
36 return I;
37
38#ifndef NDEBUG
39 switch (RuleIdentifier.size()) {
40 default: break;
41 case 9: // 3 strings to match.
42 switch (RuleIdentifier[0]) {
43 default: break;
44 case 'c': // 1 string to match.
45 if (memcmp(RuleIdentifier.data()+1, "opy_prop", 8) != 0)
46 break;
47 return 0; // "copy_prop"
48 case 'm': // 1 string to match.
49 if (memcmp(RuleIdentifier.data()+1, "ul_const", 8) != 0)
50 break;
51 return 39; // "mul_const"
52 case 'o': // 1 string to match.
53 if (memcmp(RuleIdentifier.data()+1, "r_to_bsp", 8) != 0)
54 break;
55 return 107; // "or_to_bsp"
56 }
57 break;
58 case 10: // 3 strings to match.
59 switch (RuleIdentifier[0]) {
60 default: break;
61 case 'i': // 1 string to match.
62 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i", 9) != 0)
63 break;
64 return 76; // "i2p_to_p2i"
65 case 'p': // 1 string to match.
66 if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p", 9) != 0)
67 break;
68 return 75; // "p2i_to_i2p"
69 case 's': // 1 string to match.
70 if (memcmp(RuleIdentifier.data()+1, "elect_not", 9) != 0)
71 break;
72 return 55; // "select_not"
73 }
74 break;
75 case 11: // 6 strings to match.
76 switch (RuleIdentifier[0]) {
77 default: break;
78 case 'a': // 1 string to match.
79 if (memcmp(RuleIdentifier.data()+1, "dd_sub_reg", 10) != 0)
80 break;
81 return 81; // "add_sub_reg"
82 case 'm': // 1 string to match.
83 if (memcmp(RuleIdentifier.data()+1, "atch_addos", 10) != 0)
84 break;
85 return 47; // "match_addos"
86 case 't': // 3 strings to match.
87 if (memcmp(RuleIdentifier.data()+1, "runc_", 5) != 0)
88 break;
89 switch (RuleIdentifier[6]) {
90 default: break;
91 case 's': // 2 strings to match.
92 if (memcmp(RuleIdentifier.data()+7, "sat", 3) != 0)
93 break;
94 switch (RuleIdentifier[10]) {
95 default: break;
96 case 's': // 1 string to match.
97 return 119; // "trunc_ssats"
98 case 'u': // 1 string to match.
99 return 120; // "trunc_ssatu"
100 }
101 break;
102 case 'u': // 1 string to match.
103 if (memcmp(RuleIdentifier.data()+7, "satu", 4) != 0)
104 break;
105 return 121; // "trunc_usatu"
106 }
107 break;
108 case 'u': // 1 string to match.
109 if (memcmp(RuleIdentifier.data()+1, "nmerge_cst", 10) != 0)
110 break;
111 return 60; // "unmerge_cst"
112 }
113 break;
114 case 12: // 4 strings to match.
115 switch (RuleIdentifier[0]) {
116 default: break;
117 case 'e': // 1 string to match.
118 if (memcmp(RuleIdentifier.data()+1, "xtmultomull", 11) != 0)
119 break;
120 return 117; // "extmultomull"
121 case 'r': // 1 string to match.
122 if (memcmp(RuleIdentifier.data()+1, "edundant_or", 11) != 0)
123 break;
124 return 38; // "redundant_or"
125 case 's': // 1 string to match.
126 if (memcmp(RuleIdentifier.data()+1, "ext_of_sext", 11) != 0)
127 break;
128 return 6; // "sext_of_sext"
129 case 'z': // 1 string to match.
130 if (memcmp(RuleIdentifier.data()+1, "ext_of_zext", 11) != 0)
131 break;
132 return 4; // "zext_of_zext"
133 }
134 break;
135 case 13: // 7 strings to match.
136 switch (RuleIdentifier[0]) {
137 default: break;
138 case 'l': // 1 string to match.
139 if (memcmp(RuleIdentifier.data()+1, "oad_and_mask", 12) != 0)
140 break;
141 return 31; // "load_and_mask"
142 case 'm': // 2 strings to match.
143 switch (RuleIdentifier[1]) {
144 default: break;
145 case 'a': // 1 string to match.
146 if (memcmp(RuleIdentifier.data()+2, "tch_selects", 11) != 0)
147 break;
148 return 52; // "match_selects"
149 case 'e': // 1 string to match.
150 if (memcmp(RuleIdentifier.data()+2, "rge_unmerge", 11) != 0)
151 break;
152 return 59; // "merge_unmerge"
153 }
154 break;
155 case 'r': // 1 string to match.
156 if (memcmp(RuleIdentifier.data()+1, "edundant_and", 12) != 0)
157 break;
158 return 35; // "redundant_and"
159 case 's': // 1 string to match.
160 if (memcmp(RuleIdentifier.data()+1, "ame_val_zero", 12) != 0)
161 break;
162 return 72; // "same_val_zero"
163 case 'u': // 2 strings to match.
164 if (memcmp(RuleIdentifier.data()+1, "nmerge_", 7) != 0)
165 break;
166 switch (RuleIdentifier[8]) {
167 default: break;
168 case 'm': // 1 string to match.
169 if (memcmp(RuleIdentifier.data()+9, "erge", 4) != 0)
170 break;
171 return 58; // "unmerge_merge"
172 case 'u': // 1 string to match.
173 if (memcmp(RuleIdentifier.data()+9, "ndef", 4) != 0)
174 break;
175 return 61; // "unmerge_undef"
176 }
177 break;
178 }
179 break;
180 case 14: // 6 strings to match.
181 switch (RuleIdentifier[0]) {
182 default: break;
183 case 'a': // 2 strings to match.
184 if (memcmp(RuleIdentifier.data()+1, "nyext_of_", 9) != 0)
185 break;
186 switch (RuleIdentifier[10]) {
187 default: break;
188 case 's': // 1 string to match.
189 if (memcmp(RuleIdentifier.data()+11, "ext", 3) != 0)
190 break;
191 return 10; // "anyext_of_sext"
192 case 'z': // 1 string to match.
193 if (memcmp(RuleIdentifier.data()+11, "ext", 3) != 0)
194 break;
195 return 9; // "anyext_of_zext"
196 }
197 break;
198 case 'b': // 1 string to match.
199 if (memcmp(RuleIdentifier.data()+1, "inop_same_val", 13) != 0)
200 break;
201 return 71; // "binop_same_val"
202 case 'f': // 1 string to match.
203 if (memcmp(RuleIdentifier.data()+1, "neg_fneg_fold", 13) != 0)
204 break;
205 return 78; // "fneg_fneg_fold"
206 case 's': // 1 string to match.
207 if (memcmp(RuleIdentifier.data()+1, "ext_of_anyext", 13) != 0)
208 break;
209 return 7; // "sext_of_anyext"
210 case 'z': // 1 string to match.
211 if (memcmp(RuleIdentifier.data()+1, "ext_of_anyext", 13) != 0)
212 break;
213 return 5; // "zext_of_anyext"
214 }
215 break;
216 case 15: // 3 strings to match.
217 switch (RuleIdentifier[0]) {
218 default: break;
219 case 'e': // 1 string to match.
220 if (memcmp(RuleIdentifier.data()+1, "xtending_loads", 14) != 0)
221 break;
222 return 30; // "extending_loads"
223 case 'o': // 1 string to match.
224 if (memcmp(RuleIdentifier.data()+1, "verlapping_and", 14) != 0)
225 break;
226 return 92; // "overlapping_and"
227 case 's': // 1 string to match.
228 if (memcmp(RuleIdentifier.data()+1, "elect_same_val", 14) != 0)
229 break;
230 return 69; // "select_same_val"
231 }
232 break;
233 case 16: // 9 strings to match.
234 switch (RuleIdentifier[0]) {
235 default: break;
236 case 'a': // 1 string to match.
237 if (memcmp(RuleIdentifier.data()+1, "nyext_of_anyext", 15) != 0)
238 break;
239 return 8; // "anyext_of_anyext"
240 case 'c': // 1 string to match.
241 if (memcmp(RuleIdentifier.data()+1, "ombine_mul_cmlt", 15) != 0)
242 break;
243 return 115; // "combine_mul_cmlt"
244 case 's': // 4 strings to match.
245 switch (RuleIdentifier[1]) {
246 default: break;
247 case 'e': // 3 strings to match.
248 if (memcmp(RuleIdentifier.data()+2, "lect_", 5) != 0)
249 break;
250 switch (RuleIdentifier[7]) {
251 default: break;
252 case 't': // 1 string to match.
253 if (memcmp(RuleIdentifier.data()+8, "o_minmax", 8) != 0)
254 break;
255 return 106; // "select_to_minmax"
256 case 'u': // 1 string to match.
257 if (memcmp(RuleIdentifier.data()+8, "ndef_cmp", 8) != 0)
258 break;
259 return 49; // "select_undef_cmp"
260 case 'z': // 1 string to match.
261 if (memcmp(RuleIdentifier.data()+8, "ero_true", 8) != 0)
262 break;
263 return 53; // "select_zero_true"
264 }
265 break;
266 case 'u': // 1 string to match.
267 if (memcmp(RuleIdentifier.data()+2, "baddmulreassoc", 14) != 0)
268 break;
269 return 118; // "subaddmulreassoc"
270 }
271 break;
272 case 't': // 2 strings to match.
273 if (memcmp(RuleIdentifier.data()+1, "runcate_of_", 11) != 0)
274 break;
275 switch (RuleIdentifier[12]) {
276 default: break;
277 case 's': // 1 string to match.
278 if (memcmp(RuleIdentifier.data()+13, "ext", 3) != 0)
279 break;
280 return 2; // "truncate_of_sext"
281 case 'z': // 1 string to match.
282 if (memcmp(RuleIdentifier.data()+13, "ext", 3) != 0)
283 break;
284 return 1; // "truncate_of_zext"
285 }
286 break;
287 case 'u': // 1 string to match.
288 if (memcmp(RuleIdentifier.data()+1, "ndef_to_fp_zero", 15) != 0)
289 break;
290 return 94; // "undef_to_fp_zero"
291 }
292 break;
293 case 17: // 5 strings to match.
294 switch (RuleIdentifier[0]) {
295 default: break;
296 case 'a': // 1 string to match.
297 if (memcmp(RuleIdentifier.data()+1, "nyext_trunc_fold", 16) != 0)
298 break;
299 return 77; // "anyext_trunc_fold"
300 case 'e': // 1 string to match.
301 if (memcmp(RuleIdentifier.data()+1, "rase_undef_store", 16) != 0)
302 break;
303 return 104; // "erase_undef_store"
304 case 's': // 2 strings to match.
305 if (memcmp(RuleIdentifier.data()+1, "elect_", 6) != 0)
306 break;
307 switch (RuleIdentifier[7]) {
308 default: break;
309 case 't': // 1 string to match.
310 if (memcmp(RuleIdentifier.data()+8, "o_iminmax", 9) != 0)
311 break;
312 return 51; // "select_to_iminmax"
313 case 'z': // 1 string to match.
314 if (memcmp(RuleIdentifier.data()+8, "ero_false", 9) != 0)
315 break;
316 return 54; // "select_zero_false"
317 }
318 break;
319 case 'u': // 1 string to match.
320 if (memcmp(RuleIdentifier.data()+1, "ndef_to_int_zero", 16) != 0)
321 break;
322 return 95; // "undef_to_int_zero"
323 }
324 break;
325 case 18: // 6 strings to match.
326 switch (RuleIdentifier[0]) {
327 default: break;
328 case 'b': // 1 string to match.
329 if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero", 17) != 0)
330 break;
331 return 73; // "binop_left_to_zero"
332 case 'c': // 2 strings to match.
333 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_f", 14) != 0)
334 break;
335 switch (RuleIdentifier[15]) {
336 default: break;
337 case 'a': // 1 string to match.
338 if (memcmp(RuleIdentifier.data()+16, "bs", 2) != 0)
339 break;
340 return 13; // "constant_fold_fabs"
341 case 'n': // 1 string to match.
342 if (memcmp(RuleIdentifier.data()+16, "eg", 2) != 0)
343 break;
344 return 12; // "constant_fold_fneg"
345 }
346 break;
347 case 'f': // 2 strings to match.
348 switch (RuleIdentifier[1]) {
349 default: break;
350 case 'o': // 1 string to match.
351 if (memcmp(RuleIdentifier.data()+2, "ld_merge_to_zext", 16) != 0)
352 break;
353 return 56; // "fold_merge_to_zext"
354 case 'p': // 1 string to match.
355 if (memcmp(RuleIdentifier.data()+2, "trunc_fpext_fold", 16) != 0)
356 break;
357 return 87; // "fptrunc_fpext_fold"
358 }
359 break;
360 case 't': // 1 string to match.
361 if (memcmp(RuleIdentifier.data()+1, "runcate_of_anyext", 17) != 0)
362 break;
363 return 3; // "truncate_of_anyext"
364 }
365 break;
366 case 19: // 15 strings to match.
367 switch (RuleIdentifier[0]) {
368 default: break;
369 case 'b': // 1 string to match.
370 if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero", 18) != 0)
371 break;
372 return 74; // "binop_right_to_zero"
373 case 'c': // 6 strings to match.
374 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_", 13) != 0)
375 break;
376 switch (RuleIdentifier[14]) {
377 default: break;
378 case 'b': // 1 string to match.
379 if (memcmp(RuleIdentifier.data()+15, "inop", 4) != 0)
380 break;
381 return 67; // "constant_fold_binop"
382 case 'f': // 5 strings to match.
383 switch (RuleIdentifier[15]) {
384 default: break;
385 case 'c': // 1 string to match.
386 if (memcmp(RuleIdentifier.data()+16, "eil", 3) != 0)
387 break;
388 return 18; // "constant_fold_fceil"
389 case 'l': // 1 string to match.
390 if (memcmp(RuleIdentifier.data()+16, "og2", 3) != 0)
391 break;
392 return 15; // "constant_fold_flog2"
393 case 'p': // 1 string to match.
394 if (memcmp(RuleIdentifier.data()+16, "ext", 3) != 0)
395 break;
396 return 17; // "constant_fold_fpext"
397 case 'r': // 1 string to match.
398 if (memcmp(RuleIdentifier.data()+16, "int", 3) != 0)
399 break;
400 return 23; // "constant_fold_frint"
401 case 's': // 1 string to match.
402 if (memcmp(RuleIdentifier.data()+16, "qrt", 3) != 0)
403 break;
404 return 14; // "constant_fold_fsqrt"
405 }
406 break;
407 }
408 break;
409 case 'i': // 1 string to match.
410 if (memcmp(RuleIdentifier.data()+1, "nteger_of_truncate", 18) != 0)
411 break;
412 return 28; // "integer_of_truncate"
413 case 'm': // 1 string to match.
414 if (memcmp(RuleIdentifier.data()+1, "erge_of_x_and_zero", 18) != 0)
415 break;
416 return 65; // "merge_of_x_and_zero"
417 case 'p': // 1 string to match.
418 if (memcmp(RuleIdentifier.data()+1, "tr_add_immed_chain", 18) != 0)
419 break;
420 return 91; // "ptr_add_immed_chain"
421 case 'r': // 2 strings to match.
422 switch (RuleIdentifier[1]) {
423 default: break;
424 case 'i': // 1 string to match.
425 if (memcmp(RuleIdentifier.data()+2, "ght_identity_zero", 17) != 0)
426 break;
427 return 70; // "right_identity_zero"
428 case 'o': // 1 string to match.
429 if (memcmp(RuleIdentifier.data()+2, "tate_out_of_range", 17) != 0)
430 break;
431 return 45; // "rotate_out_of_range"
432 }
433 break;
434 case 's': // 2 strings to match.
435 if (RuleIdentifier[1] != 'e')
436 break;
437 switch (RuleIdentifier[2]) {
438 default: break;
439 case 'l': // 1 string to match.
440 if (memcmp(RuleIdentifier.data()+3, "ect_constant_cmp", 16) != 0)
441 break;
442 return 50; // "select_constant_cmp"
443 case 'x': // 1 string to match.
444 if (memcmp(RuleIdentifier.data()+3, "t_trunc_sextload", 16) != 0)
445 break;
446 return 33; // "sext_trunc_sextload"
447 }
448 break;
449 case 'u': // 1 string to match.
450 if (memcmp(RuleIdentifier.data()+1, "nary_undef_to_zero", 18) != 0)
451 break;
452 return 99; // "unary_undef_to_zero"
453 }
454 break;
455 case 20: // 7 strings to match.
456 switch (RuleIdentifier[0]) {
457 default: break;
458 case 'b': // 1 string to match.
459 if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_fold", 19) != 0)
460 break;
461 return 85; // "bitcast_bitcast_fold"
462 case 'c': // 1 string to match.
463 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_ffloor", 19) != 0)
464 break;
465 return 19; // "constant_fold_ffloor"
466 case 'm': // 1 string to match.
467 if (memcmp(RuleIdentifier.data()+1, "erge_of_x_and_undef", 19) != 0)
468 break;
469 return 64; // "merge_of_x_and_undef"
470 case 'r': // 1 string to match.
471 if (memcmp(RuleIdentifier.data()+1, "edundant_sext_inreg", 19) != 0)
472 break;
473 return 40; // "redundant_sext_inreg"
474 case 's': // 1 string to match.
475 if (memcmp(RuleIdentifier.data()+1, "plit_store_zero_128", 19) != 0)
476 break;
477 return 93; // "split_store_zero_128"
478 case 'u': // 2 strings to match.
479 if (RuleIdentifier[1] != 'n')
480 break;
481 switch (RuleIdentifier[2]) {
482 default: break;
483 case 'a': // 1 string to match.
484 if (memcmp(RuleIdentifier.data()+3, "ry_undef_to_undef", 17) != 0)
485 break;
486 return 100; // "unary_undef_to_undef"
487 case 'm': // 1 string to match.
488 if (memcmp(RuleIdentifier.data()+3, "erge_zext_to_zext", 17) != 0)
489 break;
490 return 63; // "unmerge_zext_to_zext"
491 }
492 break;
493 }
494 break;
495 case 21: // 8 strings to match.
496 switch (RuleIdentifier[0]) {
497 default: break;
498 case 'c': // 3 strings to match.
499 if (RuleIdentifier[1] != 'o')
500 break;
501 switch (RuleIdentifier[2]) {
502 default: break;
503 case 'm': // 2 strings to match.
504 if (memcmp(RuleIdentifier.data()+3, "bine_", 5) != 0)
505 break;
506 switch (RuleIdentifier[8]) {
507 default: break;
508 case 'b': // 1 string to match.
509 if (memcmp(RuleIdentifier.data()+9, "uild_unmerge", 12) != 0)
510 break;
511 return 66; // "combine_build_unmerge"
512 case 'c': // 1 string to match.
513 if (memcmp(RuleIdentifier.data()+9, "oncat_vector", 12) != 0)
514 break;
515 return 108; // "combine_concat_vector"
516 }
517 break;
518 case 'n': // 1 string to match.
519 if (memcmp(RuleIdentifier.data()+3, "stant_fold_fptrunc", 18) != 0)
520 break;
521 return 16; // "constant_fold_fptrunc"
522 }
523 break;
524 case 'l': // 1 string to match.
525 if (memcmp(RuleIdentifier.data()+1, "shr_of_trunc_of_lshr", 20) != 0)
526 break;
527 return 123; // "lshr_of_trunc_of_lshr"
528 case 'm': // 1 string to match.
529 if (memcmp(RuleIdentifier.data()+1, "utate_anyext_to_zext", 20) != 0)
530 break;
531 return 29; // "mutate_anyext_to_zext"
532 case 'r': // 1 string to match.
533 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_fp", 20) != 0)
534 break;
535 return 80; // "right_identity_one_fp"
536 case 'u': // 2 strings to match.
537 if (RuleIdentifier[1] != 'n')
538 break;
539 switch (RuleIdentifier[2]) {
540 default: break;
541 case 'd': // 1 string to match.
542 if (memcmp(RuleIdentifier.data()+3, "ef_to_negative_one", 18) != 0)
543 break;
544 return 96; // "undef_to_negative_one"
545 case 'm': // 1 string to match.
546 if (memcmp(RuleIdentifier.data()+3, "erge_dead_to_trunc", 18) != 0)
547 break;
548 return 62; // "unmerge_dead_to_trunc"
549 }
550 break;
551 }
552 break;
553 case 22: // 5 strings to match.
554 switch (RuleIdentifier[0]) {
555 default: break;
556 case 'c': // 1 string to match.
557 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fp_binop", 21) != 0)
558 break;
559 return 68; // "constant_fold_fp_binop"
560 case 'm': // 1 string to match.
561 if (memcmp(RuleIdentifier.data()+1, "atch_subo_no_overflow", 21) != 0)
562 break;
563 return 48; // "match_subo_no_overflow"
564 case 'p': // 1 string to match.
565 if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_any_op", 21) != 0)
566 break;
567 return 101; // "propagate_undef_any_op"
568 case 'r': // 1 string to match.
569 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_int", 21) != 0)
570 break;
571 return 79; // "right_identity_one_int"
572 case 't': // 1 string to match.
573 if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold", 21) != 0)
574 break;
575 return 83; // "trunc_buildvector_fold"
576 }
577 break;
578 case 23: // 5 strings to match.
579 switch (RuleIdentifier[0]) {
580 default: break;
581 case 'b': // 1 string to match.
582 if (memcmp(RuleIdentifier.data()+1, "uildvector_of_truncate", 22) != 0)
583 break;
584 return 27; // "buildvector_of_truncate"
585 case 'i': // 2 strings to match.
586 if (memcmp(RuleIdentifier.data()+1, "tof_const_zero_fold_", 20) != 0)
587 break;
588 switch (RuleIdentifier[21]) {
589 default: break;
590 case 's': // 1 string to match.
591 if (RuleIdentifier[22] != 'i')
592 break;
593 return 25; // "itof_const_zero_fold_si"
594 case 'u': // 1 string to match.
595 if (RuleIdentifier[22] != 'i')
596 break;
597 return 26; // "itof_const_zero_fold_ui"
598 }
599 break;
600 case 'p': // 1 string to match.
601 if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_all_ops", 22) != 0)
602 break;
603 return 102; // "propagate_undef_all_ops"
604 case 't': // 1 string to match.
605 if (memcmp(RuleIdentifier.data()+1, "runcusatu_to_fptouisat", 22) != 0)
606 break;
607 return 122; // "truncusatu_to_fptouisat"
608 }
609 break;
610 case 24: // 4 strings to match.
611 switch (RuleIdentifier[0]) {
612 default: break;
613 case 'b': // 1 string to match.
614 if (memcmp(RuleIdentifier.data()+1, "inop_left_undef_to_zero", 23) != 0)
615 break;
616 return 97; // "binop_left_undef_to_zero"
617 case 'c': // 1 string to match.
618 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fnearbyint", 23) != 0)
619 break;
620 return 24; // "constant_fold_fnearbyint"
621 case 's': // 1 string to match.
622 if (memcmp(RuleIdentifier.data()+1, "ext_inreg_of_sext_inreg", 23) != 0)
623 break;
624 return 11; // "sext_inreg_of_sext_inreg"
625 case 'x': // 1 string to match.
626 if (memcmp(RuleIdentifier.data()+1, "or_of_and_with_same_reg", 23) != 0)
627 break;
628 return 36; // "xor_of_and_with_same_reg"
629 }
630 break;
631 case 25: // 5 strings to match.
632 switch (RuleIdentifier[0]) {
633 default: break;
634 case 'b': // 3 strings to match.
635 switch (RuleIdentifier[1]) {
636 default: break;
637 case 'i': // 2 strings to match.
638 if (memcmp(RuleIdentifier.data()+2, "tfield_extract_from_", 20) != 0)
639 break;
640 switch (RuleIdentifier[22]) {
641 default: break;
642 case 'a': // 1 string to match.
643 if (memcmp(RuleIdentifier.data()+23, "nd", 2) != 0)
644 break;
645 return 42; // "bitfield_extract_from_and"
646 case 's': // 1 string to match.
647 if (memcmp(RuleIdentifier.data()+23, "hr", 2) != 0)
648 break;
649 return 43; // "bitfield_extract_from_shr"
650 }
651 break;
652 case 'u': // 1 string to match.
653 if (memcmp(RuleIdentifier.data()+2, "ildvector_identity_fold", 23) != 0)
654 break;
655 return 82; // "buildvector_identity_fold"
656 }
657 break;
658 case 'e': // 1 string to match.
659 if (memcmp(RuleIdentifier.data()+1, "xtract_vec_elt_build_vec", 24) != 0)
660 break;
661 return 112; // "extract_vec_elt_build_vec"
662 case 'r': // 1 string to match.
663 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_one_fp", 24) != 0)
664 break;
665 return 90; // "right_identity_neg_one_fp"
666 }
667 break;
668 case 26: // 6 strings to match.
669 switch (RuleIdentifier[0]) {
670 default: break;
671 case 'b': // 2 strings to match.
672 if (RuleIdentifier[1] != 'i')
673 break;
674 switch (RuleIdentifier[2]) {
675 default: break;
676 case 'n': // 1 string to match.
677 if (memcmp(RuleIdentifier.data()+3, "op_right_undef_to_undef", 23) != 0)
678 break;
679 return 98; // "binop_right_undef_to_undef"
680 case 't': // 1 string to match.
681 if (memcmp(RuleIdentifier.data()+3, "cast_bitcast_to_bitcast", 23) != 0)
682 break;
683 return 86; // "bitcast_bitcast_to_bitcast"
684 }
685 break;
686 case 'c': // 2 strings to match.
687 if (memcmp(RuleIdentifier.data()+1, "om", 2) != 0)
688 break;
689 switch (RuleIdentifier[3]) {
690 default: break;
691 case 'b': // 1 string to match.
692 if (memcmp(RuleIdentifier.data()+4, "ine_indexed_load_store", 22) != 0)
693 break;
694 return 32; // "combine_indexed_load_store"
695 case 'm': // 1 string to match.
696 if (memcmp(RuleIdentifier.data()+4, "ute_fp_constant_to_rhs", 22) != 0)
697 break;
698 return 111; // "commute_fp_constant_to_rhs"
699 }
700 break;
701 case 'e': // 1 string to match.
702 if (memcmp(RuleIdentifier.data()+1, "xtractvecelt_pairwise_add", 25) != 0)
703 break;
704 return 37; // "extractvecelt_pairwise_add"
705 case 'r': // 1 string to match.
706 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp", 25) != 0)
707 break;
708 return 88; // "right_identity_neg_zero_fp"
709 }
710 break;
711 case 27: // 4 strings to match.
712 switch (RuleIdentifier[0]) {
713 default: break;
714 case 'c': // 2 strings to match.
715 if (memcmp(RuleIdentifier.data()+1, "om", 2) != 0)
716 break;
717 switch (RuleIdentifier[3]) {
718 default: break;
719 case 'b': // 1 string to match.
720 if (memcmp(RuleIdentifier.data()+4, "ine_use_vector_truncate", 23) != 0)
721 break;
722 return 116; // "combine_use_vector_truncate"
723 case 'm': // 1 string to match.
724 if (memcmp(RuleIdentifier.data()+4, "ute_int_constant_to_rhs", 23) != 0)
725 break;
726 return 110; // "commute_int_constant_to_rhs"
727 }
728 break;
729 case 't': // 1 string to match.
730 if (memcmp(RuleIdentifier.data()+1, "runc_lshr_buildvector_fold", 26) != 0)
731 break;
732 return 84; // "trunc_lshr_buildvector_fold"
733 case 'u': // 1 string to match.
734 if (memcmp(RuleIdentifier.data()+1, "nmerge_anyext_build_vector", 26) != 0)
735 break;
736 return 57; // "unmerge_anyext_build_vector"
737 }
738 break;
739 case 28: // 1 string to match.
740 if (memcmp(RuleIdentifier.data()+0, "propagate_undef_shuffle_mask", 28) != 0)
741 break;
742 return 103; // "propagate_undef_shuffle_mask"
743 case 29: // 4 strings to match.
744 switch (RuleIdentifier[0]) {
745 default: break;
746 case 'b': // 1 string to match.
747 if (memcmp(RuleIdentifier.data()+1, "itfield_extract_from_shr_and", 28) != 0)
748 break;
749 return 44; // "bitfield_extract_from_shr_and"
750 case 'c': // 2 strings to match.
751 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_intrinsic_", 23) != 0)
752 break;
753 switch (RuleIdentifier[24]) {
754 default: break;
755 case 'r': // 1 string to match.
756 if (memcmp(RuleIdentifier.data()+25, "ound", 4) != 0)
757 break;
758 return 21; // "constant_fold_intrinsic_round"
759 case 't': // 1 string to match.
760 if (memcmp(RuleIdentifier.data()+25, "runc", 4) != 0)
761 break;
762 return 20; // "constant_fold_intrinsic_trunc"
763 }
764 break;
765 case 'i': // 1 string to match.
766 if (memcmp(RuleIdentifier.data()+1, "cmp_to_true_false_known_bits", 28) != 0)
767 break;
768 return 46; // "icmp_to_true_false_known_bits"
769 }
770 break;
771 case 30: // 1 string to match.
772 if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_zero_fp_nsz", 30) != 0)
773 break;
774 return 89; // "right_identity_neg_zero_fp_nsz"
775 case 31: // 1 string to match.
776 if (memcmp(RuleIdentifier.data()+0, "combine_build_vector_of_bitcast", 31) != 0)
777 break;
778 return 109; // "combine_build_vector_of_bitcast"
779 case 32: // 1 string to match.
780 if (memcmp(RuleIdentifier.data()+0, "bitfield_extract_from_sext_inreg", 32) != 0)
781 break;
782 return 41; // "bitfield_extract_from_sext_inreg"
783 case 33: // 1 string to match.
784 if (memcmp(RuleIdentifier.data()+0, "constant_fold_intrinsic_roundeven", 33) != 0)
785 break;
786 return 22; // "constant_fold_intrinsic_roundeven"
787 case 34: // 1 string to match.
788 if (memcmp(RuleIdentifier.data()+0, "extract_all_elts_from_build_vector", 34) != 0)
789 break;
790 return 113; // "extract_all_elts_from_build_vector"
791 case 36: // 1 string to match.
792 if (memcmp(RuleIdentifier.data()+0, "insert_extract_vec_elt_out_of_bounds", 36) != 0)
793 break;
794 return 105; // "insert_extract_vec_elt_out_of_bounds"
795 case 37: // 1 string to match.
796 if (memcmp(RuleIdentifier.data()+0, "hoist_logic_op_with_same_opcode_hands", 37) != 0)
797 break;
798 return 34; // "hoist_logic_op_with_same_opcode_hands"
799 case 46: // 2 strings to match.
800 switch (RuleIdentifier[0]) {
801 default: break;
802 case 'f': // 1 string to match.
803 if (memcmp(RuleIdentifier.data()+1, "unnel_shift_from_or_shift_constants_are_legal", 45) != 0)
804 break;
805 return 124; // "funnel_shift_from_or_shift_constants_are_legal"
806 case 'p': // 1 string to match.
807 if (memcmp(RuleIdentifier.data()+1, "ush_freeze_to_prevent_poison_from_propagating", 45) != 0)
808 break;
809 return 114; // "push_freeze_to_prevent_poison_from_propagating"
810 }
811 break;
812 }
813#endif // ifndef NDEBUG
814
815 return std::nullopt;
816}
817static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
818 std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
819 if (!RangePair.second.empty()) {
820 const auto First = getRuleIdxForIdentifier(RangePair.first);
821 const auto Last = getRuleIdxForIdentifier(RangePair.second);
822 if (!First || !Last)
823 return std::nullopt;
824 if (First >= Last)
825 report_fatal_error("Beginning of range should be before end of range");
826 return {{*First, *Last + 1}};
827 }
828 if (RangePair.first == "*") {
829 return {{0, 125}};
830 }
831 const auto I = getRuleIdxForIdentifier(RangePair.first);
832 if (!I)
833 return std::nullopt;
834 return {{*I, *I + 1}};
835}
836
837bool AArch64PostLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
838 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
839 if (!MaybeRange)
840 return false;
841 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
842 DisabledRules.reset(I);
843 return true;
844}
845
846bool AArch64PostLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
847 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
848 if (!MaybeRange)
849 return false;
850 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
851 DisabledRules.set(I);
852 return true;
853}
854
855static std::vector<std::string> AArch64PostLegalizerCombinerOption;
856static cl::list<std::string> AArch64PostLegalizerCombinerDisableOption(
857 "aarch64postlegalizercombiner-disable-rule",
858 cl::desc("Disable one or more combiner rules temporarily in the AArch64PostLegalizerCombiner pass"),
859 cl::CommaSeparated,
860 cl::Hidden,
861 cl::cat(GICombinerOptionCategory),
862 cl::callback([](const std::string &Str) {
863 AArch64PostLegalizerCombinerOption.push_back(Str);
864 }));
865static cl::list<std::string> AArch64PostLegalizerCombinerOnlyEnableOption(
866 "aarch64postlegalizercombiner-only-enable-rule",
867 cl::desc("Disable all rules in the AArch64PostLegalizerCombiner pass then re-enable the specified ones"),
868 cl::Hidden,
869 cl::cat(GICombinerOptionCategory),
870 cl::callback([](const std::string &CommaSeparatedArg) {
871 StringRef Str = CommaSeparatedArg;
872 AArch64PostLegalizerCombinerOption.push_back("*");
873 do {
874 auto X = Str.split(",");
875 AArch64PostLegalizerCombinerOption.push_back(("!" + X.first).str());
876 Str = X.second;
877 } while (!Str.empty());
878 }));
879
880
881bool AArch64PostLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
882 return !DisabledRules.test(RuleID);
883}
884bool AArch64PostLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
885 for (StringRef Identifier : AArch64PostLegalizerCombinerOption) {
886 bool Enabled = Identifier.consume_front("!");
887 if (Enabled && !setRuleEnabled(Identifier))
888 return false;
889 if (!Enabled && !setRuleDisabled(Identifier))
890 return false;
891 }
892 return true;
893}
894
895
896#endif // GET_GICOMBINER_TYPES
897
898#ifdef GET_GICOMBINER_TYPES
899
900const unsigned MAX_SUBTARGET_PREDICATES = 0;
901using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
902
903#endif // GET_GICOMBINER_TYPES
904
905#ifdef GET_GICOMBINER_CLASS_MEMBERS
906
907 bool canMatchOpcode(unsigned Opc) const override;
908
909#endif // GET_GICOMBINER_CLASS_MEMBERS
910
911#ifdef GET_GICOMBINER_CLASS_MEMBERS
912
913PredicateBitset AvailableModuleFeatures;
914mutable PredicateBitset AvailableFunctionFeatures;
915PredicateBitset getAvailableFeatures() const {
916 return AvailableModuleFeatures | AvailableFunctionFeatures;
917}
918PredicateBitset
919computeAvailableModuleFeatures(const AArch64Subtarget *Subtarget) const;
920PredicateBitset
921computeAvailableFunctionFeatures(const AArch64Subtarget *Subtarget,
922 const MachineFunction *MF) const;
923void setupGeneratedPerFunctionState(MachineFunction &MF) override;
924
925#endif // GET_GICOMBINER_CLASS_MEMBERS
926
927#ifdef GET_GICOMBINER_CLASS_MEMBERS
928
929 mutable MatcherState State;
930 typedef ComplexRendererFns(AArch64PostLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
931 typedef void(AArch64PostLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
932 const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
933 static AArch64PostLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
934 static AArch64PostLegalizerCombinerImpl::CustomRendererFn CustomRenderers[];
935 bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
936 bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
937 bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
938 const uint8_t *getMatchTable() const override;
939 bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
940 bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override;
941 bool testSimplePredicate(unsigned PredicateID) const override;
942 bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
943
944#endif // GET_GICOMBINER_CLASS_MEMBERS
945
946#ifdef GET_GICOMBINER_IMPL
947
948// LLT Objects.
949enum {
950 GILLT_s1,
951};
952const static size_t NumTypeObjects = 1;
953const static LLT TypeObjects[] = {
954 LLT::scalar(1),
955};
956
957// Bits for subtarget features that participate in instruction matching.
958enum SubtargetFeatureBits : uint8_t {
959};
960
961PredicateBitset AArch64PostLegalizerCombinerImpl::
962computeAvailableModuleFeatures(const AArch64Subtarget *Subtarget) const {
963 PredicateBitset Features{};
964 return Features;
965}
966
967void AArch64PostLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
968 AvailableFunctionFeatures = computeAvailableFunctionFeatures((const AArch64Subtarget *)&MF.getSubtarget(), &MF);
969}
970PredicateBitset AArch64PostLegalizerCombinerImpl::
971computeAvailableFunctionFeatures(const AArch64Subtarget *Subtarget, const MachineFunction *MF) const {
972 PredicateBitset Features{};
973 return Features;
974}
975
976// Feature bitsets.
977enum {
978 GIFBS_Invalid,
979};
980constexpr static PredicateBitset FeatureBitsets[] {
981 {}, // GIFBS_Invalid
982};
983
984// ComplexPattern predicates.
985enum {
986 GICP_Invalid,
987};
988// See constructor for table contents
989
990AArch64PostLegalizerCombinerImpl::ComplexMatcherMemFn
991AArch64PostLegalizerCombinerImpl::ComplexPredicateFns[] = {
992 nullptr, // GICP_Invalid
993};
994
995enum {
996 GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1,
997 GICXXPred_MI_Predicate_GICombiner1,
998 GICXXPred_MI_Predicate_GICombiner2,
999 GICXXPred_MI_Predicate_GICombiner3,
1000 GICXXPred_MI_Predicate_GICombiner4,
1001 GICXXPred_MI_Predicate_GICombiner5,
1002 GICXXPred_MI_Predicate_GICombiner6,
1003 GICXXPred_MI_Predicate_GICombiner7,
1004};
1005bool AArch64PostLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
1006 switch (PredicateID) {
1007 case GICXXPred_MI_Predicate_GICombiner0: {
1008 return MRI.getType(State.MIs[0]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg()) &&
1009 VT->computeNumSignBits(State.MIs[0]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg()).getScalarSizeInBits();
1010 }
1011 case GICXXPred_MI_Predicate_GICombiner1: {
1012 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0);
1013 }
1014 case GICXXPred_MI_Predicate_GICombiner2: {
1015 return MRI.getType(State.MIs[1]->getOperand(1).getReg()) != MRI.getType(State.MIs[0]->getOperand(0).getReg());
1016 }
1017 case GICXXPred_MI_Predicate_GICombiner3: {
1018 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0);
1019 }
1020 case GICXXPred_MI_Predicate_GICombiner4: {
1021 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 0.0);
1022 }
1023 case GICXXPred_MI_Predicate_GICombiner5: {
1024 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0);
1025 }
1026 case GICXXPred_MI_Predicate_GICombiner6: {
1027 return Helper.matchTruncUSatU(*State.MIs[0], *State.MIs[1]);
1028 }
1029 case GICXXPred_MI_Predicate_GICombiner7: {
1030 return Helper.matchTruncUSatUToFPTOUISat(*State.MIs[0], *State.MIs[1]);
1031 }
1032 }
1033 llvm_unreachable("Unknown predicate");
1034 return false;
1035}
1036bool AArch64PostLegalizerCombinerImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const {
1037 llvm_unreachable("Unknown predicate");
1038 return false;
1039}
1040bool AArch64PostLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
1041 llvm_unreachable("Unknown predicate");
1042 return false;
1043}
1044bool AArch64PostLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
1045 llvm_unreachable("Unknown predicate");
1046 return false;
1047}
1048bool AArch64PostLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
1049 llvm_unreachable("Unknown predicate");
1050 return false;
1051}
1052enum {
1053 GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
1054 GICXXPred_Simple_IsRule1Enabled,
1055 GICXXPred_Simple_IsRule2Enabled,
1056 GICXXPred_Simple_IsRule3Enabled,
1057 GICXXPred_Simple_IsRule4Enabled,
1058 GICXXPred_Simple_IsRule5Enabled,
1059 GICXXPred_Simple_IsRule6Enabled,
1060 GICXXPred_Simple_IsRule7Enabled,
1061 GICXXPred_Simple_IsRule8Enabled,
1062 GICXXPred_Simple_IsRule9Enabled,
1063 GICXXPred_Simple_IsRule10Enabled,
1064 GICXXPred_Simple_IsRule11Enabled,
1065 GICXXPred_Simple_IsRule12Enabled,
1066 GICXXPred_Simple_IsRule13Enabled,
1067 GICXXPred_Simple_IsRule14Enabled,
1068 GICXXPred_Simple_IsRule15Enabled,
1069 GICXXPred_Simple_IsRule16Enabled,
1070 GICXXPred_Simple_IsRule17Enabled,
1071 GICXXPred_Simple_IsRule18Enabled,
1072 GICXXPred_Simple_IsRule19Enabled,
1073 GICXXPred_Simple_IsRule20Enabled,
1074 GICXXPred_Simple_IsRule21Enabled,
1075 GICXXPred_Simple_IsRule22Enabled,
1076 GICXXPred_Simple_IsRule23Enabled,
1077 GICXXPred_Simple_IsRule24Enabled,
1078 GICXXPred_Simple_IsRule25Enabled,
1079 GICXXPred_Simple_IsRule26Enabled,
1080 GICXXPred_Simple_IsRule27Enabled,
1081 GICXXPred_Simple_IsRule28Enabled,
1082 GICXXPred_Simple_IsRule29Enabled,
1083 GICXXPred_Simple_IsRule30Enabled,
1084 GICXXPred_Simple_IsRule31Enabled,
1085 GICXXPred_Simple_IsRule32Enabled,
1086 GICXXPred_Simple_IsRule33Enabled,
1087 GICXXPred_Simple_IsRule34Enabled,
1088 GICXXPred_Simple_IsRule35Enabled,
1089 GICXXPred_Simple_IsRule36Enabled,
1090 GICXXPred_Simple_IsRule37Enabled,
1091 GICXXPred_Simple_IsRule38Enabled,
1092 GICXXPred_Simple_IsRule39Enabled,
1093 GICXXPred_Simple_IsRule40Enabled,
1094 GICXXPred_Simple_IsRule41Enabled,
1095 GICXXPred_Simple_IsRule42Enabled,
1096 GICXXPred_Simple_IsRule43Enabled,
1097 GICXXPred_Simple_IsRule44Enabled,
1098 GICXXPred_Simple_IsRule45Enabled,
1099 GICXXPred_Simple_IsRule46Enabled,
1100 GICXXPred_Simple_IsRule47Enabled,
1101 GICXXPred_Simple_IsRule48Enabled,
1102 GICXXPred_Simple_IsRule49Enabled,
1103 GICXXPred_Simple_IsRule50Enabled,
1104 GICXXPred_Simple_IsRule51Enabled,
1105 GICXXPred_Simple_IsRule52Enabled,
1106 GICXXPred_Simple_IsRule53Enabled,
1107 GICXXPred_Simple_IsRule54Enabled,
1108 GICXXPred_Simple_IsRule55Enabled,
1109 GICXXPred_Simple_IsRule56Enabled,
1110 GICXXPred_Simple_IsRule57Enabled,
1111 GICXXPred_Simple_IsRule58Enabled,
1112 GICXXPred_Simple_IsRule59Enabled,
1113 GICXXPred_Simple_IsRule60Enabled,
1114 GICXXPred_Simple_IsRule61Enabled,
1115 GICXXPred_Simple_IsRule62Enabled,
1116 GICXXPred_Simple_IsRule63Enabled,
1117 GICXXPred_Simple_IsRule64Enabled,
1118 GICXXPred_Simple_IsRule65Enabled,
1119 GICXXPred_Simple_IsRule66Enabled,
1120 GICXXPred_Simple_IsRule67Enabled,
1121 GICXXPred_Simple_IsRule68Enabled,
1122 GICXXPred_Simple_IsRule69Enabled,
1123 GICXXPred_Simple_IsRule70Enabled,
1124 GICXXPred_Simple_IsRule71Enabled,
1125 GICXXPred_Simple_IsRule72Enabled,
1126 GICXXPred_Simple_IsRule73Enabled,
1127 GICXXPred_Simple_IsRule74Enabled,
1128 GICXXPred_Simple_IsRule75Enabled,
1129 GICXXPred_Simple_IsRule76Enabled,
1130 GICXXPred_Simple_IsRule77Enabled,
1131 GICXXPred_Simple_IsRule78Enabled,
1132 GICXXPred_Simple_IsRule79Enabled,
1133 GICXXPred_Simple_IsRule80Enabled,
1134 GICXXPred_Simple_IsRule81Enabled,
1135 GICXXPred_Simple_IsRule82Enabled,
1136 GICXXPred_Simple_IsRule83Enabled,
1137 GICXXPred_Simple_IsRule84Enabled,
1138 GICXXPred_Simple_IsRule85Enabled,
1139 GICXXPred_Simple_IsRule86Enabled,
1140 GICXXPred_Simple_IsRule87Enabled,
1141 GICXXPred_Simple_IsRule88Enabled,
1142 GICXXPred_Simple_IsRule89Enabled,
1143 GICXXPred_Simple_IsRule90Enabled,
1144 GICXXPred_Simple_IsRule91Enabled,
1145 GICXXPred_Simple_IsRule92Enabled,
1146 GICXXPred_Simple_IsRule93Enabled,
1147 GICXXPred_Simple_IsRule94Enabled,
1148 GICXXPred_Simple_IsRule95Enabled,
1149 GICXXPred_Simple_IsRule96Enabled,
1150 GICXXPred_Simple_IsRule97Enabled,
1151 GICXXPred_Simple_IsRule98Enabled,
1152 GICXXPred_Simple_IsRule99Enabled,
1153 GICXXPred_Simple_IsRule100Enabled,
1154 GICXXPred_Simple_IsRule101Enabled,
1155 GICXXPred_Simple_IsRule102Enabled,
1156 GICXXPred_Simple_IsRule103Enabled,
1157 GICXXPred_Simple_IsRule104Enabled,
1158 GICXXPred_Simple_IsRule105Enabled,
1159 GICXXPred_Simple_IsRule106Enabled,
1160 GICXXPred_Simple_IsRule107Enabled,
1161 GICXXPred_Simple_IsRule108Enabled,
1162 GICXXPred_Simple_IsRule109Enabled,
1163 GICXXPred_Simple_IsRule110Enabled,
1164 GICXXPred_Simple_IsRule111Enabled,
1165 GICXXPred_Simple_IsRule112Enabled,
1166 GICXXPred_Simple_IsRule113Enabled,
1167 GICXXPred_Simple_IsRule114Enabled,
1168 GICXXPred_Simple_IsRule115Enabled,
1169 GICXXPred_Simple_IsRule116Enabled,
1170 GICXXPred_Simple_IsRule117Enabled,
1171 GICXXPred_Simple_IsRule118Enabled,
1172 GICXXPred_Simple_IsRule119Enabled,
1173 GICXXPred_Simple_IsRule120Enabled,
1174 GICXXPred_Simple_IsRule121Enabled,
1175 GICXXPred_Simple_IsRule122Enabled,
1176 GICXXPred_Simple_IsRule123Enabled,
1177 GICXXPred_Simple_IsRule124Enabled,
1178};
1179
1180bool AArch64PostLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
1181 return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
1182}
1183// Custom renderers.
1184enum {
1185 GICR_Invalid,
1186};
1187AArch64PostLegalizerCombinerImpl::CustomRendererFn
1188AArch64PostLegalizerCombinerImpl::CustomRenderers[] = {
1189 nullptr, // GICR_Invalid
1190};
1191
1192bool AArch64PostLegalizerCombinerImpl::canMatchOpcode(unsigned Opc) const {
1193 switch (Opc) {
1194 case TargetOpcode::G_SELECT:
1195 case TargetOpcode::G_ADD:
1196 case TargetOpcode::G_AND:
1197 case TargetOpcode::G_ASHR:
1198 case TargetOpcode::G_FADD:
1199 case TargetOpcode::G_FCOPYSIGN:
1200 case TargetOpcode::G_FDIV:
1201 case TargetOpcode::G_FMAXIMUM:
1202 case TargetOpcode::G_FMAXIMUMNUM:
1203 case TargetOpcode::G_FMAXNUM:
1204 case TargetOpcode::G_FMINIMUM:
1205 case TargetOpcode::G_FMINIMUMNUM:
1206 case TargetOpcode::G_FMINNUM:
1207 case TargetOpcode::G_FMUL:
1208 case TargetOpcode::G_FREM:
1209 case TargetOpcode::G_FSUB:
1210 case TargetOpcode::G_LSHR:
1211 case TargetOpcode::G_MERGE_VALUES:
1212 case TargetOpcode::G_MUL:
1213 case TargetOpcode::G_OR:
1214 case TargetOpcode::G_PTR_ADD:
1215 case TargetOpcode::G_ROTL:
1216 case TargetOpcode::G_ROTR:
1217 case TargetOpcode::G_SDIV:
1218 case TargetOpcode::G_SEXT_INREG:
1219 case TargetOpcode::G_SHL:
1220 case TargetOpcode::G_SREM:
1221 case TargetOpcode::G_SUB:
1222 case TargetOpcode::G_UDIV:
1223 case TargetOpcode::G_UREM:
1224 case TargetOpcode::G_XOR:
1225 case TargetOpcode::COPY:
1226 case TargetOpcode::G_ANYEXT:
1227 case TargetOpcode::G_BITCAST:
1228 case TargetOpcode::G_BUILD_VECTOR:
1229 case TargetOpcode::G_FABS:
1230 case TargetOpcode::G_FCEIL:
1231 case TargetOpcode::G_FFLOOR:
1232 case TargetOpcode::G_FLOG2:
1233 case TargetOpcode::G_FNEARBYINT:
1234 case TargetOpcode::G_FNEG:
1235 case TargetOpcode::G_FPEXT:
1236 case TargetOpcode::G_FPTOSI:
1237 case TargetOpcode::G_FPTOUI:
1238 case TargetOpcode::G_FPTRUNC:
1239 case TargetOpcode::G_FREEZE:
1240 case TargetOpcode::G_FRINT:
1241 case TargetOpcode::G_FSQRT:
1242 case TargetOpcode::G_INTRINSIC_ROUND:
1243 case TargetOpcode::G_INTRINSIC_ROUNDEVEN:
1244 case TargetOpcode::G_INTRINSIC_TRUNC:
1245 case TargetOpcode::G_INTTOPTR:
1246 case TargetOpcode::G_PTRTOINT:
1247 case TargetOpcode::G_SEXT:
1248 case TargetOpcode::G_SITOFP:
1249 case TargetOpcode::G_STORE:
1250 case TargetOpcode::G_TRUNC:
1251 case TargetOpcode::G_TRUNC_USAT_U:
1252 case TargetOpcode::G_UITOFP:
1253 case TargetOpcode::G_ZEXT:
1254 case TargetOpcode::G_ABS:
1255 case TargetOpcode::G_BUILD_VECTOR_TRUNC:
1256 case TargetOpcode::G_CONCAT_VECTORS:
1257 case TargetOpcode::G_EXTRACT_VECTOR_ELT:
1258 case TargetOpcode::G_FMAXNUM_IEEE:
1259 case TargetOpcode::G_FMINNUM_IEEE:
1260 case TargetOpcode::G_ICMP:
1261 case TargetOpcode::G_INSERT_VECTOR_ELT:
1262 case TargetOpcode::G_LOAD:
1263 case TargetOpcode::G_SADDO:
1264 case TargetOpcode::G_SADDSAT:
1265 case TargetOpcode::G_SEXTLOAD:
1266 case TargetOpcode::G_SHUFFLE_VECTOR:
1267 case TargetOpcode::G_SMAX:
1268 case TargetOpcode::G_SMIN:
1269 case TargetOpcode::G_SMULFIX:
1270 case TargetOpcode::G_SMULFIXSAT:
1271 case TargetOpcode::G_SMULH:
1272 case TargetOpcode::G_SMULO:
1273 case TargetOpcode::G_SSUBO:
1274 case TargetOpcode::G_UADDO:
1275 case TargetOpcode::G_UADDSAT:
1276 case TargetOpcode::G_UMAX:
1277 case TargetOpcode::G_UMIN:
1278 case TargetOpcode::G_UMULFIX:
1279 case TargetOpcode::G_UMULFIXSAT:
1280 case TargetOpcode::G_UMULH:
1281 case TargetOpcode::G_UMULO:
1282 case TargetOpcode::G_UNMERGE_VALUES:
1283 case TargetOpcode::G_USUBO:
1284 case TargetOpcode::G_ZEXTLOAD:
1285 return true;
1286 default:
1287 return false;
1288 }
1289}
1290
1291bool AArch64PostLegalizerCombinerImpl::tryCombineAll(MachineInstr &I) const {
1292 const PredicateBitset AvailableFeatures = getAvailableFeatures();
1293 State.MIs.clear();
1294 State.MIs.push_back(&I);
1295 if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), Helper.getTII(), MRI, Helper.getTRI(), Helper.getRBI(), AvailableFeatures, /*CoverageInfo*/ nullptr)) {
1296 return true;
1297 }
1298
1299 return false;
1300}
1301
1302enum {
1303 GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
1304 GICXXCustomAction_GICombiner1,
1305 GICXXCustomAction_GICombiner2,
1306 GICXXCustomAction_GICombiner3,
1307 GICXXCustomAction_GICombiner4,
1308 GICXXCustomAction_GICombiner5,
1309 GICXXCustomAction_GICombiner6,
1310 GICXXCustomAction_GICombiner7,
1311 GICXXCustomAction_GICombiner8,
1312 GICXXCustomAction_GICombiner9,
1313 GICXXCustomAction_GICombiner10,
1314 GICXXCustomAction_GICombiner11,
1315 GICXXCustomAction_GICombiner12,
1316 GICXXCustomAction_GICombiner13,
1317 GICXXCustomAction_GICombiner14,
1318 GICXXCustomAction_GICombiner15,
1319 GICXXCustomAction_GICombiner16,
1320 GICXXCustomAction_GICombiner17,
1321 GICXXCustomAction_GICombiner18,
1322 GICXXCustomAction_GICombiner19,
1323 GICXXCustomAction_GICombiner20,
1324 GICXXCustomAction_GICombiner21,
1325 GICXXCustomAction_GICombiner22,
1326 GICXXCustomAction_GICombiner23,
1327 GICXXCustomAction_GICombiner24,
1328 GICXXCustomAction_GICombiner25,
1329 GICXXCustomAction_GICombiner26,
1330 GICXXCustomAction_GICombiner27,
1331 GICXXCustomAction_GICombiner28,
1332 GICXXCustomAction_GICombiner29,
1333 GICXXCustomAction_GICombiner30,
1334 GICXXCustomAction_GICombiner31,
1335 GICXXCustomAction_GICombiner32,
1336 GICXXCustomAction_GICombiner33,
1337 GICXXCustomAction_GICombiner34,
1338 GICXXCustomAction_GICombiner35,
1339 GICXXCustomAction_GICombiner36,
1340 GICXXCustomAction_GICombiner37,
1341 GICXXCustomAction_GICombiner38,
1342 GICXXCustomAction_GICombiner39,
1343 GICXXCustomAction_GICombiner40,
1344 GICXXCustomAction_GICombiner41,
1345 GICXXCustomAction_GICombiner42,
1346 GICXXCustomAction_GICombiner43,
1347 GICXXCustomAction_GICombiner44,
1348 GICXXCustomAction_GICombiner45,
1349 GICXXCustomAction_GICombiner46,
1350 GICXXCustomAction_GICombiner47,
1351 GICXXCustomAction_GICombiner48,
1352 GICXXCustomAction_GICombiner49,
1353 GICXXCustomAction_GICombiner50,
1354 GICXXCustomAction_GICombiner51,
1355 GICXXCustomAction_GICombiner52,
1356 GICXXCustomAction_GICombiner53,
1357 GICXXCustomAction_GICombiner54,
1358 GICXXCustomAction_GICombiner55,
1359 GICXXCustomAction_GICombiner56,
1360 GICXXCustomAction_GICombiner57,
1361 GICXXCustomAction_GICombiner58,
1362 GICXXCustomAction_GICombiner59,
1363 GICXXCustomAction_GICombiner60,
1364 GICXXCustomAction_GICombiner61,
1365 GICXXCustomAction_GICombiner62,
1366 GICXXCustomAction_GICombiner63,
1367 GICXXCustomAction_GICombiner64,
1368 GICXXCustomAction_GICombiner65,
1369 GICXXCustomAction_GICombiner66,
1370 GICXXCustomAction_GICombiner67,
1371 GICXXCustomAction_GICombiner68,
1372 GICXXCustomAction_GICombiner69,
1373 GICXXCustomAction_GICombiner70,
1374 GICXXCustomAction_GICombiner71,
1375 GICXXCustomAction_GICombiner72,
1376 GICXXCustomAction_GICombiner73,
1377 GICXXCustomAction_GICombiner74,
1378 GICXXCustomAction_GICombiner75,
1379 GICXXCustomAction_GICombiner76,
1380 GICXXCustomAction_GICombiner77,
1381 GICXXCustomAction_GICombiner78,
1382 GICXXCustomAction_GICombiner79,
1383 GICXXCustomAction_GICombiner80,
1384 GICXXCustomAction_GICombiner81,
1385 GICXXCustomAction_GICombiner82,
1386};
1387bool AArch64PostLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
1388 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
1389 switch(ApplyID) {
1390 case GICXXCustomAction_GICombiner0:{
1391 // Match Patterns
1392 if(![&](){return Helper.matchCombineCopy(*State.MIs[0]);}()) {
1393 return false;
1394 }
1395 // Apply Patterns
1396 Helper.applyCombineCopy(*State.MIs[0]);
1397 return true;
1398 }
1399 case GICXXCustomAction_GICombiner1:{
1400 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1401 // Match Patterns
1402 if(![&](){return Helper.matchTruncateOfExt(*State.MIs[0], *State.MIs[1], GIMatchData_matchinfo);}()) {
1403 return false;
1404 }
1405 // Apply Patterns
1406 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1407 return true;
1408 }
1409 case GICXXCustomAction_GICombiner2:{
1410 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1411 // Match Patterns
1412 if(![&](){return Helper.matchExtOfExt(*State.MIs[0], *State.MIs[1], GIMatchData_matchinfo);}()) {
1413 return false;
1414 }
1415 // Apply Patterns
1416 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1417 return true;
1418 }
1419 case GICXXCustomAction_GICombiner3:{
1420 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1421 // Match Patterns
1422 if(![&](){return Helper.matchRedundantSextInReg(*State.MIs[0], *State.MIs[1], GIMatchData_matchinfo);}()) {
1423 return false;
1424 }
1425 // Apply Patterns
1426 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1427 return true;
1428 }
1429 case GICXXCustomAction_GICombiner4:{
1430 // Apply Patterns
1431 Helper.applyCombineConstantFoldFpUnary(*State.MIs[0], State.MIs[1]->getOperand(1).getFPImm());
1432 return true;
1433 }
1434 case GICXXCustomAction_GICombiner5:{
1435 // Apply Patterns
1436 Helper.replaceInstWithFConstant(*State.MIs[0]->getOperand(0).getParent(), 0.0);
1437 return true;
1438 }
1439 case GICXXCustomAction_GICombiner6:{
1440 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1441 // Match Patterns
1442 if(![&](){return Helper.matchCastOfBuildVector(*State.MIs[0], *State.MIs[1], GIMatchData_matchinfo);}()) {
1443 return false;
1444 }
1445 // Apply Patterns
1446 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1447 return true;
1448 }
1449 case GICXXCustomAction_GICombiner7:{
1450 APInt GIMatchData_matchinfo;
1451 // Match Patterns
1452 if(![&](){return Helper.matchCastOfInteger(*State.MIs[0], GIMatchData_matchinfo);}()) {
1453 return false;
1454 }
1455 // Apply Patterns
1456 Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo);
1457 return true;
1458 }
1459 case GICXXCustomAction_GICombiner8:{
1460 // Match Patterns
1461 if(![&](){return matchMutateAnyExtToZExt(*State.MIs[0], MRI);}()) {
1462 return false;
1463 }
1464 // Apply Patterns
1465 applyMutateAnyExtToZExt(*State.MIs[0], MRI, B, Observer);
1466 return true;
1467 }
1468 case GICXXCustomAction_GICombiner9:{
1469 PreferredTuple GIMatchData_matchinfo;
1470 // Match Patterns
1471 if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) {
1472 return false;
1473 }
1474 // Apply Patterns
1475 Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);
1476 return true;
1477 }
1478 case GICXXCustomAction_GICombiner10:{
1479 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1480 // Match Patterns
1481 if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) {
1482 return false;
1483 }
1484 // Apply Patterns
1485 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1486 return true;
1487 }
1488 case GICXXCustomAction_GICombiner11:{
1489 IndexedLoadStoreMatchInfo GIMatchData_matchinfo;
1490 // Match Patterns
1491 if(![&](){return Helper.matchCombineIndexedLoadStore(*State.MIs[0], GIMatchData_matchinfo);}()) {
1492 return false;
1493 }
1494 // Apply Patterns
1495 Helper.applyCombineIndexedLoadStore(*State.MIs[0], GIMatchData_matchinfo);
1496 return true;
1497 }
1498 case GICXXCustomAction_GICombiner12:{
1499 // Match Patterns
1500 if(![&](){return Helper.matchSextTruncSextLoad(*State.MIs[0]);}()) {
1501 return false;
1502 }
1503 // Apply Patterns
1504 Helper.applySextTruncSextLoad(*State.MIs[0]);
1505 return true;
1506 }
1507 case GICXXCustomAction_GICombiner13:{
1508 InstructionStepsMatchInfo GIMatchData_info;
1509 // Match Patterns
1510 if(![&](){return Helper.matchHoistLogicOpWithSameOpcodeHands(*State.MIs[0], GIMatchData_info);}()) {
1511 return false;
1512 }
1513 // Apply Patterns
1514 Helper.applyBuildInstructionSteps(*State.MIs[0], GIMatchData_info);
1515 return true;
1516 }
1517 case GICXXCustomAction_GICombiner14:{
1518 Register GIMatchData_matchinfo;
1519 // Match Patterns
1520 if(![&](){return Helper.matchRedundantAnd(*State.MIs[0], GIMatchData_matchinfo);}()) {
1521 return false;
1522 }
1523 // Apply Patterns
1524 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1525 return true;
1526 }
1527 case GICXXCustomAction_GICombiner15:{
1528 std::pair<Register, Register> GIMatchData_matchinfo;
1529 // Match Patterns
1530 if(![&](){return Helper.matchXorOfAndWithSameReg(*State.MIs[0], GIMatchData_matchinfo);}()) {
1531 return false;
1532 }
1533 // Apply Patterns
1534 Helper.applyXorOfAndWithSameReg(*State.MIs[0], GIMatchData_matchinfo);
1535 return true;
1536 }
1537 case GICXXCustomAction_GICombiner16:{
1538 std::tuple<unsigned, LLT, Register> GIMatchData_matchinfo;
1539 // Match Patterns
1540 if(![&](){return matchExtractVecEltPairwiseAdd(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
1541 return false;
1542 }
1543 // Apply Patterns
1544 applyExtractVecEltPairwiseAdd(*State.MIs[0], MRI, B, GIMatchData_matchinfo);
1545 return true;
1546 }
1547 case GICXXCustomAction_GICombiner17:{
1548 Register GIMatchData_matchinfo;
1549 // Match Patterns
1550 if(![&](){return Helper.matchRedundantOr(*State.MIs[0], GIMatchData_matchinfo);}()) {
1551 return false;
1552 }
1553 // Apply Patterns
1554 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1555 return true;
1556 }
1557 case GICXXCustomAction_GICombiner18:{
1558 std::function<void(MachineIRBuilder&, Register)> GIMatchData_matchinfo;
1559 // Match Patterns
1560 if(![&](){return matchAArch64MulConstCombine(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
1561 return false;
1562 }
1563 // Apply Patterns
1564 applyAArch64MulConstCombine(*State.MIs[0], MRI, B, GIMatchData_matchinfo);
1565 return true;
1566 }
1567 case GICXXCustomAction_GICombiner19:{
1568 // Match Patterns
1569 if(![&](){return Helper.matchRedundantSExtInReg(*State.MIs[0]);}()) {
1570 return false;
1571 }
1572 // Apply Patterns
1573 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 1);
1574 return true;
1575 }
1576 case GICXXCustomAction_GICombiner20:{
1577 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1578 // Match Patterns
1579 if(![&](){return Helper.matchBitfieldExtractFromSExtInReg(*State.MIs[0], GIMatchData_info);}()) {
1580 return false;
1581 }
1582 // Apply Patterns
1583 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
1584 return true;
1585 }
1586 case GICXXCustomAction_GICombiner21:{
1587 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1588 // Match Patterns
1589 if(![&](){return Helper.matchBitfieldExtractFromAnd(*State.MIs[0], GIMatchData_info);}()) {
1590 return false;
1591 }
1592 // Apply Patterns
1593 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
1594 return true;
1595 }
1596 case GICXXCustomAction_GICombiner22:{
1597 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1598 // Match Patterns
1599 if(![&](){return Helper.matchBitfieldExtractFromShr(*State.MIs[0], GIMatchData_info);}()) {
1600 return false;
1601 }
1602 // Apply Patterns
1603 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
1604 return true;
1605 }
1606 case GICXXCustomAction_GICombiner23:{
1607 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1608 // Match Patterns
1609 if(![&](){return Helper.matchBitfieldExtractFromShrAnd(*State.MIs[0], GIMatchData_info);}()) {
1610 return false;
1611 }
1612 // Apply Patterns
1613 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
1614 return true;
1615 }
1616 case GICXXCustomAction_GICombiner24:{
1617 // Match Patterns
1618 if(![&](){return Helper.matchRotateOutOfRange(*State.MIs[0]);}()) {
1619 return false;
1620 }
1621 // Apply Patterns
1622 Helper.applyRotateOutOfRange(*State.MIs[0]);
1623 return true;
1624 }
1625 case GICXXCustomAction_GICombiner25:{
1626 int64_t GIMatchData_matchinfo;
1627 // Match Patterns
1628 if(![&](){return Helper.matchICmpToTrueFalseKnownBits(*State.MIs[0], GIMatchData_matchinfo);}()) {
1629 return false;
1630 }
1631 // Apply Patterns
1632 Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo);
1633 return true;
1634 }
1635 case GICXXCustomAction_GICombiner26:{
1636 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1637 // Match Patterns
1638 if(![&](){return Helper.matchAddOverflow(*State.MIs[0], GIMatchData_matchinfo);}()) {
1639 return false;
1640 }
1641 // Apply Patterns
1642 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1643 return true;
1644 }
1645 case GICXXCustomAction_GICombiner27:{
1646 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1647 // Match Patterns
1648 if(![&](){return Helper.matchSuboCarryOut(*State.MIs[0], GIMatchData_matchinfo);}()) {
1649 return false;
1650 }
1651 // Apply Patterns
1652 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1653 return true;
1654 }
1655 case GICXXCustomAction_GICombiner28:{
1656 unsigned GIMatchData_matchinfo;
1657 // Match Patterns
1658 if(![&](){return Helper.matchConstantSelectCmp(*State.MIs[0], GIMatchData_matchinfo);}()) {
1659 return false;
1660 }
1661 // Apply Patterns
1662 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], GIMatchData_matchinfo);
1663 return true;
1664 }
1665 case GICXXCustomAction_GICombiner29:{
1666 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1667 // Match Patterns
1668 if(![&](){return Helper.matchSelectIMinMax(State.MIs[0]->getOperand(0), GIMatchData_info);}()) {
1669 return false;
1670 }
1671 // Apply Patterns
1672 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_info);
1673 return true;
1674 }
1675 case GICXXCustomAction_GICombiner30:{
1676 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1677 // Match Patterns
1678 if(![&](){return Helper.matchSelect(*State.MIs[0], GIMatchData_matchinfo);}()) {
1679 return false;
1680 }
1681 // Apply Patterns
1682 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1683 return true;
1684 }
1685 case GICXXCustomAction_GICombiner31:{
1686 // Match Patterns
1687 if(![&](){return matchFoldMergeToZext(*State.MIs[0], MRI);}()) {
1688 return false;
1689 }
1690 // Apply Patterns
1691 applyFoldMergeToZext(*State.MIs[0], MRI, B, Observer);
1692 return true;
1693 }
1694 case GICXXCustomAction_GICombiner32:{
1695 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1696 // Match Patterns
1697 if(![&](){return Helper.matchUnmergeValuesAnyExtBuildVector(*State.MIs[0], GIMatchData_matchinfo);}()) {
1698 return false;
1699 }
1700 // Apply Patterns
1701 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1702 return true;
1703 }
1704 case GICXXCustomAction_GICombiner33:{
1705 SmallVector<Register> GIMatchData_info;
1706 // Match Patterns
1707 if(![&](){return Helper.matchCombineUnmergeMergeToPlainValues(*State.MIs[0], GIMatchData_info);}()) {
1708 return false;
1709 }
1710 // Apply Patterns
1711 Helper.applyCombineUnmergeMergeToPlainValues(*State.MIs[0], GIMatchData_info);
1712 return true;
1713 }
1714 case GICXXCustomAction_GICombiner34:{
1715 Register GIMatchData_src;
1716 // Match Patterns
1717 if(![&](){// Check if first source comes from G_UNMERGE_VALUES.
1718 Register FirstMergeSrc = getRemainingOperands(*State.MIs[0], 1)[0].getReg();
1719 MachineInstr *UnmergeMI = MRI.getVRegDef(FirstMergeSrc);
1720 if (!UnmergeMI || UnmergeMI->getOpcode() != TargetOpcode::G_UNMERGE_VALUES)
1721 return false;
1722
1723 // Check counts match.
1724 unsigned NumMergeSrcs = getRemainingOperands(*State.MIs[0], 1).size();
1725 unsigned NumUnmergeDefs = UnmergeMI->getNumDefs();
1726 if (NumMergeSrcs != NumUnmergeDefs)
1727 return false;
1728
1729 // Verify all merge sources match unmerge defs in order.
1730 for (unsigned I = 0; I < NumMergeSrcs; ++I) {
1731 Register MergeSrc = getRemainingOperands(*State.MIs[0], 1)[I].getReg();
1732 Register UnmergeDef = UnmergeMI->getOperand(I).getReg();
1733
1734 if (MergeSrc != UnmergeDef)
1735 return false;
1736
1737 if (!MRI.hasOneNonDBGUse(MergeSrc))
1738 return false;
1739 }
1740
1741 // Check size compatibility.
1742 GIMatchData_src = UnmergeMI->getOperand(NumUnmergeDefs).getReg();
1743 LLT SrcTy = MRI.getType(GIMatchData_src);
1744 LLT DstTy = MRI.getType(State.MIs[0]->getOperand(0).getReg());
1745 if (SrcTy.getSizeInBits() != DstTy.getSizeInBits())
1746 return false;
1747
1748 // Check bitcast legality.
1749 if (SrcTy != DstTy) {
1750 std::array<LLT, 2> Types = {{DstTy, SrcTy}};
1751 LegalityQuery Query(TargetOpcode::G_BITCAST, Types);
1752 if (!Helper.isLegalOrBeforeLegalizer(Query))
1753 return false;
1754 }
1755
1756 return true;}()) {
1757 return false;
1758 }
1759 // Apply Patterns
1760 LLT SrcTy = MRI.getType(GIMatchData_src);
1761 LLT DstTy = MRI.getType(State.MIs[0]->getOperand(0).getReg());
1762
1763 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
1764
1765 if (SrcTy == DstTy) {
1766 Helper.replaceRegWith(MRI, State.MIs[0]->getOperand(0).getReg(), GIMatchData_src);
1767 } else {
1768 Helper.getBuilder().buildBitcast(State.MIs[0]->getOperand(0).getReg(), GIMatchData_src);
1769 }
1770
1771 State.MIs[0]->eraseFromParent();
1772 return true;
1773 }
1774 case GICXXCustomAction_GICombiner35:{
1775 SmallVector<APInt, 8> GIMatchData_info;
1776 // Match Patterns
1777 if(![&](){return Helper.matchCombineUnmergeConstant(*State.MIs[0], GIMatchData_info);}()) {
1778 return false;
1779 }
1780 // Apply Patterns
1781 Helper.applyCombineUnmergeConstant(*State.MIs[0], GIMatchData_info);
1782 return true;
1783 }
1784 case GICXXCustomAction_GICombiner36:{
1785 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1786 // Match Patterns
1787 if(![&](){return Helper.matchCombineUnmergeUndef(*State.MIs[0], GIMatchData_info);}()) {
1788 return false;
1789 }
1790 // Apply Patterns
1791 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
1792 return true;
1793 }
1794 case GICXXCustomAction_GICombiner37:{
1795 // Match Patterns
1796 if(![&](){return Helper.matchCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]);}()) {
1797 return false;
1798 }
1799 // Apply Patterns
1800 Helper.applyCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]);
1801 return true;
1802 }
1803 case GICXXCustomAction_GICombiner38:{
1804 // Match Patterns
1805 if(![&](){return Helper.matchCombineUnmergeZExtToZExt(*State.MIs[0]);}()) {
1806 return false;
1807 }
1808 // Apply Patterns
1809 Helper.applyCombineUnmergeZExtToZExt(*State.MIs[0]);
1810 return true;
1811 }
1812 case GICXXCustomAction_GICombiner39:{
1813 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1814 // Match Patterns
1815 if(![&](){return Helper.matchMergeXAndUndef(*State.MIs[0], GIMatchData_matchinfo);}()) {
1816 return false;
1817 }
1818 // Apply Patterns
1819 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1820 return true;
1821 }
1822 case GICXXCustomAction_GICombiner40:{
1823 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1824 // Match Patterns
1825 if(![&](){return Helper.matchMergeXAndZero(*State.MIs[0], GIMatchData_matchinfo);}()) {
1826 return false;
1827 }
1828 // Apply Patterns
1829 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1830 return true;
1831 }
1832 case GICXXCustomAction_GICombiner41:{
1833 Register GIMatchData_unmergeSrc;
1834 // Match Patterns
1835 if(![&](){return Helper.matchCombineBuildUnmerge(*State.MIs[0], MRI, GIMatchData_unmergeSrc);}()) {
1836 return false;
1837 }
1838 // Apply Patterns
1839 Helper.applyCombineBuildUnmerge(*State.MIs[0], MRI, B, GIMatchData_unmergeSrc);
1840 return true;
1841 }
1842 case GICXXCustomAction_GICombiner42:{
1843 APInt GIMatchData_matchinfo;
1844 // Match Patterns
1845 if(![&](){return Helper.matchConstantFoldBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) {
1846 return false;
1847 }
1848 // Apply Patterns
1849 Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo);
1850 return true;
1851 }
1852 case GICXXCustomAction_GICombiner43:{
1853 ConstantFP* GIMatchData_matchinfo;
1854 // Match Patterns
1855 if(![&](){return Helper.matchConstantFoldFPBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) {
1856 return false;
1857 }
1858 // Apply Patterns
1859 Helper.replaceInstWithFConstant(*State.MIs[0], GIMatchData_matchinfo);
1860 return true;
1861 }
1862 case GICXXCustomAction_GICombiner44:{
1863 // Match Patterns
1864 if(![&](){return Helper.matchSelectSameVal(*State.MIs[0]);}()) {
1865 return false;
1866 }
1867 // Apply Patterns
1868 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 2);
1869 return true;
1870 }
1871 case GICXXCustomAction_GICombiner45:{
1872 Register GIMatchData_info;
1873 // Match Patterns
1874 if(![&](){return Helper.matchCombineI2PToP2I(*State.MIs[0], GIMatchData_info);}()) {
1875 return false;
1876 }
1877 // Apply Patterns
1878 Helper.applyCombineI2PToP2I(*State.MIs[0], GIMatchData_info);
1879 return true;
1880 }
1881 case GICXXCustomAction_GICombiner46:{
1882 Register GIMatchData_info;
1883 // Match Patterns
1884 if(![&](){GIMatchData_info = State.MIs[1]->getOperand(1).getReg(); return true;}()) {
1885 return false;
1886 }
1887 // Apply Patterns
1888 Helper.applyCombineP2IToI2P(*State.MIs[0], GIMatchData_info);
1889 return true;
1890 }
1891 case GICXXCustomAction_GICombiner47:{
1892 Register GIMatchData_matchinfo;
1893 // Match Patterns
1894 if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) {
1895 return false;
1896 }
1897 // Apply Patterns
1898 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1899 return true;
1900 }
1901 case GICXXCustomAction_GICombiner48:{
1902 Register GIMatchData_matchinfo;
1903 // Match Patterns
1904 if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
1905 return false;
1906 }
1907 // Apply Patterns
1908 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1909 return true;
1910 }
1911 case GICXXCustomAction_GICombiner49:{
1912 Register GIMatchData_matchinfo;
1913 // Match Patterns
1914 if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
1915 return false;
1916 }
1917 // Apply Patterns
1918 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1919 return true;
1920 }
1921 case GICXXCustomAction_GICombiner50:{
1922 Register GIMatchData_matchinfo;
1923 // Match Patterns
1924 if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
1925 return false;
1926 }
1927 // Apply Patterns
1928 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1929 return true;
1930 }
1931 case GICXXCustomAction_GICombiner51:{
1932 // Match Patterns
1933 if(![&](){return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());}()) {
1934 return false;
1935 }
1936 // Apply Patterns
1937 Helper.replaceSingleDefInstWithReg(*State.MIs[0], State.MIs[1]->getOperand(1).getReg());
1938 return true;
1939 }
1940 case GICXXCustomAction_GICombiner52:{
1941 PtrAddChain GIMatchData_matchinfo;
1942 // Match Patterns
1943 if(![&](){return Helper.matchPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) {
1944 return false;
1945 }
1946 // Apply Patterns
1947 Helper.applyPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);
1948 return true;
1949 }
1950 case GICXXCustomAction_GICombiner53:{
1951 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1952 // Match Patterns
1953 if(![&](){return Helper.matchOverlappingAnd(*State.MIs[0], GIMatchData_info);}()) {
1954 return false;
1955 }
1956 // Apply Patterns
1957 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
1958 return true;
1959 }
1960 case GICXXCustomAction_GICombiner54:{
1961 // Match Patterns
1962 if(![&](){return matchSplitStoreZero128(*State.MIs[0], MRI);}()) {
1963 return false;
1964 }
1965 // Apply Patterns
1966 applySplitStoreZero128(*State.MIs[0], MRI, B, Observer);
1967 return true;
1968 }
1969 case GICXXCustomAction_GICombiner55:{
1970 // Match Patterns
1971 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
1972 return false;
1973 }
1974 // Apply Patterns
1975 Helper.replaceInstWithFConstant(*State.MIs[0], 0.0);
1976 return true;
1977 }
1978 case GICXXCustomAction_GICombiner56:{
1979 // Match Patterns
1980 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
1981 return false;
1982 }
1983 // Apply Patterns
1984 Helper.replaceInstWithConstant(*State.MIs[0], 0);
1985 return true;
1986 }
1987 case GICXXCustomAction_GICombiner57:{
1988 // Match Patterns
1989 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
1990 return false;
1991 }
1992 // Apply Patterns
1993 Helper.replaceInstWithConstant(*State.MIs[0], -1);
1994 return true;
1995 }
1996 case GICXXCustomAction_GICombiner58:{
1997 // Match Patterns
1998 if(![&](){return Helper.matchOperandIsUndef(*State.MIs[0], 1);}()) {
1999 return false;
2000 }
2001 // Apply Patterns
2002 Helper.replaceInstWithConstant(*State.MIs[0], 0);
2003 return true;
2004 }
2005 case GICXXCustomAction_GICombiner59:{
2006 // Match Patterns
2007 if(![&](){return Helper.matchOperandIsUndef(*State.MIs[0], 2);}()) {
2008 return false;
2009 }
2010 // Apply Patterns
2011 Helper.replaceInstWithUndef(*State.MIs[0]);
2012 return true;
2013 }
2014 case GICXXCustomAction_GICombiner60:{
2015 // Apply Patterns
2016 Helper.replaceInstWithUndef(*State.MIs[0]->getOperand(0).getParent());
2017 return true;
2018 }
2019 case GICXXCustomAction_GICombiner61:{
2020 // Match Patterns
2021 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
2022 return false;
2023 }
2024 // Apply Patterns
2025 Helper.replaceInstWithUndef(*State.MIs[0]);
2026 return true;
2027 }
2028 case GICXXCustomAction_GICombiner62:{
2029 // Match Patterns
2030 if(![&](){return Helper.matchAllExplicitUsesAreUndef(*State.MIs[0]);}()) {
2031 return false;
2032 }
2033 // Apply Patterns
2034 Helper.replaceInstWithUndef(*State.MIs[0]);
2035 return true;
2036 }
2037 case GICXXCustomAction_GICombiner63:{
2038 // Match Patterns
2039 if(![&](){return Helper.matchUndefShuffleVectorMask(*State.MIs[0]);}()) {
2040 return false;
2041 }
2042 // Apply Patterns
2043 Helper.replaceInstWithUndef(*State.MIs[0]);
2044 return true;
2045 }
2046 case GICXXCustomAction_GICombiner64:{
2047 // Match Patterns
2048 if(![&](){return Helper.matchUndefStore(*State.MIs[0]);}()) {
2049 return false;
2050 }
2051 // Apply Patterns
2052 Helper.eraseInst(*State.MIs[0]);
2053 return true;
2054 }
2055 case GICXXCustomAction_GICombiner65:{
2056 // Match Patterns
2057 if(![&](){return Helper.matchInsertExtractVecEltOutOfBounds(*State.MIs[0]);}()) {
2058 return false;
2059 }
2060 // Apply Patterns
2061 Helper.replaceInstWithUndef(*State.MIs[0]);
2062 return true;
2063 }
2064 case GICXXCustomAction_GICombiner66:{
2065 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2066 // Match Patterns
2067 if(![&](){return Helper.matchSimplifySelectToMinMax(*State.MIs[0], GIMatchData_info);}()) {
2068 return false;
2069 }
2070 // Apply Patterns
2071 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2072 return true;
2073 }
2074 case GICXXCustomAction_GICombiner67:{
2075 std::tuple<Register, Register, Register> GIMatchData_matchinfo;
2076 // Match Patterns
2077 if(![&](){return matchOrToBSP(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
2078 return false;
2079 }
2080 // Apply Patterns
2081 applyOrToBSP(*State.MIs[0], MRI, B, GIMatchData_matchinfo);
2082 return true;
2083 }
2084 case GICXXCustomAction_GICombiner68:{
2085 SmallVector<Register> GIMatchData_matchinfo;
2086 // Match Patterns
2087 if(![&](){return Helper.matchCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);}()) {
2088 return false;
2089 }
2090 // Apply Patterns
2091 Helper.applyCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);
2092 return true;
2093 }
2094 case GICXXCustomAction_GICombiner69:{
2095 SmallVector<Register> GIMatchData_matchinfo;
2096 // Match Patterns
2097 if(![&](){return Helper.matchCombineBuildVectorOfBitcast(*State.MIs[0], GIMatchData_matchinfo);}()) {
2098 return false;
2099 }
2100 // Apply Patterns
2101 Helper.applyCombineBuildVectorOfBitcast(*State.MIs[0], GIMatchData_matchinfo);
2102 return true;
2103 }
2104 case GICXXCustomAction_GICombiner70:{
2105 // Match Patterns
2106 if(![&](){return Helper.matchCommuteConstantToRHS(*State.MIs[0]);}()) {
2107 return false;
2108 }
2109 // Apply Patterns
2110 Helper.applyCommuteBinOpOperands(*State.MIs[0]);
2111 return true;
2112 }
2113 case GICXXCustomAction_GICombiner71:{
2114 // Match Patterns
2115 if(![&](){return Helper.matchCommuteFPConstantToRHS(*State.MIs[0]);}()) {
2116 return false;
2117 }
2118 // Apply Patterns
2119 Helper.applyCommuteBinOpOperands(*State.MIs[0]);
2120 return true;
2121 }
2122 case GICXXCustomAction_GICombiner72:{
2123 Register GIMatchData_matchinfo;
2124 // Match Patterns
2125 if(![&](){return Helper.matchExtractVecEltBuildVec(*State.MIs[0], GIMatchData_matchinfo);}()) {
2126 return false;
2127 }
2128 // Apply Patterns
2129 Helper.applyExtractVecEltBuildVec(*State.MIs[0], GIMatchData_matchinfo);
2130 return true;
2131 }
2132 case GICXXCustomAction_GICombiner73:{
2133 SmallVector<std::pair<Register, MachineInstr*>> GIMatchData_matchinfo;
2134 // Match Patterns
2135 if(![&](){return Helper.matchExtractAllEltsFromBuildVector(*State.MIs[0], GIMatchData_matchinfo);}()) {
2136 return false;
2137 }
2138 // Apply Patterns
2139 Helper.applyExtractAllEltsFromBuildVector(*State.MIs[0], GIMatchData_matchinfo);
2140 return true;
2141 }
2142 case GICXXCustomAction_GICombiner74:{
2143 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2144 // Match Patterns
2145 if(![&](){return !isGuaranteedNotToBePoison(State.MIs[0]->getOperand(1).getReg(), MRI) && Helper.matchFreezeOfSingleMaybePoisonOperand(*State.MIs[0], GIMatchData_matchinfo);}()) {
2146 return false;
2147 }
2148 // Apply Patterns
2149 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2150 return true;
2151 }
2152 case GICXXCustomAction_GICombiner75:{
2153 Register GIMatchData_matchinfo;
2154 // Match Patterns
2155 if(![&](){return matchCombineMulCMLT(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
2156 return false;
2157 }
2158 // Apply Patterns
2159 applyCombineMulCMLT(*State.MIs[0], MRI, B, GIMatchData_matchinfo);
2160 return true;
2161 }
2162 case GICXXCustomAction_GICombiner76:{
2163 Register GIMatchData_matchinfo;
2164 // Match Patterns
2165 if(![&](){return Helper.matchUseVectorTruncate(*State.MIs[0], GIMatchData_matchinfo);}()) {
2166 return false;
2167 }
2168 // Apply Patterns
2169 Helper.applyUseVectorTruncate(*State.MIs[0], GIMatchData_matchinfo);
2170 return true;
2171 }
2172 case GICXXCustomAction_GICombiner77:{
2173 std::tuple<bool, Register, Register> GIMatchData_matchinfo;
2174 // Match Patterns
2175 if(![&](){return matchExtMulToMULL(*State.MIs[0], MRI, VT, GIMatchData_matchinfo);}()) {
2176 return false;
2177 }
2178 // Apply Patterns
2179 applyExtMulToMULL(*State.MIs[0], MRI, B, Observer, GIMatchData_matchinfo);
2180 return true;
2181 }
2182 case GICXXCustomAction_GICombiner78:{
2183 // Match Patterns
2184 if(![&](){return matchSubAddMulReassoc(State.MIs[1]->getOperand(1).getReg(), State.MIs[1]->getOperand(2).getReg(),
2185 State.MIs[0]->getOperand(2).getReg(), State.MIs[0]->getOperand(1).getReg(), MRI);}()) {
2186 return false;
2187 }
2188 // Apply Patterns
2189 applySubAddMulReassoc(*State.MIs[0], *State.MIs[1], MRI, B, Observer);
2190 return true;
2191 }
2192 case GICXXCustomAction_GICombiner79:{
2193 Register GIMatchData_matchinfo;
2194 // Match Patterns
2195 if(![&](){return Helper.matchTruncSSatS(*State.MIs[0], GIMatchData_matchinfo);}()) {
2196 return false;
2197 }
2198 // Apply Patterns
2199 Helper.applyTruncSSatS(*State.MIs[0], GIMatchData_matchinfo);
2200 return true;
2201 }
2202 case GICXXCustomAction_GICombiner80:{
2203 Register GIMatchData_matchinfo;
2204 // Match Patterns
2205 if(![&](){return Helper.matchTruncSSatU(*State.MIs[0], GIMatchData_matchinfo);}()) {
2206 return false;
2207 }
2208 // Apply Patterns
2209 Helper.applyTruncSSatU(*State.MIs[0], GIMatchData_matchinfo);
2210 return true;
2211 }
2212 case GICXXCustomAction_GICombiner81:{
2213 LshrOfTruncOfLshr GIMatchData_matchinfo;
2214 // Match Patterns
2215 if(![&](){return Helper.matchLshrOfTruncOfLshr(*State.MIs[0], GIMatchData_matchinfo, *State.MIs[2]);}()) {
2216 return false;
2217 }
2218 // Apply Patterns
2219 Helper.applyLshrOfTruncOfLshr(*State.MIs[0], GIMatchData_matchinfo);
2220 return true;
2221 }
2222 case GICXXCustomAction_GICombiner82:{
2223 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2224 // Match Patterns
2225 if(![&](){return Helper.matchOrShiftToFunnelShift(*State.MIs[0], true, GIMatchData_info);}()) {
2226 return false;
2227 }
2228 // Apply Patterns
2229 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2230 return true;
2231 }
2232 }
2233 llvm_unreachable("Unknown Apply Action");
2234}
2235#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
2236#define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8)
2237#define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24)
2238#define GIMT_Encode8(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24), uint8_t(uint64_t(Val) >> 32), uint8_t(uint64_t(Val) >> 40), uint8_t(uint64_t(Val) >> 48), uint8_t(uint64_t(Val) >> 56)
2239#else
2240#define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val)
2241#define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
2242#define GIMT_Encode8(Val) uint8_t(uint64_t(Val) >> 56), uint8_t(uint64_t(Val) >> 48), uint8_t(uint64_t(Val) >> 40), uint8_t(uint64_t(Val) >> 32), uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
2243#endif
2244const uint8_t *AArch64PostLegalizerCombinerImpl::getMatchTable() const {
2245 constexpr static uint8_t MatchTable0[] = {
2246 /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(20), GIMT_Encode2(285), /*)*//*default:*//*Label 91*/ GIMT_Encode4(4942),
2247 /* 10 */ /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(1070), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2248 /* 150 */ /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(1082),
2249 /* 154 */ /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(1207),
2250 /* 158 */ /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(1313),
2251 /* 162 */ /*TargetOpcode::G_SDIV*//*Label 4*/ GIMT_Encode4(1466),
2252 /* 166 */ /*TargetOpcode::G_UDIV*//*Label 5*/ GIMT_Encode4(1518),
2253 /* 170 */ /*TargetOpcode::G_SREM*//*Label 6*/ GIMT_Encode4(1581),
2254 /* 174 */ /*TargetOpcode::G_UREM*//*Label 7*/ GIMT_Encode4(1633), GIMT_Encode4(0), GIMT_Encode4(0),
2255 /* 186 */ /*TargetOpcode::G_AND*//*Label 8*/ GIMT_Encode4(1696),
2256 /* 190 */ /*TargetOpcode::G_OR*//*Label 9*/ GIMT_Encode4(1835),
2257 /* 194 */ /*TargetOpcode::G_XOR*//*Label 10*/ GIMT_Encode4(1960), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2258 /* 250 */ /*TargetOpcode::G_UNMERGE_VALUES*//*Label 11*/ GIMT_Encode4(2078), GIMT_Encode4(0),
2259 /* 258 */ /*TargetOpcode::G_MERGE_VALUES*//*Label 12*/ GIMT_Encode4(2145),
2260 /* 262 */ /*TargetOpcode::G_BUILD_VECTOR*//*Label 13*/ GIMT_Encode4(2233),
2261 /* 266 */ /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 14*/ GIMT_Encode4(2309),
2262 /* 270 */ /*TargetOpcode::G_CONCAT_VECTORS*//*Label 15*/ GIMT_Encode4(2321),
2263 /* 274 */ /*TargetOpcode::G_PTRTOINT*//*Label 16*/ GIMT_Encode4(2333),
2264 /* 278 */ /*TargetOpcode::G_INTTOPTR*//*Label 17*/ GIMT_Encode4(2376),
2265 /* 282 */ /*TargetOpcode::G_BITCAST*//*Label 18*/ GIMT_Encode4(2409),
2266 /* 286 */ /*TargetOpcode::G_FREEZE*//*Label 19*/ GIMT_Encode4(2484), GIMT_Encode4(0), GIMT_Encode4(0),
2267 /* 298 */ /*TargetOpcode::G_INTRINSIC_TRUNC*//*Label 20*/ GIMT_Encode4(2496),
2268 /* 302 */ /*TargetOpcode::G_INTRINSIC_ROUND*//*Label 21*/ GIMT_Encode4(2518), GIMT_Encode4(0), GIMT_Encode4(0),
2269 /* 314 */ /*TargetOpcode::G_INTRINSIC_ROUNDEVEN*//*Label 22*/ GIMT_Encode4(2540), GIMT_Encode4(0), GIMT_Encode4(0),
2270 /* 326 */ /*TargetOpcode::G_LOAD*//*Label 23*/ GIMT_Encode4(2562),
2271 /* 330 */ /*TargetOpcode::G_SEXTLOAD*//*Label 24*/ GIMT_Encode4(2585),
2272 /* 334 */ /*TargetOpcode::G_ZEXTLOAD*//*Label 25*/ GIMT_Encode4(2608), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2273 /* 354 */ /*TargetOpcode::G_STORE*//*Label 26*/ GIMT_Encode4(2631), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2274 /* 502 */ /*TargetOpcode::G_ANYEXT*//*Label 27*/ GIMT_Encode4(2665),
2275 /* 506 */ /*TargetOpcode::G_TRUNC*//*Label 28*/ GIMT_Encode4(2772), GIMT_Encode4(0), GIMT_Encode4(0),
2276 /* 518 */ /*TargetOpcode::G_TRUNC_USAT_U*//*Label 29*/ GIMT_Encode4(2978), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2277 /* 538 */ /*TargetOpcode::G_SEXT*//*Label 30*/ GIMT_Encode4(3011),
2278 /* 542 */ /*TargetOpcode::G_SEXT_INREG*//*Label 31*/ GIMT_Encode4(3054),
2279 /* 546 */ /*TargetOpcode::G_ZEXT*//*Label 32*/ GIMT_Encode4(3109),
2280 /* 550 */ /*TargetOpcode::G_SHL*//*Label 33*/ GIMT_Encode4(3152),
2281 /* 554 */ /*TargetOpcode::G_LSHR*//*Label 34*/ GIMT_Encode4(3249),
2282 /* 558 */ /*TargetOpcode::G_ASHR*//*Label 35*/ GIMT_Encode4(3386), GIMT_Encode4(0), GIMT_Encode4(0),
2283 /* 570 */ /*TargetOpcode::G_ROTR*//*Label 36*/ GIMT_Encode4(3494),
2284 /* 574 */ /*TargetOpcode::G_ROTL*//*Label 37*/ GIMT_Encode4(3529),
2285 /* 578 */ /*TargetOpcode::G_ICMP*//*Label 38*/ GIMT_Encode4(3564), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2286 /* 594 */ /*TargetOpcode::G_SELECT*//*Label 39*/ GIMT_Encode4(3576),
2287 /* 598 */ /*TargetOpcode::G_UADDO*//*Label 40*/ GIMT_Encode4(3836), GIMT_Encode4(0),
2288 /* 606 */ /*TargetOpcode::G_USUBO*//*Label 41*/ GIMT_Encode4(3859), GIMT_Encode4(0),
2289 /* 614 */ /*TargetOpcode::G_SADDO*//*Label 42*/ GIMT_Encode4(3871), GIMT_Encode4(0),
2290 /* 622 */ /*TargetOpcode::G_SSUBO*//*Label 43*/ GIMT_Encode4(3894), GIMT_Encode4(0),
2291 /* 630 */ /*TargetOpcode::G_UMULO*//*Label 44*/ GIMT_Encode4(3906),
2292 /* 634 */ /*TargetOpcode::G_SMULO*//*Label 45*/ GIMT_Encode4(3918),
2293 /* 638 */ /*TargetOpcode::G_UMULH*//*Label 46*/ GIMT_Encode4(3930),
2294 /* 642 */ /*TargetOpcode::G_SMULH*//*Label 47*/ GIMT_Encode4(3942),
2295 /* 646 */ /*TargetOpcode::G_UADDSAT*//*Label 48*/ GIMT_Encode4(3954),
2296 /* 650 */ /*TargetOpcode::G_SADDSAT*//*Label 49*/ GIMT_Encode4(3966), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2297 /* 670 */ /*TargetOpcode::G_SMULFIX*//*Label 50*/ GIMT_Encode4(3978),
2298 /* 674 */ /*TargetOpcode::G_UMULFIX*//*Label 51*/ GIMT_Encode4(3990),
2299 /* 678 */ /*TargetOpcode::G_SMULFIXSAT*//*Label 52*/ GIMT_Encode4(4002),
2300 /* 682 */ /*TargetOpcode::G_UMULFIXSAT*//*Label 53*/ GIMT_Encode4(4014), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2301 /* 702 */ /*TargetOpcode::G_FADD*//*Label 54*/ GIMT_Encode4(4026),
2302 /* 706 */ /*TargetOpcode::G_FSUB*//*Label 55*/ GIMT_Encode4(4101),
2303 /* 710 */ /*TargetOpcode::G_FMUL*//*Label 56*/ GIMT_Encode4(4113), GIMT_Encode4(0), GIMT_Encode4(0),
2304 /* 722 */ /*TargetOpcode::G_FDIV*//*Label 57*/ GIMT_Encode4(4179),
2305 /* 726 */ /*TargetOpcode::G_FREM*//*Label 58*/ GIMT_Encode4(4191), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2306 /* 758 */ /*TargetOpcode::G_FLOG2*//*Label 59*/ GIMT_Encode4(4203), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2307 /* 774 */ /*TargetOpcode::G_FNEG*//*Label 60*/ GIMT_Encode4(4225),
2308 /* 778 */ /*TargetOpcode::G_FPEXT*//*Label 61*/ GIMT_Encode4(4276),
2309 /* 782 */ /*TargetOpcode::G_FPTRUNC*//*Label 62*/ GIMT_Encode4(4298),
2310 /* 786 */ /*TargetOpcode::G_FPTOSI*//*Label 63*/ GIMT_Encode4(4341),
2311 /* 790 */ /*TargetOpcode::G_FPTOUI*//*Label 64*/ GIMT_Encode4(4363),
2312 /* 794 */ /*TargetOpcode::G_SITOFP*//*Label 65*/ GIMT_Encode4(4385),
2313 /* 798 */ /*TargetOpcode::G_UITOFP*//*Label 66*/ GIMT_Encode4(4412), GIMT_Encode4(0), GIMT_Encode4(0),
2314 /* 810 */ /*TargetOpcode::G_FABS*//*Label 67*/ GIMT_Encode4(4439),
2315 /* 814 */ /*TargetOpcode::G_FCOPYSIGN*//*Label 68*/ GIMT_Encode4(4461), GIMT_Encode4(0), GIMT_Encode4(0),
2316 /* 826 */ /*TargetOpcode::G_FMINNUM*//*Label 69*/ GIMT_Encode4(4473),
2317 /* 830 */ /*TargetOpcode::G_FMAXNUM*//*Label 70*/ GIMT_Encode4(4496),
2318 /* 834 */ /*TargetOpcode::G_FMINNUM_IEEE*//*Label 71*/ GIMT_Encode4(4519),
2319 /* 838 */ /*TargetOpcode::G_FMAXNUM_IEEE*//*Label 72*/ GIMT_Encode4(4531),
2320 /* 842 */ /*TargetOpcode::G_FMINIMUM*//*Label 73*/ GIMT_Encode4(4543),
2321 /* 846 */ /*TargetOpcode::G_FMAXIMUM*//*Label 74*/ GIMT_Encode4(4566),
2322 /* 850 */ /*TargetOpcode::G_FMINIMUMNUM*//*Label 75*/ GIMT_Encode4(4589),
2323 /* 854 */ /*TargetOpcode::G_FMAXIMUMNUM*//*Label 76*/ GIMT_Encode4(4601), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2324 /* 890 */ /*TargetOpcode::G_PTR_ADD*//*Label 77*/ GIMT_Encode4(4613), GIMT_Encode4(0),
2325 /* 898 */ /*TargetOpcode::G_SMIN*//*Label 78*/ GIMT_Encode4(4659),
2326 /* 902 */ /*TargetOpcode::G_SMAX*//*Label 79*/ GIMT_Encode4(4682),
2327 /* 906 */ /*TargetOpcode::G_UMIN*//*Label 80*/ GIMT_Encode4(4705),
2328 /* 910 */ /*TargetOpcode::G_UMAX*//*Label 81*/ GIMT_Encode4(4728),
2329 /* 914 */ /*TargetOpcode::G_ABS*//*Label 82*/ GIMT_Encode4(4751), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2330 /* 946 */ /*TargetOpcode::G_INSERT_VECTOR_ELT*//*Label 83*/ GIMT_Encode4(4763),
2331 /* 950 */ /*TargetOpcode::G_EXTRACT_VECTOR_ELT*//*Label 84*/ GIMT_Encode4(4775),
2332 /* 954 */ /*TargetOpcode::G_SHUFFLE_VECTOR*//*Label 85*/ GIMT_Encode4(4809), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2333 /* 1006 */ /*TargetOpcode::G_FCEIL*//*Label 86*/ GIMT_Encode4(4832), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
2334 /* 1054 */ /*TargetOpcode::G_FSQRT*//*Label 87*/ GIMT_Encode4(4854),
2335 /* 1058 */ /*TargetOpcode::G_FFLOOR*//*Label 88*/ GIMT_Encode4(4876),
2336 /* 1062 */ /*TargetOpcode::G_FRINT*//*Label 89*/ GIMT_Encode4(4898),
2337 /* 1066 */ /*TargetOpcode::G_FNEARBYINT*//*Label 90*/ GIMT_Encode4(4920),
2338 /* 1070 */ // Label 0: @1070
2339 /* 1070 */ GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(1081), // Rule ID 0 //
2340 /* 1075 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
2341 /* 1078 */ // MIs[0] d
2342 /* 1078 */ // No operand predicates
2343 /* 1078 */ // MIs[0] s
2344 /* 1078 */ // No operand predicates
2345 /* 1078 */ // Combiner Rule #0: copy_prop
2346 /* 1078 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
2347 /* 1081 */ // Label 92: @1081
2348 /* 1081 */ GIM_Reject,
2349 /* 1082 */ // Label 1: @1082
2350 /* 1082 */ GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(1093), // Rule ID 79 //
2351 /* 1087 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2352 /* 1090 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_ADD'
2353 /* 1090 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2354 /* 1093 */ // Label 93: @1093
2355 /* 1093 */ GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(1104), // Rule ID 173 //
2356 /* 1098 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule101Enabled),
2357 /* 1101 */ // Combiner Rule #101: propagate_undef_any_op; wip_match_opcode 'G_ADD'
2358 /* 1101 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner61),
2359 /* 1104 */ // Label 94: @1104
2360 /* 1104 */ GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(1115), // Rule ID 186 //
2361 /* 1109 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
2362 /* 1112 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_ADD'
2363 /* 1112 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
2364 /* 1115 */ // Label 95: @1115
2365 /* 1115 */ GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(1149), // Rule ID 140 //
2366 /* 1120 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule81Enabled),
2367 /* 1123 */ // MIs[0] dst
2368 /* 1123 */ // No operand predicates
2369 /* 1123 */ // MIs[0] __add_sub_reg_match_0.tmp
2370 /* 1123 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2371 /* 1127 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
2372 /* 1131 */ // MIs[1] src
2373 /* 1131 */ // No operand predicates
2374 /* 1131 */ // MIs[1] __add_sub_reg_match_0.x
2375 /* 1131 */ // No operand predicates
2376 /* 1131 */ // MIs[0] __add_sub_reg_match_0.x
2377 /* 1131 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
2378 /* 1136 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2379 /* 1141 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2380 /* 1143 */ // Combiner Rule #81: add_sub_reg @ [__add_sub_reg_match_0[1]]
2381 /* 1143 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2382 /* 1148 */ GIR_EraseRootFromParent_Done,
2383 /* 1149 */ // Label 96: @1149
2384 /* 1149 */ GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(1183), // Rule ID 139 //
2385 /* 1154 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule81Enabled),
2386 /* 1157 */ // MIs[0] dst
2387 /* 1157 */ // No operand predicates
2388 /* 1157 */ // MIs[0] __add_sub_reg_match_0.x
2389 /* 1157 */ // No operand predicates
2390 /* 1157 */ // MIs[0] __add_sub_reg_match_0.tmp
2391 /* 1157 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2392 /* 1161 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
2393 /* 1165 */ // MIs[1] src
2394 /* 1165 */ // No operand predicates
2395 /* 1165 */ // MIs[1] __add_sub_reg_match_0.x
2396 /* 1165 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
2397 /* 1170 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2398 /* 1175 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2399 /* 1177 */ // Combiner Rule #81: add_sub_reg @ [__add_sub_reg_match_0[0]]
2400 /* 1177 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2401 /* 1182 */ GIR_EraseRootFromParent_Done,
2402 /* 1183 */ // Label 97: @1183
2403 /* 1183 */ GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(1206), // Rule ID 111 //
2404 /* 1188 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
2405 /* 1191 */ // MIs[0] dst
2406 /* 1191 */ // No operand predicates
2407 /* 1191 */ // MIs[0] lhs
2408 /* 1191 */ // No operand predicates
2409 /* 1191 */ // MIs[0] Operand 2
2410 /* 1191 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2411 /* 1195 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2412 /* 1200 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[1]]
2413 /* 1200 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2414 /* 1205 */ GIR_EraseRootFromParent_Done,
2415 /* 1206 */ // Label 98: @1206
2416 /* 1206 */ GIM_Reject,
2417 /* 1207 */ // Label 2: @1207
2418 /* 1207 */ GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(1218), // Rule ID 87 //
2419 /* 1212 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2420 /* 1215 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_SUB'
2421 /* 1215 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2422 /* 1218 */ // Label 99: @1218
2423 /* 1218 */ GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(1229), // Rule ID 174 //
2424 /* 1223 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule101Enabled),
2425 /* 1226 */ // Combiner Rule #101: propagate_undef_any_op; wip_match_opcode 'G_SUB'
2426 /* 1226 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner61),
2427 /* 1229 */ // Label 100: @1229
2428 /* 1229 */ GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(1268), // Rule ID 122 //
2429 /* 1234 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule72Enabled),
2430 /* 1237 */ // MIs[0] dst
2431 /* 1237 */ // No operand predicates
2432 /* 1237 */ // MIs[0] x
2433 /* 1237 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
2434 /* 1241 */ // MIs[0] x
2435 /* 1241 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
2436 /* 1246 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
2437 /* 1249 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
2438 /* 1259 */ // Combiner Rule #72: same_val_zero @ [__same_val_zero_match_0[0]]
2439 /* 1259 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
2440 /* 1262 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2441 /* 1264 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
2442 /* 1267 */ GIR_EraseRootFromParent_Done,
2443 /* 1268 */ // Label 101: @1268
2444 /* 1268 */ GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(1289), // Rule ID 221 //
2445 /* 1273 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule118Enabled),
2446 /* 1276 */ // MIs[0] dst
2447 /* 1276 */ // No operand predicates
2448 /* 1276 */ // MIs[0] src3
2449 /* 1276 */ // No operand predicates
2450 /* 1276 */ // MIs[0] tmp
2451 /* 1276 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2452 /* 1280 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ADD),
2453 /* 1284 */ // MIs[1] src1
2454 /* 1284 */ // No operand predicates
2455 /* 1284 */ // MIs[1] src2
2456 /* 1284 */ // No operand predicates
2457 /* 1284 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2458 /* 1286 */ // Combiner Rule #118: subaddmulreassoc
2459 /* 1286 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78),
2460 /* 1289 */ // Label 102: @1289
2461 /* 1289 */ GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(1312), // Rule ID 110 //
2462 /* 1294 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
2463 /* 1297 */ // MIs[0] dst
2464 /* 1297 */ // No operand predicates
2465 /* 1297 */ // MIs[0] lhs
2466 /* 1297 */ // No operand predicates
2467 /* 1297 */ // MIs[0] Operand 2
2468 /* 1297 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2469 /* 1301 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2470 /* 1306 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[0]]
2471 /* 1306 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2472 /* 1311 */ GIR_EraseRootFromParent_Done,
2473 /* 1312 */ // Label 103: @1312
2474 /* 1312 */ GIM_Reject,
2475 /* 1313 */ // Label 3: @1313
2476 /* 1313 */ GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(1324), // Rule ID 46 //
2477 /* 1318 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule39Enabled),
2478 /* 1321 */ // Combiner Rule #39: mul_const; wip_match_opcode 'G_MUL'
2479 /* 1321 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner18),
2480 /* 1324 */ // Label 104: @1324
2481 /* 1324 */ GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(1335), // Rule ID 84 //
2482 /* 1329 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2483 /* 1332 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_MUL'
2484 /* 1332 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2485 /* 1335 */ // Label 105: @1335
2486 /* 1335 */ GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(1346), // Rule ID 157 //
2487 /* 1340 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule95Enabled),
2488 /* 1343 */ // Combiner Rule #95: undef_to_int_zero; wip_match_opcode 'G_MUL'
2489 /* 1343 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner56),
2490 /* 1346 */ // Label 106: @1346
2491 /* 1346 */ GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(1357), // Rule ID 187 //
2492 /* 1351 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
2493 /* 1354 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_MUL'
2494 /* 1354 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
2495 /* 1357 */ // Label 107: @1357
2496 /* 1357 */ GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(1368), // Rule ID 218 //
2497 /* 1362 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule115Enabled),
2498 /* 1365 */ // Combiner Rule #115: combine_mul_cmlt; wip_match_opcode 'G_MUL'
2499 /* 1365 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner75),
2500 /* 1368 */ // Label 108: @1368
2501 /* 1368 */ GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(1408), // Rule ID 131 //
2502 /* 1373 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
2503 /* 1376 */ // MIs[0] dst
2504 /* 1376 */ // No operand predicates
2505 /* 1376 */ // MIs[0] zero
2506 /* 1376 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2507 /* 1380 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2508 /* 1384 */ // MIs[1] Operand 1
2509 /* 1384 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
2510 /* 1395 */ // MIs[0] rhs
2511 /* 1395 */ // No operand predicates
2512 /* 1395 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2513 /* 1400 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2514 /* 1402 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[7]]
2515 /* 1402 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2516 /* 1407 */ GIR_EraseRootFromParent_Done,
2517 /* 1408 */ // Label 109: @1408
2518 /* 1408 */ GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(1431), // Rule ID 132 //
2519 /* 1413 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule74Enabled),
2520 /* 1416 */ // MIs[0] dst
2521 /* 1416 */ // No operand predicates
2522 /* 1416 */ // MIs[0] lhs
2523 /* 1416 */ // No operand predicates
2524 /* 1416 */ // MIs[0] zero
2525 /* 1416 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2526 /* 1420 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2527 /* 1425 */ // Combiner Rule #74: binop_right_to_zero
2528 /* 1425 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2529 /* 1430 */ GIR_EraseRootFromParent_Done,
2530 /* 1431 */ // Label 110: @1431
2531 /* 1431 */ GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(1454), // Rule ID 137 //
2532 /* 1436 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule79Enabled),
2533 /* 1439 */ // MIs[0] dst
2534 /* 1439 */ // No operand predicates
2535 /* 1439 */ // MIs[0] x
2536 /* 1439 */ // No operand predicates
2537 /* 1439 */ // MIs[0] Operand 2
2538 /* 1439 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1,
2539 /* 1443 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2540 /* 1448 */ // Combiner Rule #79: right_identity_one_int
2541 /* 1448 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2542 /* 1453 */ GIR_EraseRootFromParent_Done,
2543 /* 1454 */ // Label 111: @1454
2544 /* 1454 */ GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(1465), // Rule ID 220 //
2545 /* 1459 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule117Enabled),
2546 /* 1462 */ // MIs[0] dst
2547 /* 1462 */ // No operand predicates
2548 /* 1462 */ // MIs[0] src1
2549 /* 1462 */ // No operand predicates
2550 /* 1462 */ // MIs[0] src2
2551 /* 1462 */ // No operand predicates
2552 /* 1462 */ // Combiner Rule #117: extmultomull
2553 /* 1462 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner77),
2554 /* 1465 */ // Label 112: @1465
2555 /* 1465 */ GIM_Reject,
2556 /* 1466 */ // Label 4: @1466
2557 /* 1466 */ GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(1477), // Rule ID 90 //
2558 /* 1471 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2559 /* 1474 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_SDIV'
2560 /* 1474 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2561 /* 1477 */ // Label 113: @1477
2562 /* 1477 */ GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(1517), // Rule ID 127 //
2563 /* 1482 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
2564 /* 1485 */ // MIs[0] dst
2565 /* 1485 */ // No operand predicates
2566 /* 1485 */ // MIs[0] zero
2567 /* 1485 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2568 /* 1489 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2569 /* 1493 */ // MIs[1] Operand 1
2570 /* 1493 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
2571 /* 1504 */ // MIs[0] rhs
2572 /* 1504 */ // No operand predicates
2573 /* 1504 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2574 /* 1509 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2575 /* 1511 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[3]]
2576 /* 1511 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2577 /* 1516 */ GIR_EraseRootFromParent_Done,
2578 /* 1517 */ // Label 114: @1517
2579 /* 1517 */ GIM_Reject,
2580 /* 1518 */ // Label 5: @1518
2581 /* 1518 */ GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(1529), // Rule ID 89 //
2582 /* 1523 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2583 /* 1526 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_UDIV'
2584 /* 1526 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2585 /* 1529 */ // Label 115: @1529
2586 /* 1529 */ GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(1540), // Rule ID 160 //
2587 /* 1534 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule97Enabled),
2588 /* 1537 */ // Combiner Rule #97: binop_left_undef_to_zero; wip_match_opcode 'G_UDIV'
2589 /* 1537 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner58),
2590 /* 1540 */ // Label 116: @1540
2591 /* 1540 */ GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(1580), // Rule ID 128 //
2592 /* 1545 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
2593 /* 1548 */ // MIs[0] dst
2594 /* 1548 */ // No operand predicates
2595 /* 1548 */ // MIs[0] zero
2596 /* 1548 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2597 /* 1552 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2598 /* 1556 */ // MIs[1] Operand 1
2599 /* 1556 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
2600 /* 1567 */ // MIs[0] rhs
2601 /* 1567 */ // No operand predicates
2602 /* 1567 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2603 /* 1572 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2604 /* 1574 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[4]]
2605 /* 1574 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2606 /* 1579 */ GIR_EraseRootFromParent_Done,
2607 /* 1580 */ // Label 117: @1580
2608 /* 1580 */ GIM_Reject,
2609 /* 1581 */ // Label 6: @1581
2610 /* 1581 */ GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(1592), // Rule ID 92 //
2611 /* 1586 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2612 /* 1589 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_SREM'
2613 /* 1589 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2614 /* 1592 */ // Label 118: @1592
2615 /* 1592 */ GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(1632), // Rule ID 129 //
2616 /* 1597 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
2617 /* 1600 */ // MIs[0] dst
2618 /* 1600 */ // No operand predicates
2619 /* 1600 */ // MIs[0] zero
2620 /* 1600 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2621 /* 1604 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2622 /* 1608 */ // MIs[1] Operand 1
2623 /* 1608 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
2624 /* 1619 */ // MIs[0] rhs
2625 /* 1619 */ // No operand predicates
2626 /* 1619 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2627 /* 1624 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2628 /* 1626 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[5]]
2629 /* 1626 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2630 /* 1631 */ GIR_EraseRootFromParent_Done,
2631 /* 1632 */ // Label 119: @1632
2632 /* 1632 */ GIM_Reject,
2633 /* 1633 */ // Label 7: @1633
2634 /* 1633 */ GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(1644), // Rule ID 91 //
2635 /* 1638 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2636 /* 1641 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_UREM'
2637 /* 1641 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2638 /* 1644 */ // Label 120: @1644
2639 /* 1644 */ GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(1655), // Rule ID 161 //
2640 /* 1649 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule97Enabled),
2641 /* 1652 */ // Combiner Rule #97: binop_left_undef_to_zero; wip_match_opcode 'G_UREM'
2642 /* 1652 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner58),
2643 /* 1655 */ // Label 121: @1655
2644 /* 1655 */ GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(1695), // Rule ID 130 //
2645 /* 1660 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
2646 /* 1663 */ // MIs[0] dst
2647 /* 1663 */ // No operand predicates
2648 /* 1663 */ // MIs[0] zero
2649 /* 1663 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2650 /* 1667 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2651 /* 1671 */ // MIs[1] Operand 1
2652 /* 1671 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
2653 /* 1682 */ // MIs[0] rhs
2654 /* 1682 */ // No operand predicates
2655 /* 1682 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2656 /* 1687 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2657 /* 1689 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[6]]
2658 /* 1689 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2659 /* 1694 */ GIR_EraseRootFromParent_Done,
2660 /* 1695 */ // Label 122: @1695
2661 /* 1695 */ GIM_Reject,
2662 /* 1696 */ // Label 8: @1696
2663 /* 1696 */ GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(1707), // Rule ID 33 //
2664 /* 1701 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled),
2665 /* 1704 */ // Combiner Rule #31: load_and_mask; wip_match_opcode 'G_AND'
2666 /* 1704 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
2667 /* 1707 */ // Label 123: @1707
2668 /* 1707 */ GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(1718), // Rule ID 39 //
2669 /* 1712 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
2670 /* 1715 */ // Combiner Rule #34: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_AND'
2671 /* 1715 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
2672 /* 1718 */ // Label 124: @1718
2673 /* 1718 */ GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(1729), // Rule ID 42 //
2674 /* 1723 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled),
2675 /* 1726 */ // Combiner Rule #35: redundant_and; wip_match_opcode 'G_AND'
2676 /* 1726 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
2677 /* 1729 */ // Label 125: @1729
2678 /* 1729 */ GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(1740), // Rule ID 81 //
2679 /* 1734 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2680 /* 1737 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_AND'
2681 /* 1737 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2682 /* 1740 */ // Label 126: @1740
2683 /* 1740 */ GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(1751), // Rule ID 152 //
2684 /* 1745 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule92Enabled),
2685 /* 1748 */ // Combiner Rule #92: overlapping_and; wip_match_opcode 'G_AND'
2686 /* 1748 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner53),
2687 /* 1751 */ // Label 127: @1751
2688 /* 1751 */ GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(1762), // Rule ID 156 //
2689 /* 1756 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule95Enabled),
2690 /* 1759 */ // Combiner Rule #95: undef_to_int_zero; wip_match_opcode 'G_AND'
2691 /* 1759 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner56),
2692 /* 1762 */ // Label 128: @1762
2693 /* 1762 */ GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(1773), // Rule ID 188 //
2694 /* 1767 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
2695 /* 1770 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_AND'
2696 /* 1770 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
2697 /* 1773 */ // Label 129: @1773
2698 /* 1773 */ GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(1810), // Rule ID 49 //
2699 /* 1778 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule42Enabled),
2700 /* 1781 */ // MIs[0] root
2701 /* 1781 */ // No operand predicates
2702 /* 1781 */ // MIs[0] shift
2703 /* 1781 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2704 /* 1785 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_LSHR),
2705 /* 1789 */ // MIs[1] x
2706 /* 1789 */ // No operand predicates
2707 /* 1789 */ // MIs[1] lsb
2708 /* 1789 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/2, // MIs[2]
2709 /* 1793 */ GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2710 /* 1797 */ // MIs[2] imm1
2711 /* 1797 */ // No operand predicates
2712 /* 1797 */ // MIs[0] mask
2713 /* 1797 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/3, /*MI*/0, /*OpIdx*/2, // MIs[3]
2714 /* 1801 */ GIM_CheckOpcode, /*MI*/3, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2715 /* 1805 */ // MIs[3] imm2
2716 /* 1805 */ // No operand predicates
2717 /* 1805 */ GIM_CheckIsSafeToFold, /*NumInsns*/3,
2718 /* 1807 */ // Combiner Rule #42: bitfield_extract_from_and
2719 /* 1807 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner21),
2720 /* 1810 */ // Label 130: @1810
2721 /* 1810 */ GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(1834), // Rule ID 120 //
2722 /* 1815 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled),
2723 /* 1818 */ // MIs[0] dst
2724 /* 1818 */ // No operand predicates
2725 /* 1818 */ // MIs[0] src
2726 /* 1818 */ // No operand predicates
2727 /* 1818 */ // MIs[0] src
2728 /* 1818 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
2729 /* 1823 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2730 /* 1828 */ // Combiner Rule #71: binop_same_val @ [__binop_same_val_match_0[0]]
2731 /* 1828 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2732 /* 1833 */ GIR_EraseRootFromParent_Done,
2733 /* 1834 */ // Label 131: @1834
2734 /* 1834 */ GIM_Reject,
2735 /* 1835 */ // Label 9: @1835
2736 /* 1835 */ GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(1846), // Rule ID 40 //
2737 /* 1840 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
2738 /* 1843 */ // Combiner Rule #34: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_OR'
2739 /* 1843 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
2740 /* 1846 */ // Label 132: @1846
2741 /* 1846 */ GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(1857), // Rule ID 45 //
2742 /* 1851 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule38Enabled),
2743 /* 1854 */ // Combiner Rule #38: redundant_or; wip_match_opcode 'G_OR'
2744 /* 1854 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17),
2745 /* 1857 */ // Label 133: @1857
2746 /* 1857 */ GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(1868), // Rule ID 85 //
2747 /* 1862 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2748 /* 1865 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_OR'
2749 /* 1865 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2750 /* 1868 */ // Label 134: @1868
2751 /* 1868 */ GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(1879), // Rule ID 158 //
2752 /* 1873 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule96Enabled),
2753 /* 1876 */ // Combiner Rule #96: undef_to_negative_one; wip_match_opcode 'G_OR'
2754 /* 1876 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner57),
2755 /* 1879 */ // Label 135: @1879
2756 /* 1879 */ GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(1890), // Rule ID 189 //
2757 /* 1884 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
2758 /* 1887 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_OR'
2759 /* 1887 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
2760 /* 1890 */ // Label 136: @1890
2761 /* 1890 */ GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(1901), // Rule ID 227 //
2762 /* 1895 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule124Enabled),
2763 /* 1898 */ // Combiner Rule #124: funnel_shift_from_or_shift_constants_are_legal; wip_match_opcode 'G_OR'
2764 /* 1898 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner82),
2765 /* 1901 */ // Label 137: @1901
2766 /* 1901 */ GIM_Try, /*On fail goto*//*Label 138*/ GIMT_Encode4(1925), // Rule ID 121 //
2767 /* 1906 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled),
2768 /* 1909 */ // MIs[0] dst
2769 /* 1909 */ // No operand predicates
2770 /* 1909 */ // MIs[0] src
2771 /* 1909 */ // No operand predicates
2772 /* 1909 */ // MIs[0] src
2773 /* 1909 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
2774 /* 1914 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2775 /* 1919 */ // Combiner Rule #71: binop_same_val @ [__binop_same_val_match_0[1]]
2776 /* 1919 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2777 /* 1924 */ GIR_EraseRootFromParent_Done,
2778 /* 1925 */ // Label 138: @1925
2779 /* 1925 */ GIM_Try, /*On fail goto*//*Label 139*/ GIMT_Encode4(1948), // Rule ID 112 //
2780 /* 1930 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
2781 /* 1933 */ // MIs[0] dst
2782 /* 1933 */ // No operand predicates
2783 /* 1933 */ // MIs[0] lhs
2784 /* 1933 */ // No operand predicates
2785 /* 1933 */ // MIs[0] Operand 2
2786 /* 1933 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2787 /* 1937 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2788 /* 1942 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[2]]
2789 /* 1942 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2790 /* 1947 */ GIR_EraseRootFromParent_Done,
2791 /* 1948 */ // Label 139: @1948
2792 /* 1948 */ GIM_Try, /*On fail goto*//*Label 140*/ GIMT_Encode4(1959), // Rule ID 183 //
2793 /* 1953 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule107Enabled),
2794 /* 1956 */ // MIs[0] dst
2795 /* 1956 */ // No operand predicates
2796 /* 1956 */ // MIs[0] src1
2797 /* 1956 */ // No operand predicates
2798 /* 1956 */ // MIs[0] src2
2799 /* 1956 */ // No operand predicates
2800 /* 1956 */ // Combiner Rule #107: or_to_bsp
2801 /* 1956 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner67),
2802 /* 1959 */ // Label 140: @1959
2803 /* 1959 */ GIM_Reject,
2804 /* 1960 */ // Label 10: @1960
2805 /* 1960 */ GIM_Try, /*On fail goto*//*Label 141*/ GIMT_Encode4(1971), // Rule ID 41 //
2806 /* 1965 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
2807 /* 1968 */ // Combiner Rule #34: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_XOR'
2808 /* 1968 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
2809 /* 1971 */ // Label 141: @1971
2810 /* 1971 */ GIM_Try, /*On fail goto*//*Label 142*/ GIMT_Encode4(1982), // Rule ID 43 //
2811 /* 1976 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled),
2812 /* 1979 */ // Combiner Rule #36: xor_of_and_with_same_reg; wip_match_opcode 'G_XOR'
2813 /* 1979 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner15),
2814 /* 1982 */ // Label 142: @1982
2815 /* 1982 */ GIM_Try, /*On fail goto*//*Label 143*/ GIMT_Encode4(1993), // Rule ID 88 //
2816 /* 1987 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
2817 /* 1990 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_XOR'
2818 /* 1990 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
2819 /* 1993 */ // Label 143: @1993
2820 /* 1993 */ GIM_Try, /*On fail goto*//*Label 144*/ GIMT_Encode4(2004), // Rule ID 175 //
2821 /* 1998 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule101Enabled),
2822 /* 2001 */ // Combiner Rule #101: propagate_undef_any_op; wip_match_opcode 'G_XOR'
2823 /* 2001 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner61),
2824 /* 2004 */ // Label 144: @2004
2825 /* 2004 */ GIM_Try, /*On fail goto*//*Label 145*/ GIMT_Encode4(2015), // Rule ID 190 //
2826 /* 2009 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
2827 /* 2012 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_XOR'
2828 /* 2012 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
2829 /* 2015 */ // Label 145: @2015
2830 /* 2015 */ GIM_Try, /*On fail goto*//*Label 146*/ GIMT_Encode4(2054), // Rule ID 123 //
2831 /* 2020 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule72Enabled),
2832 /* 2023 */ // MIs[0] dst
2833 /* 2023 */ // No operand predicates
2834 /* 2023 */ // MIs[0] x
2835 /* 2023 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
2836 /* 2027 */ // MIs[0] x
2837 /* 2027 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
2838 /* 2032 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
2839 /* 2035 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
2840 /* 2045 */ // Combiner Rule #72: same_val_zero @ [__same_val_zero_match_0[1]]
2841 /* 2045 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
2842 /* 2048 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2843 /* 2050 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
2844 /* 2053 */ GIR_EraseRootFromParent_Done,
2845 /* 2054 */ // Label 146: @2054
2846 /* 2054 */ GIM_Try, /*On fail goto*//*Label 147*/ GIMT_Encode4(2077), // Rule ID 113 //
2847 /* 2059 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
2848 /* 2062 */ // MIs[0] dst
2849 /* 2062 */ // No operand predicates
2850 /* 2062 */ // MIs[0] lhs
2851 /* 2062 */ // No operand predicates
2852 /* 2062 */ // MIs[0] Operand 2
2853 /* 2062 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2854 /* 2066 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2855 /* 2071 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[3]]
2856 /* 2071 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2857 /* 2076 */ GIR_EraseRootFromParent_Done,
2858 /* 2077 */ // Label 147: @2077
2859 /* 2077 */ GIM_Reject,
2860 /* 2078 */ // Label 11: @2078
2861 /* 2078 */ GIM_Try, /*On fail goto*//*Label 148*/ GIMT_Encode4(2089), // Rule ID 69 //
2862 /* 2083 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled),
2863 /* 2086 */ // Combiner Rule #57: unmerge_anyext_build_vector; wip_match_opcode 'G_UNMERGE_VALUES'
2864 /* 2086 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32),
2865 /* 2089 */ // Label 148: @2089
2866 /* 2089 */ GIM_Try, /*On fail goto*//*Label 149*/ GIMT_Encode4(2100), // Rule ID 70 //
2867 /* 2094 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule58Enabled),
2868 /* 2097 */ // Combiner Rule #58: unmerge_merge; wip_match_opcode 'G_UNMERGE_VALUES'
2869 /* 2097 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner33),
2870 /* 2100 */ // Label 149: @2100
2871 /* 2100 */ GIM_Try, /*On fail goto*//*Label 150*/ GIMT_Encode4(2111), // Rule ID 72 //
2872 /* 2105 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled),
2873 /* 2108 */ // Combiner Rule #60: unmerge_cst; wip_match_opcode 'G_UNMERGE_VALUES'
2874 /* 2108 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner35),
2875 /* 2111 */ // Label 150: @2111
2876 /* 2111 */ GIM_Try, /*On fail goto*//*Label 151*/ GIMT_Encode4(2122), // Rule ID 73 //
2877 /* 2116 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled),
2878 /* 2119 */ // Combiner Rule #61: unmerge_undef; wip_match_opcode 'G_UNMERGE_VALUES'
2879 /* 2119 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner36),
2880 /* 2122 */ // Label 151: @2122
2881 /* 2122 */ GIM_Try, /*On fail goto*//*Label 152*/ GIMT_Encode4(2133), // Rule ID 74 //
2882 /* 2127 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
2883 /* 2130 */ // Combiner Rule #62: unmerge_dead_to_trunc; wip_match_opcode 'G_UNMERGE_VALUES'
2884 /* 2130 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner37),
2885 /* 2133 */ // Label 152: @2133
2886 /* 2133 */ GIM_Try, /*On fail goto*//*Label 153*/ GIMT_Encode4(2144), // Rule ID 75 //
2887 /* 2138 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule63Enabled),
2888 /* 2141 */ // Combiner Rule #63: unmerge_zext_to_zext; wip_match_opcode 'G_UNMERGE_VALUES'
2889 /* 2141 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner38),
2890 /* 2144 */ // Label 153: @2144
2891 /* 2144 */ GIM_Reject,
2892 /* 2145 */ // Label 12: @2145
2893 /* 2145 */ GIM_Try, /*On fail goto*//*Label 154*/ GIMT_Encode4(2156), // Rule ID 68 //
2894 /* 2150 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled),
2895 /* 2153 */ // Combiner Rule #56: fold_merge_to_zext; wip_match_opcode 'G_MERGE_VALUES'
2896 /* 2153 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner31),
2897 /* 2156 */ // Label 154: @2156
2898 /* 2156 */ GIM_Try, /*On fail goto*//*Label 155*/ GIMT_Encode4(2170), // Rule ID 71 //
2899 /* 2161 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
2900 /* 2164 */ GIM_CheckNumOperandsGE, /*MI*/0, /*Expected*/2,
2901 /* 2167 */ // MIs[0] dst
2902 /* 2167 */ // No operand predicates
2903 /* 2167 */ // MIs[0] merge_srcs
2904 /* 2167 */ // No operand predicates
2905 /* 2167 */ // Combiner Rule #59: merge_unmerge
2906 /* 2167 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner34),
2907 /* 2170 */ // Label 155: @2170
2908 /* 2170 */ GIM_Try, /*On fail goto*//*Label 156*/ GIMT_Encode4(2232),
2909 /* 2175 */ GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
2910 /* 2178 */ GIM_Try, /*On fail goto*//*Label 157*/ GIMT_Encode4(2199), // Rule ID 76 //
2911 /* 2183 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
2912 /* 2186 */ // MIs[0] root
2913 /* 2186 */ // No operand predicates
2914 /* 2186 */ // MIs[0] x
2915 /* 2186 */ // No operand predicates
2916 /* 2186 */ // MIs[0] undef
2917 /* 2186 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2918 /* 2190 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2919 /* 2194 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2920 /* 2196 */ // Combiner Rule #64: merge_of_x_and_undef
2921 /* 2196 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner39),
2922 /* 2199 */ // Label 157: @2199
2923 /* 2199 */ GIM_Try, /*On fail goto*//*Label 158*/ GIMT_Encode4(2231), // Rule ID 77 //
2924 /* 2204 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
2925 /* 2207 */ // MIs[0] root
2926 /* 2207 */ // No operand predicates
2927 /* 2207 */ // MIs[0] x
2928 /* 2207 */ // No operand predicates
2929 /* 2207 */ // MIs[0] zero
2930 /* 2207 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2931 /* 2211 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2932 /* 2215 */ // MIs[1] Operand 1
2933 /* 2215 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
2934 /* 2226 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2935 /* 2228 */ // Combiner Rule #65: merge_of_x_and_zero
2936 /* 2228 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner40),
2937 /* 2231 */ // Label 158: @2231
2938 /* 2231 */ GIM_Reject,
2939 /* 2232 */ // Label 156: @2232
2940 /* 2232 */ GIM_Reject,
2941 /* 2233 */ // Label 13: @2233
2942 /* 2233 */ GIM_Try, /*On fail goto*//*Label 159*/ GIMT_Encode4(2244), // Rule ID 142 //
2943 /* 2238 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule82Enabled),
2944 /* 2241 */ // Combiner Rule #82: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR'
2945 /* 2241 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner48),
2946 /* 2244 */ // Label 159: @2244
2947 /* 2244 */ GIM_Try, /*On fail goto*//*Label 160*/ GIMT_Encode4(2255), // Rule ID 177 //
2948 /* 2249 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule102Enabled),
2949 /* 2252 */ // Combiner Rule #102: propagate_undef_all_ops; wip_match_opcode 'G_BUILD_VECTOR'
2950 /* 2252 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62),
2951 /* 2255 */ // Label 160: @2255
2952 /* 2255 */ GIM_Try, /*On fail goto*//*Label 161*/ GIMT_Encode4(2266), // Rule ID 216 //
2953 /* 2260 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule113Enabled),
2954 /* 2263 */ // Combiner Rule #113: extract_all_elts_from_build_vector; wip_match_opcode 'G_BUILD_VECTOR'
2955 /* 2263 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner73),
2956 /* 2266 */ // Label 161: @2266
2957 /* 2266 */ GIM_Try, /*On fail goto*//*Label 162*/ GIMT_Encode4(2308),
2958 /* 2271 */ GIM_CheckNumOperandsGE, /*MI*/0, /*Expected*/2,
2959 /* 2274 */ GIM_Try, /*On fail goto*//*Label 163*/ GIMT_Encode4(2285), // Rule ID 78 //
2960 /* 2279 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule66Enabled),
2961 /* 2282 */ // MIs[0] dst
2962 /* 2282 */ // No operand predicates
2963 /* 2282 */ // MIs[0] unused
2964 /* 2282 */ // No operand predicates
2965 /* 2282 */ // Combiner Rule #66: combine_build_unmerge
2966 /* 2282 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner41),
2967 /* 2285 */ // Label 163: @2285
2968 /* 2285 */ GIM_Try, /*On fail goto*//*Label 164*/ GIMT_Encode4(2296), // Rule ID 185 //
2969 /* 2290 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule109Enabled),
2970 /* 2293 */ // MIs[0] dst
2971 /* 2293 */ // No operand predicates
2972 /* 2293 */ // MIs[0] unused
2973 /* 2293 */ // No operand predicates
2974 /* 2293 */ // Combiner Rule #109: combine_build_vector_of_bitcast
2975 /* 2293 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner69),
2976 /* 2296 */ // Label 164: @2296
2977 /* 2296 */ GIM_Try, /*On fail goto*//*Label 165*/ GIMT_Encode4(2307), // Rule ID 219 //
2978 /* 2301 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule116Enabled),
2979 /* 2304 */ // MIs[0] dst
2980 /* 2304 */ // No operand predicates
2981 /* 2304 */ // MIs[0] unused
2982 /* 2304 */ // No operand predicates
2983 /* 2304 */ // Combiner Rule #116: combine_use_vector_truncate
2984 /* 2304 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner76),
2985 /* 2307 */ // Label 165: @2307
2986 /* 2307 */ GIM_Reject,
2987 /* 2308 */ // Label 162: @2308
2988 /* 2308 */ GIM_Reject,
2989 /* 2309 */ // Label 14: @2309
2990 /* 2309 */ GIM_Try, /*On fail goto*//*Label 166*/ GIMT_Encode4(2320), // Rule ID 141 //
2991 /* 2314 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule82Enabled),
2992 /* 2317 */ // Combiner Rule #82: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC'
2993 /* 2317 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner48),
2994 /* 2320 */ // Label 166: @2320
2995 /* 2320 */ GIM_Reject,
2996 /* 2321 */ // Label 15: @2321
2997 /* 2321 */ GIM_Try, /*On fail goto*//*Label 167*/ GIMT_Encode4(2332), // Rule ID 184 //
2998 /* 2326 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule108Enabled),
2999 /* 2329 */ // Combiner Rule #108: combine_concat_vector; wip_match_opcode 'G_CONCAT_VECTORS'
3000 /* 2329 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner68),
3001 /* 2332 */ // Label 167: @2332
3002 /* 2332 */ GIM_Reject,
3003 /* 2333 */ // Label 16: @2333
3004 /* 2333 */ GIM_Try, /*On fail goto*//*Label 168*/ GIMT_Encode4(2354), // Rule ID 134 //
3005 /* 2338 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule76Enabled),
3006 /* 2341 */ // MIs[0] dst
3007 /* 2341 */ // No operand predicates
3008 /* 2341 */ // MIs[0] t
3009 /* 2341 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3010 /* 2345 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
3011 /* 2349 */ // MIs[1] ptr
3012 /* 2349 */ // No operand predicates
3013 /* 2349 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3014 /* 2351 */ // Combiner Rule #76: i2p_to_p2i
3015 /* 2351 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner46),
3016 /* 2354 */ // Label 168: @2354
3017 /* 2354 */ GIM_Try, /*On fail goto*//*Label 169*/ GIMT_Encode4(2375), // Rule ID 169 //
3018 /* 2359 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
3019 /* 2362 */ // MIs[0] dst
3020 /* 2362 */ // No operand predicates
3021 /* 2362 */ // MIs[0] __unary_undef_to_undef_match_0.x
3022 /* 2362 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3023 /* 2366 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3024 /* 2370 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3025 /* 2372 */ // Combiner Rule #100: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[3]]
3026 /* 2372 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
3027 /* 2375 */ // Label 169: @2375
3028 /* 2375 */ GIM_Reject,
3029 /* 2376 */ // Label 17: @2376
3030 /* 2376 */ GIM_Try, /*On fail goto*//*Label 170*/ GIMT_Encode4(2387), // Rule ID 133 //
3031 /* 2381 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule75Enabled),
3032 /* 2384 */ // Combiner Rule #75: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR'
3033 /* 2384 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner45),
3034 /* 2387 */ // Label 170: @2387
3035 /* 2387 */ GIM_Try, /*On fail goto*//*Label 171*/ GIMT_Encode4(2408), // Rule ID 170 //
3036 /* 2392 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
3037 /* 2395 */ // MIs[0] dst
3038 /* 2395 */ // No operand predicates
3039 /* 2395 */ // MIs[0] __unary_undef_to_undef_match_0.x
3040 /* 2395 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3041 /* 2399 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3042 /* 2403 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3043 /* 2405 */ // Combiner Rule #100: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[4]]
3044 /* 2405 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
3045 /* 2408 */ // Label 171: @2408
3046 /* 2408 */ GIM_Reject,
3047 /* 2409 */ // Label 18: @2409
3048 /* 2409 */ GIM_Try, /*On fail goto*//*Label 172*/ GIMT_Encode4(2441), // Rule ID 146 //
3049 /* 2414 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule86Enabled),
3050 /* 2417 */ // MIs[0] dst
3051 /* 2417 */ // No operand predicates
3052 /* 2417 */ // MIs[0] src1
3053 /* 2417 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3054 /* 2421 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
3055 /* 2425 */ // MIs[1] src0
3056 /* 2425 */ // No operand predicates
3057 /* 2425 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
3058 /* 2429 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3059 /* 2431 */ // Combiner Rule #86: bitcast_bitcast_to_bitcast
3060 /* 2431 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_BITCAST),
3061 /* 2434 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
3062 /* 2436 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src0
3063 /* 2440 */ GIR_EraseRootFromParent_Done,
3064 /* 2441 */ // Label 172: @2441
3065 /* 2441 */ GIM_Try, /*On fail goto*//*Label 173*/ GIMT_Encode4(2462), // Rule ID 145 //
3066 /* 2446 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule85Enabled),
3067 /* 2449 */ // MIs[0] dst
3068 /* 2449 */ // No operand predicates
3069 /* 2449 */ // MIs[0] src1
3070 /* 2449 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3071 /* 2453 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
3072 /* 2457 */ // MIs[1] src0
3073 /* 2457 */ // No operand predicates
3074 /* 2457 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3075 /* 2459 */ // Combiner Rule #85: bitcast_bitcast_fold
3076 /* 2459 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner51),
3077 /* 2462 */ // Label 173: @2462
3078 /* 2462 */ GIM_Try, /*On fail goto*//*Label 174*/ GIMT_Encode4(2483), // Rule ID 167 //
3079 /* 2467 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
3080 /* 2470 */ // MIs[0] dst
3081 /* 2470 */ // No operand predicates
3082 /* 2470 */ // MIs[0] __unary_undef_to_undef_match_0.x
3083 /* 2470 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3084 /* 2474 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3085 /* 2478 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3086 /* 2480 */ // Combiner Rule #100: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[1]]
3087 /* 2480 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
3088 /* 2483 */ // Label 174: @2483
3089 /* 2483 */ GIM_Reject,
3090 /* 2484 */ // Label 19: @2484
3091 /* 2484 */ GIM_Try, /*On fail goto*//*Label 175*/ GIMT_Encode4(2495), // Rule ID 217 //
3092 /* 2489 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule114Enabled),
3093 /* 2492 */ // MIs[0] dst
3094 /* 2492 */ // No operand predicates
3095 /* 2492 */ // MIs[0] src
3096 /* 2492 */ // No operand predicates
3097 /* 2492 */ // Combiner Rule #114: push_freeze_to_prevent_poison_from_propagating
3098 /* 2492 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner74),
3099 /* 2495 */ // Label 175: @2495
3100 /* 2495 */ GIM_Reject,
3101 /* 2496 */ // Label 20: @2496
3102 /* 2496 */ GIM_Try, /*On fail goto*//*Label 176*/ GIMT_Encode4(2517), // Rule ID 20 //
3103 /* 2501 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
3104 /* 2504 */ // MIs[0] dst
3105 /* 2504 */ // No operand predicates
3106 /* 2504 */ // MIs[0] src0
3107 /* 2504 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3108 /* 2508 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
3109 /* 2512 */ // MIs[1] cst
3110 /* 2512 */ // No operand predicates
3111 /* 2512 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3112 /* 2514 */ // Combiner Rule #20: constant_fold_intrinsic_trunc
3113 /* 2514 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
3114 /* 2517 */ // Label 176: @2517
3115 /* 2517 */ GIM_Reject,
3116 /* 2518 */ // Label 21: @2518
3117 /* 2518 */ GIM_Try, /*On fail goto*//*Label 177*/ GIMT_Encode4(2539), // Rule ID 21 //
3118 /* 2523 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
3119 /* 2526 */ // MIs[0] dst
3120 /* 2526 */ // No operand predicates
3121 /* 2526 */ // MIs[0] src0
3122 /* 2526 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3123 /* 2530 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
3124 /* 2534 */ // MIs[1] cst
3125 /* 2534 */ // No operand predicates
3126 /* 2534 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3127 /* 2536 */ // Combiner Rule #21: constant_fold_intrinsic_round
3128 /* 2536 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
3129 /* 2539 */ // Label 177: @2539
3130 /* 2539 */ GIM_Reject,
3131 /* 2540 */ // Label 22: @2540
3132 /* 2540 */ GIM_Try, /*On fail goto*//*Label 178*/ GIMT_Encode4(2561), // Rule ID 22 //
3133 /* 2545 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
3134 /* 2548 */ // MIs[0] dst
3135 /* 2548 */ // No operand predicates
3136 /* 2548 */ // MIs[0] src0
3137 /* 2548 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3138 /* 2552 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
3139 /* 2556 */ // MIs[1] cst
3140 /* 2556 */ // No operand predicates
3141 /* 2556 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3142 /* 2558 */ // Combiner Rule #22: constant_fold_intrinsic_roundeven
3143 /* 2558 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
3144 /* 2561 */ // Label 178: @2561
3145 /* 2561 */ GIM_Reject,
3146 /* 2562 */ // Label 23: @2562
3147 /* 2562 */ GIM_Try, /*On fail goto*//*Label 179*/ GIMT_Encode4(2573), // Rule ID 30 //
3148 /* 2567 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
3149 /* 2570 */ // Combiner Rule #30: extending_loads; wip_match_opcode 'G_LOAD'
3150 /* 2570 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
3151 /* 2573 */ // Label 179: @2573
3152 /* 2573 */ GIM_Try, /*On fail goto*//*Label 180*/ GIMT_Encode4(2584), // Rule ID 34 //
3153 /* 2578 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
3154 /* 2581 */ // Combiner Rule #32: combine_indexed_load_store; wip_match_opcode 'G_LOAD'
3155 /* 2581 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
3156 /* 2584 */ // Label 180: @2584
3157 /* 2584 */ GIM_Reject,
3158 /* 2585 */ // Label 24: @2585
3159 /* 2585 */ GIM_Try, /*On fail goto*//*Label 181*/ GIMT_Encode4(2596), // Rule ID 31 //
3160 /* 2590 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
3161 /* 2593 */ // Combiner Rule #30: extending_loads; wip_match_opcode 'G_SEXTLOAD'
3162 /* 2593 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
3163 /* 2596 */ // Label 181: @2596
3164 /* 2596 */ GIM_Try, /*On fail goto*//*Label 182*/ GIMT_Encode4(2607), // Rule ID 35 //
3165 /* 2601 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
3166 /* 2604 */ // Combiner Rule #32: combine_indexed_load_store; wip_match_opcode 'G_SEXTLOAD'
3167 /* 2604 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
3168 /* 2607 */ // Label 182: @2607
3169 /* 2607 */ GIM_Reject,
3170 /* 2608 */ // Label 25: @2608
3171 /* 2608 */ GIM_Try, /*On fail goto*//*Label 183*/ GIMT_Encode4(2619), // Rule ID 32 //
3172 /* 2613 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
3173 /* 2616 */ // Combiner Rule #30: extending_loads; wip_match_opcode 'G_ZEXTLOAD'
3174 /* 2616 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
3175 /* 2619 */ // Label 183: @2619
3176 /* 2619 */ GIM_Try, /*On fail goto*//*Label 184*/ GIMT_Encode4(2630), // Rule ID 36 //
3177 /* 2624 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
3178 /* 2627 */ // Combiner Rule #32: combine_indexed_load_store; wip_match_opcode 'G_ZEXTLOAD'
3179 /* 2627 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
3180 /* 2630 */ // Label 184: @2630
3181 /* 2630 */ GIM_Reject,
3182 /* 2631 */ // Label 26: @2631
3183 /* 2631 */ GIM_Try, /*On fail goto*//*Label 185*/ GIMT_Encode4(2642), // Rule ID 37 //
3184 /* 2636 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
3185 /* 2639 */ // Combiner Rule #32: combine_indexed_load_store; wip_match_opcode 'G_STORE'
3186 /* 2639 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
3187 /* 2642 */ // Label 185: @2642
3188 /* 2642 */ GIM_Try, /*On fail goto*//*Label 186*/ GIMT_Encode4(2653), // Rule ID 179 //
3189 /* 2647 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule104Enabled),
3190 /* 2650 */ // Combiner Rule #104: erase_undef_store; wip_match_opcode 'G_STORE'
3191 /* 2650 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner64),
3192 /* 2653 */ // Label 186: @2653
3193 /* 2653 */ GIM_Try, /*On fail goto*//*Label 187*/ GIMT_Encode4(2664), // Rule ID 153 //
3194 /* 2658 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule93Enabled),
3195 /* 2661 */ // MIs[0] src
3196 /* 2661 */ // No operand predicates
3197 /* 2661 */ // MIs[0] addr
3198 /* 2661 */ // No operand predicates
3199 /* 2661 */ // Combiner Rule #93: split_store_zero_128
3200 /* 2661 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner54),
3201 /* 2664 */ // Label 187: @2664
3202 /* 2664 */ GIM_Reject,
3203 /* 2665 */ // Label 27: @2665
3204 /* 2665 */ GIM_Try, /*On fail goto*//*Label 188*/ GIMT_Encode4(2676), // Rule ID 29 //
3205 /* 2670 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
3206 /* 2673 */ // Combiner Rule #29: mutate_anyext_to_zext; wip_match_opcode 'G_ANYEXT'
3207 /* 2673 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
3208 /* 2676 */ // Label 188: @2676
3209 /* 2676 */ GIM_Try, /*On fail goto*//*Label 189*/ GIMT_Encode4(2687), // Rule ID 135 //
3210 /* 2681 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule77Enabled),
3211 /* 2684 */ // Combiner Rule #77: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT'
3212 /* 2684 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner47),
3213 /* 2687 */ // Label 189: @2687
3214 /* 2687 */ GIM_Try, /*On fail goto*//*Label 190*/ GIMT_Encode4(2708), // Rule ID 8 //
3215 /* 2692 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
3216 /* 2695 */ // MIs[0] root
3217 /* 2695 */ // No operand predicates
3218 /* 2695 */ // MIs[0] second
3219 /* 2695 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3220 /* 2699 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ANYEXT),
3221 /* 2703 */ // MIs[1] src
3222 /* 2703 */ // No operand predicates
3223 /* 2703 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3224 /* 2705 */ // Combiner Rule #8: anyext_of_anyext
3225 /* 2705 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3226 /* 2708 */ // Label 190: @2708
3227 /* 2708 */ GIM_Try, /*On fail goto*//*Label 191*/ GIMT_Encode4(2729), // Rule ID 10 //
3228 /* 2713 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
3229 /* 2716 */ // MIs[0] root
3230 /* 2716 */ // No operand predicates
3231 /* 2716 */ // MIs[0] second
3232 /* 2716 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3233 /* 2720 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SEXT),
3234 /* 2724 */ // MIs[1] src
3235 /* 2724 */ // No operand predicates
3236 /* 2724 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3237 /* 2726 */ // Combiner Rule #10: anyext_of_sext
3238 /* 2726 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3239 /* 2729 */ // Label 191: @2729
3240 /* 2729 */ GIM_Try, /*On fail goto*//*Label 192*/ GIMT_Encode4(2750), // Rule ID 9 //
3241 /* 2734 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
3242 /* 2737 */ // MIs[0] root
3243 /* 2737 */ // No operand predicates
3244 /* 2737 */ // MIs[0] second
3245 /* 2737 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3246 /* 2741 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ZEXT),
3247 /* 2745 */ // MIs[1] src
3248 /* 2745 */ // No operand predicates
3249 /* 2745 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3250 /* 2747 */ // Combiner Rule #9: anyext_of_zext
3251 /* 2747 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3252 /* 2750 */ // Label 192: @2750
3253 /* 2750 */ GIM_Try, /*On fail goto*//*Label 193*/ GIMT_Encode4(2771), // Rule ID 168 //
3254 /* 2755 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
3255 /* 2758 */ // MIs[0] dst
3256 /* 2758 */ // No operand predicates
3257 /* 2758 */ // MIs[0] __unary_undef_to_undef_match_0.x
3258 /* 2758 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3259 /* 2762 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3260 /* 2766 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3261 /* 2768 */ // Combiner Rule #100: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[2]]
3262 /* 2768 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
3263 /* 2771 */ // Label 193: @2771
3264 /* 2771 */ GIM_Reject,
3265 /* 2772 */ // Label 28: @2772
3266 /* 2772 */ GIM_Try, /*On fail goto*//*Label 194*/ GIMT_Encode4(2783), // Rule ID 143 //
3267 /* 2777 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule83Enabled),
3268 /* 2780 */ // Combiner Rule #83: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC'
3269 /* 2780 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner49),
3270 /* 2783 */ // Label 194: @2783
3271 /* 2783 */ GIM_Try, /*On fail goto*//*Label 195*/ GIMT_Encode4(2794), // Rule ID 144 //
3272 /* 2788 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule84Enabled),
3273 /* 2791 */ // Combiner Rule #84: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC'
3274 /* 2791 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner50),
3275 /* 2794 */ // Label 195: @2794
3276 /* 2794 */ GIM_Try, /*On fail goto*//*Label 196*/ GIMT_Encode4(2826), // Rule ID 224 //
3277 /* 2799 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled),
3278 /* 2802 */ // MIs[0] dst
3279 /* 2802 */ // No operand predicates
3280 /* 2802 */ // MIs[0] min
3281 /* 2802 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3282 /* 2806 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_UMIN),
3283 /* 2810 */ // MIs[1] x
3284 /* 2810 */ // No operand predicates
3285 /* 2810 */ // MIs[1] y
3286 /* 2810 */ // No operand predicates
3287 /* 2810 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6),
3288 /* 2814 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3289 /* 2816 */ // Combiner Rule #121: trunc_usatu
3290 /* 2816 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_TRUNC_USAT_U),
3291 /* 2819 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
3292 /* 2821 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // x
3293 /* 2825 */ GIR_EraseRootFromParent_Done,
3294 /* 2826 */ // Label 196: @2826
3295 /* 2826 */ GIM_Try, /*On fail goto*//*Label 197*/ GIMT_Encode4(2847), // Rule ID 3 //
3296 /* 2831 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
3297 /* 2834 */ // MIs[0] root
3298 /* 2834 */ // No operand predicates
3299 /* 2834 */ // MIs[0] ext
3300 /* 2834 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3301 /* 2838 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ANYEXT),
3302 /* 2842 */ // MIs[1] src
3303 /* 2842 */ // No operand predicates
3304 /* 2842 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3305 /* 2844 */ // Combiner Rule #3: truncate_of_anyext
3306 /* 2844 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
3307 /* 2847 */ // Label 197: @2847
3308 /* 2847 */ GIM_Try, /*On fail goto*//*Label 198*/ GIMT_Encode4(2871), // Rule ID 27 //
3309 /* 2852 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
3310 /* 2855 */ // MIs[0] root
3311 /* 2855 */ // No operand predicates
3312 /* 2855 */ // MIs[0] bv
3313 /* 2855 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3314 /* 2859 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
3315 /* 2863 */ GIM_CheckNumOperandsGE, /*MI*/1, /*Expected*/2,
3316 /* 2866 */ // MIs[1] unused
3317 /* 2866 */ // No operand predicates
3318 /* 2866 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3319 /* 2868 */ // Combiner Rule #27: buildvector_of_truncate
3320 /* 2868 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
3321 /* 2871 */ // Label 198: @2871
3322 /* 2871 */ GIM_Try, /*On fail goto*//*Label 199*/ GIMT_Encode4(2892), // Rule ID 2 //
3323 /* 2876 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
3324 /* 2879 */ // MIs[0] root
3325 /* 2879 */ // No operand predicates
3326 /* 2879 */ // MIs[0] ext
3327 /* 2879 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3328 /* 2883 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SEXT),
3329 /* 2887 */ // MIs[1] src
3330 /* 2887 */ // No operand predicates
3331 /* 2887 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3332 /* 2889 */ // Combiner Rule #2: truncate_of_sext
3333 /* 2889 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
3334 /* 2892 */ // Label 199: @2892
3335 /* 2892 */ GIM_Try, /*On fail goto*//*Label 200*/ GIMT_Encode4(2913), // Rule ID 1 //
3336 /* 2897 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
3337 /* 2900 */ // MIs[0] root
3338 /* 2900 */ // No operand predicates
3339 /* 2900 */ // MIs[0] ext
3340 /* 2900 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3341 /* 2904 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ZEXT),
3342 /* 2908 */ // MIs[1] src
3343 /* 2908 */ // No operand predicates
3344 /* 2908 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3345 /* 2910 */ // Combiner Rule #1: truncate_of_zext
3346 /* 2910 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
3347 /* 2913 */ // Label 200: @2913
3348 /* 2913 */ GIM_Try, /*On fail goto*//*Label 201*/ GIMT_Encode4(2934), // Rule ID 166 //
3349 /* 2918 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
3350 /* 2921 */ // MIs[0] dst
3351 /* 2921 */ // No operand predicates
3352 /* 2921 */ // MIs[0] __unary_undef_to_undef_match_0.x
3353 /* 2921 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3354 /* 2925 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3355 /* 2929 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3356 /* 2931 */ // Combiner Rule #100: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[0]]
3357 /* 2931 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
3358 /* 2934 */ // Label 201: @2934
3359 /* 2934 */ GIM_Try, /*On fail goto*//*Label 202*/ GIMT_Encode4(2955), // Rule ID 28 //
3360 /* 2939 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
3361 /* 2942 */ // MIs[0] root
3362 /* 2942 */ // No operand predicates
3363 /* 2942 */ // MIs[0] int
3364 /* 2942 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3365 /* 2946 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
3366 /* 2950 */ // MIs[1] imm
3367 /* 2950 */ // No operand predicates
3368 /* 2950 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3369 /* 2952 */ // Combiner Rule #28: integer_of_truncate
3370 /* 2952 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
3371 /* 2955 */ // Label 202: @2955
3372 /* 2955 */ GIM_Try, /*On fail goto*//*Label 203*/ GIMT_Encode4(2966), // Rule ID 222 //
3373 /* 2960 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule119Enabled),
3374 /* 2963 */ // MIs[0] dst
3375 /* 2963 */ // No operand predicates
3376 /* 2963 */ // MIs[0] src
3377 /* 2963 */ // No operand predicates
3378 /* 2963 */ // Combiner Rule #119: trunc_ssats
3379 /* 2963 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79),
3380 /* 2966 */ // Label 203: @2966
3381 /* 2966 */ GIM_Try, /*On fail goto*//*Label 204*/ GIMT_Encode4(2977), // Rule ID 223 //
3382 /* 2971 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule120Enabled),
3383 /* 2974 */ // MIs[0] dst
3384 /* 2974 */ // No operand predicates
3385 /* 2974 */ // MIs[0] src
3386 /* 2974 */ // No operand predicates
3387 /* 2974 */ // Combiner Rule #120: trunc_ssatu
3388 /* 2974 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner80),
3389 /* 2977 */ // Label 204: @2977
3390 /* 2977 */ GIM_Reject,
3391 /* 2978 */ // Label 29: @2978
3392 /* 2978 */ GIM_Try, /*On fail goto*//*Label 205*/ GIMT_Encode4(3010), // Rule ID 225 //
3393 /* 2983 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule122Enabled),
3394 /* 2986 */ // MIs[0] dst
3395 /* 2986 */ // No operand predicates
3396 /* 2986 */ // MIs[0] src
3397 /* 2986 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3398 /* 2990 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPTOUI),
3399 /* 2994 */ // MIs[1] x
3400 /* 2994 */ // No operand predicates
3401 /* 2994 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner7),
3402 /* 2998 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3403 /* 3000 */ // Combiner Rule #122: truncusatu_to_fptouisat
3404 /* 3000 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FPTOUI_SAT),
3405 /* 3003 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
3406 /* 3005 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // x
3407 /* 3009 */ GIR_EraseRootFromParent_Done,
3408 /* 3010 */ // Label 205: @3010
3409 /* 3010 */ GIM_Reject,
3410 /* 3011 */ // Label 30: @3011
3411 /* 3011 */ GIM_Try, /*On fail goto*//*Label 206*/ GIMT_Encode4(3032), // Rule ID 7 //
3412 /* 3016 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
3413 /* 3019 */ // MIs[0] root
3414 /* 3019 */ // No operand predicates
3415 /* 3019 */ // MIs[0] second
3416 /* 3019 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3417 /* 3023 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ANYEXT),
3418 /* 3027 */ // MIs[1] src
3419 /* 3027 */ // No operand predicates
3420 /* 3027 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3421 /* 3029 */ // Combiner Rule #7: sext_of_anyext
3422 /* 3029 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3423 /* 3032 */ // Label 206: @3032
3424 /* 3032 */ GIM_Try, /*On fail goto*//*Label 207*/ GIMT_Encode4(3053), // Rule ID 6 //
3425 /* 3037 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
3426 /* 3040 */ // MIs[0] root
3427 /* 3040 */ // No operand predicates
3428 /* 3040 */ // MIs[0] second
3429 /* 3040 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3430 /* 3044 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SEXT),
3431 /* 3048 */ // MIs[1] src
3432 /* 3048 */ // No operand predicates
3433 /* 3048 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3434 /* 3050 */ // Combiner Rule #6: sext_of_sext
3435 /* 3050 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3436 /* 3053 */ // Label 207: @3053
3437 /* 3053 */ GIM_Reject,
3438 /* 3054 */ // Label 31: @3054
3439 /* 3054 */ GIM_Try, /*On fail goto*//*Label 208*/ GIMT_Encode4(3065), // Rule ID 38 //
3440 /* 3059 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled),
3441 /* 3062 */ // Combiner Rule #33: sext_trunc_sextload; wip_match_opcode 'G_SEXT_INREG'
3442 /* 3062 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
3443 /* 3065 */ // Label 208: @3065
3444 /* 3065 */ GIM_Try, /*On fail goto*//*Label 209*/ GIMT_Encode4(3076), // Rule ID 47 //
3445 /* 3070 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule40Enabled),
3446 /* 3073 */ // Combiner Rule #40: redundant_sext_inreg; wip_match_opcode 'G_SEXT_INREG'
3447 /* 3073 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner19),
3448 /* 3076 */ // Label 209: @3076
3449 /* 3076 */ GIM_Try, /*On fail goto*//*Label 210*/ GIMT_Encode4(3087), // Rule ID 48 //
3450 /* 3081 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule41Enabled),
3451 /* 3084 */ // Combiner Rule #41: bitfield_extract_from_sext_inreg; wip_match_opcode 'G_SEXT_INREG'
3452 /* 3084 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner20),
3453 /* 3087 */ // Label 210: @3087
3454 /* 3087 */ GIM_Try, /*On fail goto*//*Label 211*/ GIMT_Encode4(3108), // Rule ID 11 //
3455 /* 3092 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
3456 /* 3095 */ // MIs[0] dst
3457 /* 3095 */ // No operand predicates
3458 /* 3095 */ // MIs[0] x
3459 /* 3095 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3460 /* 3099 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SEXT_INREG),
3461 /* 3103 */ // MIs[1] src
3462 /* 3103 */ // No operand predicates
3463 /* 3103 */ // MIs[1] a
3464 /* 3103 */ // No operand predicates
3465 /* 3103 */ // MIs[0] b
3466 /* 3103 */ // No operand predicates
3467 /* 3103 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3468 /* 3105 */ // Combiner Rule #11: sext_inreg_of_sext_inreg
3469 /* 3105 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
3470 /* 3108 */ // Label 211: @3108
3471 /* 3108 */ GIM_Reject,
3472 /* 3109 */ // Label 32: @3109
3473 /* 3109 */ GIM_Try, /*On fail goto*//*Label 212*/ GIMT_Encode4(3130), // Rule ID 5 //
3474 /* 3114 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
3475 /* 3117 */ // MIs[0] root
3476 /* 3117 */ // No operand predicates
3477 /* 3117 */ // MIs[0] second
3478 /* 3117 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3479 /* 3121 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ANYEXT),
3480 /* 3125 */ // MIs[1] src
3481 /* 3125 */ // No operand predicates
3482 /* 3125 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3483 /* 3127 */ // Combiner Rule #5: zext_of_anyext
3484 /* 3127 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3485 /* 3130 */ // Label 212: @3130
3486 /* 3130 */ GIM_Try, /*On fail goto*//*Label 213*/ GIMT_Encode4(3151), // Rule ID 4 //
3487 /* 3135 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
3488 /* 3138 */ // MIs[0] root
3489 /* 3138 */ // No operand predicates
3490 /* 3138 */ // MIs[0] second
3491 /* 3138 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3492 /* 3142 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ZEXT),
3493 /* 3146 */ // MIs[1] src
3494 /* 3146 */ // No operand predicates
3495 /* 3146 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3496 /* 3148 */ // Combiner Rule #4: zext_of_zext
3497 /* 3148 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3498 /* 3151 */ // Label 213: @3151
3499 /* 3151 */ GIM_Reject,
3500 /* 3152 */ // Label 33: @3152
3501 /* 3152 */ GIM_Try, /*On fail goto*//*Label 214*/ GIMT_Encode4(3163), // Rule ID 86 //
3502 /* 3157 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
3503 /* 3160 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_SHL'
3504 /* 3160 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
3505 /* 3163 */ // Label 214: @3163
3506 /* 3163 */ GIM_Try, /*On fail goto*//*Label 215*/ GIMT_Encode4(3174), // Rule ID 159 //
3507 /* 3168 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule97Enabled),
3508 /* 3171 */ // Combiner Rule #97: binop_left_undef_to_zero; wip_match_opcode 'G_SHL'
3509 /* 3171 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner58),
3510 /* 3174 */ // Label 215: @3174
3511 /* 3174 */ GIM_Try, /*On fail goto*//*Label 216*/ GIMT_Encode4(3185), // Rule ID 162 //
3512 /* 3179 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule98Enabled),
3513 /* 3182 */ // Combiner Rule #98: binop_right_undef_to_undef; wip_match_opcode 'G_SHL'
3514 /* 3182 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner59),
3515 /* 3185 */ // Label 216: @3185
3516 /* 3185 */ GIM_Try, /*On fail goto*//*Label 217*/ GIMT_Encode4(3225), // Rule ID 124 //
3517 /* 3190 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
3518 /* 3193 */ // MIs[0] dst
3519 /* 3193 */ // No operand predicates
3520 /* 3193 */ // MIs[0] zero
3521 /* 3193 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3522 /* 3197 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
3523 /* 3201 */ // MIs[1] Operand 1
3524 /* 3201 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
3525 /* 3212 */ // MIs[0] rhs
3526 /* 3212 */ // No operand predicates
3527 /* 3212 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3528 /* 3217 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3529 /* 3219 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[0]]
3530 /* 3219 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3531 /* 3224 */ GIR_EraseRootFromParent_Done,
3532 /* 3225 */ // Label 217: @3225
3533 /* 3225 */ GIM_Try, /*On fail goto*//*Label 218*/ GIMT_Encode4(3248), // Rule ID 114 //
3534 /* 3230 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3535 /* 3233 */ // MIs[0] dst
3536 /* 3233 */ // No operand predicates
3537 /* 3233 */ // MIs[0] lhs
3538 /* 3233 */ // No operand predicates
3539 /* 3233 */ // MIs[0] Operand 2
3540 /* 3233 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3541 /* 3237 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3542 /* 3242 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[4]]
3543 /* 3242 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3544 /* 3247 */ GIR_EraseRootFromParent_Done,
3545 /* 3248 */ // Label 218: @3248
3546 /* 3248 */ GIM_Reject,
3547 /* 3249 */ // Label 34: @3249
3548 /* 3249 */ GIM_Try, /*On fail goto*//*Label 219*/ GIMT_Encode4(3260), // Rule ID 51 //
3549 /* 3254 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled),
3550 /* 3257 */ // Combiner Rule #43: bitfield_extract_from_shr; wip_match_opcode 'G_LSHR'
3551 /* 3257 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner22),
3552 /* 3260 */ // Label 219: @3260
3553 /* 3260 */ GIM_Try, /*On fail goto*//*Label 220*/ GIMT_Encode4(3271), // Rule ID 53 //
3554 /* 3265 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled),
3555 /* 3268 */ // Combiner Rule #44: bitfield_extract_from_shr_and; wip_match_opcode 'G_LSHR'
3556 /* 3268 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23),
3557 /* 3271 */ // Label 220: @3271
3558 /* 3271 */ GIM_Try, /*On fail goto*//*Label 221*/ GIMT_Encode4(3282), // Rule ID 83 //
3559 /* 3276 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
3560 /* 3279 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_LSHR'
3561 /* 3279 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
3562 /* 3282 */ // Label 221: @3282
3563 /* 3282 */ GIM_Try, /*On fail goto*//*Label 222*/ GIMT_Encode4(3293), // Rule ID 164 //
3564 /* 3287 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule98Enabled),
3565 /* 3290 */ // Combiner Rule #98: binop_right_undef_to_undef; wip_match_opcode 'G_LSHR'
3566 /* 3290 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner59),
3567 /* 3293 */ // Label 222: @3293
3568 /* 3293 */ GIM_Try, /*On fail goto*//*Label 223*/ GIMT_Encode4(3322), // Rule ID 226 //
3569 /* 3298 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule123Enabled),
3570 /* 3301 */ // MIs[0] dst
3571 /* 3301 */ // No operand predicates
3572 /* 3301 */ // MIs[0] d2
3573 /* 3301 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3574 /* 3305 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_TRUNC),
3575 /* 3309 */ // MIs[1] d1
3576 /* 3309 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2]
3577 /* 3313 */ GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_LSHR),
3578 /* 3317 */ // MIs[2] x
3579 /* 3317 */ // No operand predicates
3580 /* 3317 */ // MIs[2] y
3581 /* 3317 */ // No operand predicates
3582 /* 3317 */ // MIs[0] z
3583 /* 3317 */ // No operand predicates
3584 /* 3317 */ GIM_CheckIsSafeToFold, /*NumInsns*/2,
3585 /* 3319 */ // Combiner Rule #123: lshr_of_trunc_of_lshr
3586 /* 3319 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner81),
3587 /* 3322 */ // Label 223: @3322
3588 /* 3322 */ GIM_Try, /*On fail goto*//*Label 224*/ GIMT_Encode4(3362), // Rule ID 125 //
3589 /* 3327 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
3590 /* 3330 */ // MIs[0] dst
3591 /* 3330 */ // No operand predicates
3592 /* 3330 */ // MIs[0] zero
3593 /* 3330 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3594 /* 3334 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
3595 /* 3338 */ // MIs[1] Operand 1
3596 /* 3338 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
3597 /* 3349 */ // MIs[0] rhs
3598 /* 3349 */ // No operand predicates
3599 /* 3349 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3600 /* 3354 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3601 /* 3356 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[1]]
3602 /* 3356 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3603 /* 3361 */ GIR_EraseRootFromParent_Done,
3604 /* 3362 */ // Label 224: @3362
3605 /* 3362 */ GIM_Try, /*On fail goto*//*Label 225*/ GIMT_Encode4(3385), // Rule ID 116 //
3606 /* 3367 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3607 /* 3370 */ // MIs[0] dst
3608 /* 3370 */ // No operand predicates
3609 /* 3370 */ // MIs[0] lhs
3610 /* 3370 */ // No operand predicates
3611 /* 3370 */ // MIs[0] Operand 2
3612 /* 3370 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3613 /* 3374 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3614 /* 3379 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[6]]
3615 /* 3379 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3616 /* 3384 */ GIR_EraseRootFromParent_Done,
3617 /* 3385 */ // Label 225: @3385
3618 /* 3385 */ GIM_Reject,
3619 /* 3386 */ // Label 35: @3386
3620 /* 3386 */ GIM_Try, /*On fail goto*//*Label 226*/ GIMT_Encode4(3397), // Rule ID 50 //
3621 /* 3391 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled),
3622 /* 3394 */ // Combiner Rule #43: bitfield_extract_from_shr; wip_match_opcode 'G_ASHR'
3623 /* 3394 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner22),
3624 /* 3397 */ // Label 226: @3397
3625 /* 3397 */ GIM_Try, /*On fail goto*//*Label 227*/ GIMT_Encode4(3408), // Rule ID 52 //
3626 /* 3402 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled),
3627 /* 3405 */ // Combiner Rule #44: bitfield_extract_from_shr_and; wip_match_opcode 'G_ASHR'
3628 /* 3405 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23),
3629 /* 3408 */ // Label 227: @3408
3630 /* 3408 */ GIM_Try, /*On fail goto*//*Label 228*/ GIMT_Encode4(3419), // Rule ID 82 //
3631 /* 3413 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
3632 /* 3416 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_ASHR'
3633 /* 3416 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
3634 /* 3419 */ // Label 228: @3419
3635 /* 3419 */ GIM_Try, /*On fail goto*//*Label 229*/ GIMT_Encode4(3430), // Rule ID 163 //
3636 /* 3424 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule98Enabled),
3637 /* 3427 */ // Combiner Rule #98: binop_right_undef_to_undef; wip_match_opcode 'G_ASHR'
3638 /* 3427 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner59),
3639 /* 3430 */ // Label 229: @3430
3640 /* 3430 */ GIM_Try, /*On fail goto*//*Label 230*/ GIMT_Encode4(3470), // Rule ID 126 //
3641 /* 3435 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
3642 /* 3438 */ // MIs[0] dst
3643 /* 3438 */ // No operand predicates
3644 /* 3438 */ // MIs[0] zero
3645 /* 3438 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3646 /* 3442 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
3647 /* 3446 */ // MIs[1] Operand 1
3648 /* 3446 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
3649 /* 3457 */ // MIs[0] rhs
3650 /* 3457 */ // No operand predicates
3651 /* 3457 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3652 /* 3462 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3653 /* 3464 */ // Combiner Rule #73: binop_left_to_zero @ [__binop_left_to_zero_match_0[2]]
3654 /* 3464 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3655 /* 3469 */ GIR_EraseRootFromParent_Done,
3656 /* 3470 */ // Label 230: @3470
3657 /* 3470 */ GIM_Try, /*On fail goto*//*Label 231*/ GIMT_Encode4(3493), // Rule ID 115 //
3658 /* 3475 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3659 /* 3478 */ // MIs[0] dst
3660 /* 3478 */ // No operand predicates
3661 /* 3478 */ // MIs[0] lhs
3662 /* 3478 */ // No operand predicates
3663 /* 3478 */ // MIs[0] Operand 2
3664 /* 3478 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3665 /* 3482 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3666 /* 3487 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[5]]
3667 /* 3487 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3668 /* 3492 */ GIR_EraseRootFromParent_Done,
3669 /* 3493 */ // Label 231: @3493
3670 /* 3493 */ GIM_Reject,
3671 /* 3494 */ // Label 36: @3494
3672 /* 3494 */ GIM_Try, /*On fail goto*//*Label 232*/ GIMT_Encode4(3505), // Rule ID 54 //
3673 /* 3499 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule45Enabled),
3674 /* 3502 */ // Combiner Rule #45: rotate_out_of_range; wip_match_opcode 'G_ROTR'
3675 /* 3502 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24),
3676 /* 3505 */ // Label 232: @3505
3677 /* 3505 */ GIM_Try, /*On fail goto*//*Label 233*/ GIMT_Encode4(3528), // Rule ID 119 //
3678 /* 3510 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3679 /* 3513 */ // MIs[0] dst
3680 /* 3513 */ // No operand predicates
3681 /* 3513 */ // MIs[0] lhs
3682 /* 3513 */ // No operand predicates
3683 /* 3513 */ // MIs[0] Operand 2
3684 /* 3513 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3685 /* 3517 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3686 /* 3522 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[9]]
3687 /* 3522 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3688 /* 3527 */ GIR_EraseRootFromParent_Done,
3689 /* 3528 */ // Label 233: @3528
3690 /* 3528 */ GIM_Reject,
3691 /* 3529 */ // Label 37: @3529
3692 /* 3529 */ GIM_Try, /*On fail goto*//*Label 234*/ GIMT_Encode4(3540), // Rule ID 55 //
3693 /* 3534 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule45Enabled),
3694 /* 3537 */ // Combiner Rule #45: rotate_out_of_range; wip_match_opcode 'G_ROTL'
3695 /* 3537 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24),
3696 /* 3540 */ // Label 234: @3540
3697 /* 3540 */ GIM_Try, /*On fail goto*//*Label 235*/ GIMT_Encode4(3563), // Rule ID 118 //
3698 /* 3545 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3699 /* 3548 */ // MIs[0] dst
3700 /* 3548 */ // No operand predicates
3701 /* 3548 */ // MIs[0] lhs
3702 /* 3548 */ // No operand predicates
3703 /* 3548 */ // MIs[0] Operand 2
3704 /* 3548 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3705 /* 3552 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3706 /* 3557 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[8]]
3707 /* 3557 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3708 /* 3562 */ GIR_EraseRootFromParent_Done,
3709 /* 3563 */ // Label 235: @3563
3710 /* 3563 */ GIM_Reject,
3711 /* 3564 */ // Label 38: @3564
3712 /* 3564 */ GIM_Try, /*On fail goto*//*Label 236*/ GIMT_Encode4(3575), // Rule ID 56 //
3713 /* 3569 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule46Enabled),
3714 /* 3572 */ // Combiner Rule #46: icmp_to_true_false_known_bits; wip_match_opcode 'G_ICMP'
3715 /* 3572 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25),
3716 /* 3575 */ // Label 236: @3575
3717 /* 3575 */ GIM_Reject,
3718 /* 3576 */ // Label 39: @3576
3719 /* 3576 */ GIM_Try, /*On fail goto*//*Label 237*/ GIMT_Encode4(3587), // Rule ID 62 //
3720 /* 3581 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule50Enabled),
3721 /* 3584 */ // Combiner Rule #50: select_constant_cmp; wip_match_opcode 'G_SELECT'
3722 /* 3584 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner28),
3723 /* 3587 */ // Label 237: @3587
3724 /* 3587 */ GIM_Try, /*On fail goto*//*Label 238*/ GIMT_Encode4(3598), // Rule ID 64 //
3725 /* 3592 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule52Enabled),
3726 /* 3595 */ // Combiner Rule #52: match_selects; wip_match_opcode 'G_SELECT'
3727 /* 3595 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner30),
3728 /* 3598 */ // Label 238: @3598
3729 /* 3598 */ GIM_Try, /*On fail goto*//*Label 239*/ GIMT_Encode4(3609), // Rule ID 109 //
3730 /* 3603 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
3731 /* 3606 */ // Combiner Rule #69: select_same_val; wip_match_opcode 'G_SELECT'
3732 /* 3606 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner44),
3733 /* 3609 */ // Label 239: @3609
3734 /* 3609 */ GIM_Try, /*On fail goto*//*Label 240*/ GIMT_Encode4(3620), // Rule ID 182 //
3735 /* 3614 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule106Enabled),
3736 /* 3617 */ // Combiner Rule #106: select_to_minmax; wip_match_opcode 'G_SELECT'
3737 /* 3617 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner66),
3738 /* 3620 */ // Label 240: @3620
3739 /* 3620 */ GIM_Try, /*On fail goto*//*Label 241*/ GIMT_Encode4(3700), // Rule ID 65 //
3740 /* 3625 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled),
3741 /* 3628 */ // MIs[0] dst
3742 /* 3628 */ GIM_RecordRegType, /*MI*/0, /*Op*/0, /*TempTypeIdx*/255,
3743 /* 3632 */ // MIs[0] c
3744 /* 3632 */ // No operand predicates
3745 /* 3632 */ // MIs[0] Operand 2
3746 /* 3632 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3747 /* 3636 */ // MIs[0] x
3748 /* 3636 */ // No operand predicates
3749 /* 3636 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
3750 /* 3640 */ GIR_MakeTempReg, /*TempRegID*/2, /*TypeID*/255,
3751 /* 3643 */ GIR_MakeTempReg, /*TempRegID*/1, /*TypeID*/255,
3752 /* 3646 */ GIR_BuildConstant, /*TempRegID*/1, /*Val*/GIMT_Encode8(18446744073709551615u),
3753 /* 3656 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
3754 /* 3659 */ // Combiner Rule #53: select_zero_true
3755 /* 3659 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_XOR),
3756 /* 3662 */ GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(static_cast<uint16_t>(RegState::Define)),
3757 /* 3667 */ GIR_RootToRootCopy, /*OpIdx*/1, // c
3758 /* 3669 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/1,
3759 /* 3672 */ GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FREEZE),
3760 /* 3676 */ GIR_AddTempRegister, /*InsnID*/1, /*TempRegID*/2, /*TempRegFlags*/GIMT_Encode2(static_cast<uint16_t>(RegState::Define)),
3761 /* 3681 */ GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/3, // x
3762 /* 3685 */ GIR_BuildMI, /*InsnID*/2, /*Opcode*/GIMT_Encode2(TargetOpcode::G_AND),
3763 /* 3689 */ GIR_Copy, /*NewInsnID*/2, /*OldInsnID*/0, /*OpIdx*/0, // dst
3764 /* 3693 */ GIR_AddSimpleTempRegister, /*InsnID*/2, /*TempRegID*/0,
3765 /* 3696 */ GIR_AddSimpleTempRegister, /*InsnID*/2, /*TempRegID*/2,
3766 /* 3699 */ GIR_EraseRootFromParent_Done,
3767 /* 3700 */ // Label 241: @3700
3768 /* 3700 */ GIM_Try, /*On fail goto*//*Label 242*/ GIMT_Encode4(3749), // Rule ID 66 //
3769 /* 3705 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule54Enabled),
3770 /* 3708 */ // MIs[0] dst
3771 /* 3708 */ GIM_RecordRegType, /*MI*/0, /*Op*/0, /*TempTypeIdx*/255,
3772 /* 3712 */ // MIs[0] c
3773 /* 3712 */ // No operand predicates
3774 /* 3712 */ // MIs[0] x
3775 /* 3712 */ // No operand predicates
3776 /* 3712 */ // MIs[0] Operand 3
3777 /* 3712 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/3, 0,
3778 /* 3716 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
3779 /* 3720 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
3780 /* 3723 */ // Combiner Rule #54: select_zero_false
3781 /* 3723 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FREEZE),
3782 /* 3726 */ GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(static_cast<uint16_t>(RegState::Define)),
3783 /* 3731 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
3784 /* 3733 */ GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_AND),
3785 /* 3737 */ GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // dst
3786 /* 3741 */ GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/1, // c
3787 /* 3745 */ GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0,
3788 /* 3748 */ GIR_EraseRootFromParent_Done,
3789 /* 3749 */ // Label 242: @3749
3790 /* 3749 */ GIM_Try, /*On fail goto*//*Label 243*/ GIMT_Encode4(3770), // Rule ID 63 //
3791 /* 3754 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule51Enabled),
3792 /* 3757 */ // MIs[0] root
3793 /* 3757 */ // No operand predicates
3794 /* 3757 */ // MIs[0] tst
3795 /* 3757 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3796 /* 3761 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ICMP),
3797 /* 3765 */ // MIs[1] tst1
3798 /* 3765 */ // No operand predicates
3799 /* 3765 */ // MIs[1] a
3800 /* 3765 */ // No operand predicates
3801 /* 3765 */ // MIs[1] b
3802 /* 3765 */ // No operand predicates
3803 /* 3765 */ // MIs[0] x
3804 /* 3765 */ // No operand predicates
3805 /* 3765 */ // MIs[0] y
3806 /* 3765 */ // No operand predicates
3807 /* 3765 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3808 /* 3767 */ // Combiner Rule #51: select_to_iminmax
3809 /* 3767 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner29),
3810 /* 3770 */ // Label 243: @3770
3811 /* 3770 */ GIM_Try, /*On fail goto*//*Label 244*/ GIMT_Encode4(3806), // Rule ID 67 //
3812 /* 3775 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule55Enabled),
3813 /* 3778 */ // MIs[0] dst
3814 /* 3778 */ // No operand predicates
3815 /* 3778 */ // MIs[0] c
3816 /* 3778 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3817 /* 3782 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_XOR),
3818 /* 3786 */ // MIs[1] src
3819 /* 3786 */ // No operand predicates
3820 /* 3786 */ // MIs[1] Operand 2
3821 /* 3786 */ GIM_CheckConstantInt8, /*MI*/1, /*Op*/2, 255,
3822 /* 3790 */ // MIs[0] x
3823 /* 3790 */ // No operand predicates
3824 /* 3790 */ // MIs[0] y
3825 /* 3790 */ // No operand predicates
3826 /* 3790 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3827 /* 3792 */ // Combiner Rule #55: select_not
3828 /* 3792 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SELECT),
3829 /* 3795 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
3830 /* 3797 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src
3831 /* 3801 */ GIR_RootToRootCopy, /*OpIdx*/3, // y
3832 /* 3803 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
3833 /* 3805 */ GIR_EraseRootFromParent_Done,
3834 /* 3806 */ // Label 244: @3806
3835 /* 3806 */ GIM_Try, /*On fail goto*//*Label 245*/ GIMT_Encode4(3835), // Rule ID 61 //
3836 /* 3811 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule49Enabled),
3837 /* 3814 */ // MIs[0] dst
3838 /* 3814 */ // No operand predicates
3839 /* 3814 */ // MIs[0] undef
3840 /* 3814 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3841 /* 3818 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3842 /* 3822 */ // MIs[0] x
3843 /* 3822 */ // No operand predicates
3844 /* 3822 */ // MIs[0] y
3845 /* 3822 */ // No operand predicates
3846 /* 3822 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3,
3847 /* 3827 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3848 /* 3829 */ // Combiner Rule #49: select_undef_cmp
3849 /* 3829 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3,
3850 /* 3834 */ GIR_EraseRootFromParent_Done,
3851 /* 3835 */ // Label 245: @3835
3852 /* 3835 */ GIM_Reject,
3853 /* 3836 */ // Label 40: @3836
3854 /* 3836 */ GIM_Try, /*On fail goto*//*Label 246*/ GIMT_Encode4(3847), // Rule ID 58 //
3855 /* 3841 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule47Enabled),
3856 /* 3844 */ // Combiner Rule #47: match_addos; wip_match_opcode 'G_UADDO'
3857 /* 3844 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner26),
3858 /* 3847 */ // Label 246: @3847
3859 /* 3847 */ GIM_Try, /*On fail goto*//*Label 247*/ GIMT_Encode4(3858), // Rule ID 195 //
3860 /* 3852 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3861 /* 3855 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDO'
3862 /* 3855 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3863 /* 3858 */ // Label 247: @3858
3864 /* 3858 */ GIM_Reject,
3865 /* 3859 */ // Label 41: @3859
3866 /* 3859 */ GIM_Try, /*On fail goto*//*Label 248*/ GIMT_Encode4(3870), // Rule ID 60 //
3867 /* 3864 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule48Enabled),
3868 /* 3867 */ // Combiner Rule #48: match_subo_no_overflow; wip_match_opcode 'G_USUBO'
3869 /* 3867 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner27),
3870 /* 3870 */ // Label 248: @3870
3871 /* 3870 */ GIM_Reject,
3872 /* 3871 */ // Label 42: @3871
3873 /* 3871 */ GIM_Try, /*On fail goto*//*Label 249*/ GIMT_Encode4(3882), // Rule ID 57 //
3874 /* 3876 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule47Enabled),
3875 /* 3879 */ // Combiner Rule #47: match_addos; wip_match_opcode 'G_SADDO'
3876 /* 3879 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner26),
3877 /* 3882 */ // Label 249: @3882
3878 /* 3882 */ GIM_Try, /*On fail goto*//*Label 250*/ GIMT_Encode4(3893), // Rule ID 196 //
3879 /* 3887 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3880 /* 3890 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDO'
3881 /* 3890 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3882 /* 3893 */ // Label 250: @3893
3883 /* 3893 */ GIM_Reject,
3884 /* 3894 */ // Label 43: @3894
3885 /* 3894 */ GIM_Try, /*On fail goto*//*Label 251*/ GIMT_Encode4(3905), // Rule ID 59 //
3886 /* 3899 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule48Enabled),
3887 /* 3902 */ // Combiner Rule #48: match_subo_no_overflow; wip_match_opcode 'G_SSUBO'
3888 /* 3902 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner27),
3889 /* 3905 */ // Label 251: @3905
3890 /* 3905 */ GIM_Reject,
3891 /* 3906 */ // Label 44: @3906
3892 /* 3906 */ GIM_Try, /*On fail goto*//*Label 252*/ GIMT_Encode4(3917), // Rule ID 197 //
3893 /* 3911 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3894 /* 3914 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULO'
3895 /* 3914 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3896 /* 3917 */ // Label 252: @3917
3897 /* 3917 */ GIM_Reject,
3898 /* 3918 */ // Label 45: @3918
3899 /* 3918 */ GIM_Try, /*On fail goto*//*Label 253*/ GIMT_Encode4(3929), // Rule ID 198 //
3900 /* 3923 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3901 /* 3926 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULO'
3902 /* 3926 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3903 /* 3929 */ // Label 253: @3929
3904 /* 3929 */ GIM_Reject,
3905 /* 3930 */ // Label 46: @3930
3906 /* 3930 */ GIM_Try, /*On fail goto*//*Label 254*/ GIMT_Encode4(3941), // Rule ID 199 //
3907 /* 3935 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3908 /* 3938 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULH'
3909 /* 3938 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3910 /* 3941 */ // Label 254: @3941
3911 /* 3941 */ GIM_Reject,
3912 /* 3942 */ // Label 47: @3942
3913 /* 3942 */ GIM_Try, /*On fail goto*//*Label 255*/ GIMT_Encode4(3953), // Rule ID 200 //
3914 /* 3947 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3915 /* 3950 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULH'
3916 /* 3950 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3917 /* 3953 */ // Label 255: @3953
3918 /* 3953 */ GIM_Reject,
3919 /* 3954 */ // Label 48: @3954
3920 /* 3954 */ GIM_Try, /*On fail goto*//*Label 256*/ GIMT_Encode4(3965), // Rule ID 201 //
3921 /* 3959 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3922 /* 3962 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDSAT'
3923 /* 3962 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3924 /* 3965 */ // Label 256: @3965
3925 /* 3965 */ GIM_Reject,
3926 /* 3966 */ // Label 49: @3966
3927 /* 3966 */ GIM_Try, /*On fail goto*//*Label 257*/ GIMT_Encode4(3977), // Rule ID 202 //
3928 /* 3971 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3929 /* 3974 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDSAT'
3930 /* 3974 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3931 /* 3977 */ // Label 257: @3977
3932 /* 3977 */ GIM_Reject,
3933 /* 3978 */ // Label 50: @3978
3934 /* 3978 */ GIM_Try, /*On fail goto*//*Label 258*/ GIMT_Encode4(3989), // Rule ID 203 //
3935 /* 3983 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3936 /* 3986 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIX'
3937 /* 3986 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3938 /* 3989 */ // Label 258: @3989
3939 /* 3989 */ GIM_Reject,
3940 /* 3990 */ // Label 51: @3990
3941 /* 3990 */ GIM_Try, /*On fail goto*//*Label 259*/ GIMT_Encode4(4001), // Rule ID 204 //
3942 /* 3995 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3943 /* 3998 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIX'
3944 /* 3998 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3945 /* 4001 */ // Label 259: @4001
3946 /* 4001 */ GIM_Reject,
3947 /* 4002 */ // Label 52: @4002
3948 /* 4002 */ GIM_Try, /*On fail goto*//*Label 260*/ GIMT_Encode4(4013), // Rule ID 205 //
3949 /* 4007 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3950 /* 4010 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIXSAT'
3951 /* 4010 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3952 /* 4013 */ // Label 260: @4013
3953 /* 4013 */ GIM_Reject,
3954 /* 4014 */ // Label 53: @4014
3955 /* 4014 */ GIM_Try, /*On fail goto*//*Label 261*/ GIMT_Encode4(4025), // Rule ID 206 //
3956 /* 4019 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
3957 /* 4022 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIXSAT'
3958 /* 4022 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
3959 /* 4025 */ // Label 261: @4025
3960 /* 4025 */ GIM_Reject,
3961 /* 4026 */ // Label 54: @4026
3962 /* 4026 */ GIM_Try, /*On fail goto*//*Label 262*/ GIMT_Encode4(4037), // Rule ID 207 //
3963 /* 4031 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
3964 /* 4034 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FADD'
3965 /* 4034 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
3966 /* 4037 */ // Label 262: @4037
3967 /* 4037 */ GIM_Try, /*On fail goto*//*Label 263*/ GIMT_Encode4(4060), // Rule ID 148 //
3968 /* 4042 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule88Enabled),
3969 /* 4045 */ // MIs[0] dst
3970 /* 4045 */ // No operand predicates
3971 /* 4045 */ // MIs[0] x
3972 /* 4045 */ // No operand predicates
3973 /* 4045 */ // MIs[0] y
3974 /* 4045 */ // No operand predicates
3975 /* 4045 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3),
3976 /* 4049 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3977 /* 4054 */ // Combiner Rule #88: right_identity_neg_zero_fp
3978 /* 4054 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3979 /* 4059 */ GIR_EraseRootFromParent_Done,
3980 /* 4060 */ // Label 263: @4060
3981 /* 4060 */ GIM_Try, /*On fail goto*//*Label 264*/ GIMT_Encode4(4089), // Rule ID 149 //
3982 /* 4065 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled),
3983 /* 4068 */ GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::FmNsz),
3984 /* 4074 */ // MIs[0] dst
3985 /* 4074 */ // No operand predicates
3986 /* 4074 */ // MIs[0] x
3987 /* 4074 */ // No operand predicates
3988 /* 4074 */ // MIs[0] y
3989 /* 4074 */ // No operand predicates
3990 /* 4074 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner4),
3991 /* 4078 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3992 /* 4083 */ // Combiner Rule #89: right_identity_neg_zero_fp_nsz
3993 /* 4083 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3994 /* 4088 */ GIR_EraseRootFromParent_Done,
3995 /* 4089 */ // Label 264: @4089
3996 /* 4089 */ GIM_Try, /*On fail goto*//*Label 265*/ GIMT_Encode4(4100), // Rule ID 97 //
3997 /* 4094 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
3998 /* 4097 */ // MIs[0] d
3999 /* 4097 */ // No operand predicates
4000 /* 4097 */ // MIs[0] mi.src0
4001 /* 4097 */ // No operand predicates
4002 /* 4097 */ // MIs[0] mi.src1
4003 /* 4097 */ // No operand predicates
4004 /* 4097 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[0]]
4005 /* 4097 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4006 /* 4100 */ // Label 265: @4100
4007 /* 4100 */ GIM_Reject,
4008 /* 4101 */ // Label 55: @4101
4009 /* 4101 */ GIM_Try, /*On fail goto*//*Label 266*/ GIMT_Encode4(4112), // Rule ID 98 //
4010 /* 4106 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4011 /* 4109 */ // MIs[0] d
4012 /* 4109 */ // No operand predicates
4013 /* 4109 */ // MIs[0] mi.src0
4014 /* 4109 */ // No operand predicates
4015 /* 4109 */ // MIs[0] mi.src1
4016 /* 4109 */ // No operand predicates
4017 /* 4109 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[1]]
4018 /* 4109 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4019 /* 4112 */ // Label 266: @4112
4020 /* 4112 */ GIM_Reject,
4021 /* 4113 */ // Label 56: @4113
4022 /* 4113 */ GIM_Try, /*On fail goto*//*Label 267*/ GIMT_Encode4(4124), // Rule ID 208 //
4023 /* 4118 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
4024 /* 4121 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMUL'
4025 /* 4121 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4026 /* 4124 */ // Label 267: @4124
4027 /* 4124 */ GIM_Try, /*On fail goto*//*Label 268*/ GIMT_Encode4(4147), // Rule ID 138 //
4028 /* 4129 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule80Enabled),
4029 /* 4132 */ // MIs[0] dst
4030 /* 4132 */ // No operand predicates
4031 /* 4132 */ // MIs[0] x
4032 /* 4132 */ // No operand predicates
4033 /* 4132 */ // MIs[0] y
4034 /* 4132 */ // No operand predicates
4035 /* 4132 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
4036 /* 4136 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4037 /* 4141 */ // Combiner Rule #80: right_identity_one_fp
4038 /* 4141 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4039 /* 4146 */ GIR_EraseRootFromParent_Done,
4040 /* 4147 */ // Label 268: @4147
4041 /* 4147 */ GIM_Try, /*On fail goto*//*Label 269*/ GIMT_Encode4(4167), // Rule ID 150 //
4042 /* 4152 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled),
4043 /* 4155 */ // MIs[0] dst
4044 /* 4155 */ // No operand predicates
4045 /* 4155 */ // MIs[0] x
4046 /* 4155 */ // No operand predicates
4047 /* 4155 */ // MIs[0] y
4048 /* 4155 */ // No operand predicates
4049 /* 4155 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner5),
4050 /* 4159 */ // Combiner Rule #90: right_identity_neg_one_fp
4051 /* 4159 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG),
4052 /* 4162 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
4053 /* 4164 */ GIR_RootToRootCopy, /*OpIdx*/1, // x
4054 /* 4166 */ GIR_EraseRootFromParent_Done,
4055 /* 4167 */ // Label 269: @4167
4056 /* 4167 */ GIM_Try, /*On fail goto*//*Label 270*/ GIMT_Encode4(4178), // Rule ID 99 //
4057 /* 4172 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4058 /* 4175 */ // MIs[0] d
4059 /* 4175 */ // No operand predicates
4060 /* 4175 */ // MIs[0] mi.src0
4061 /* 4175 */ // No operand predicates
4062 /* 4175 */ // MIs[0] mi.src1
4063 /* 4175 */ // No operand predicates
4064 /* 4175 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[2]]
4065 /* 4175 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4066 /* 4178 */ // Label 270: @4178
4067 /* 4178 */ GIM_Reject,
4068 /* 4179 */ // Label 57: @4179
4069 /* 4179 */ GIM_Try, /*On fail goto*//*Label 271*/ GIMT_Encode4(4190), // Rule ID 100 //
4070 /* 4184 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4071 /* 4187 */ // MIs[0] d
4072 /* 4187 */ // No operand predicates
4073 /* 4187 */ // MIs[0] mi.src0
4074 /* 4187 */ // No operand predicates
4075 /* 4187 */ // MIs[0] mi.src1
4076 /* 4187 */ // No operand predicates
4077 /* 4187 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[3]]
4078 /* 4187 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4079 /* 4190 */ // Label 271: @4190
4080 /* 4190 */ GIM_Reject,
4081 /* 4191 */ // Label 58: @4191
4082 /* 4191 */ GIM_Try, /*On fail goto*//*Label 272*/ GIMT_Encode4(4202), // Rule ID 101 //
4083 /* 4196 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4084 /* 4199 */ // MIs[0] d
4085 /* 4199 */ // No operand predicates
4086 /* 4199 */ // MIs[0] mi.src0
4087 /* 4199 */ // No operand predicates
4088 /* 4199 */ // MIs[0] mi.src1
4089 /* 4199 */ // No operand predicates
4090 /* 4199 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[4]]
4091 /* 4199 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4092 /* 4202 */ // Label 272: @4202
4093 /* 4202 */ GIM_Reject,
4094 /* 4203 */ // Label 59: @4203
4095 /* 4203 */ GIM_Try, /*On fail goto*//*Label 273*/ GIMT_Encode4(4224), // Rule ID 15 //
4096 /* 4208 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
4097 /* 4211 */ // MIs[0] dst
4098 /* 4211 */ // No operand predicates
4099 /* 4211 */ // MIs[0] src0
4100 /* 4211 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4101 /* 4215 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4102 /* 4219 */ // MIs[1] cst
4103 /* 4219 */ // No operand predicates
4104 /* 4219 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4105 /* 4221 */ // Combiner Rule #15: constant_fold_flog2
4106 /* 4221 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4107 /* 4224 */ // Label 273: @4224
4108 /* 4224 */ GIM_Reject,
4109 /* 4225 */ // Label 60: @4225
4110 /* 4225 */ GIM_Try, /*On fail goto*//*Label 274*/ GIMT_Encode4(4246), // Rule ID 12 //
4111 /* 4230 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
4112 /* 4233 */ // MIs[0] dst
4113 /* 4233 */ // No operand predicates
4114 /* 4233 */ // MIs[0] src0
4115 /* 4233 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4116 /* 4237 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4117 /* 4241 */ // MIs[1] cst
4118 /* 4241 */ // No operand predicates
4119 /* 4241 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4120 /* 4243 */ // Combiner Rule #12: constant_fold_fneg
4121 /* 4243 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4122 /* 4246 */ // Label 274: @4246
4123 /* 4246 */ GIM_Try, /*On fail goto*//*Label 275*/ GIMT_Encode4(4275), // Rule ID 136 //
4124 /* 4251 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule78Enabled),
4125 /* 4254 */ // MIs[0] dst
4126 /* 4254 */ // No operand predicates
4127 /* 4254 */ // MIs[0] t
4128 /* 4254 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4129 /* 4258 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
4130 /* 4262 */ // MIs[1] src
4131 /* 4262 */ // No operand predicates
4132 /* 4262 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
4133 /* 4267 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4134 /* 4269 */ // Combiner Rule #78: fneg_fneg_fold
4135 /* 4269 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
4136 /* 4274 */ GIR_EraseRootFromParent_Done,
4137 /* 4275 */ // Label 275: @4275
4138 /* 4275 */ GIM_Reject,
4139 /* 4276 */ // Label 61: @4276
4140 /* 4276 */ GIM_Try, /*On fail goto*//*Label 276*/ GIMT_Encode4(4297), // Rule ID 17 //
4141 /* 4281 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
4142 /* 4284 */ // MIs[0] dst
4143 /* 4284 */ // No operand predicates
4144 /* 4284 */ // MIs[0] src0
4145 /* 4284 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4146 /* 4288 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4147 /* 4292 */ // MIs[1] cst
4148 /* 4292 */ // No operand predicates
4149 /* 4292 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4150 /* 4294 */ // Combiner Rule #17: constant_fold_fpext
4151 /* 4294 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4152 /* 4297 */ // Label 276: @4297
4153 /* 4297 */ GIM_Reject,
4154 /* 4298 */ // Label 62: @4298
4155 /* 4298 */ GIM_Try, /*On fail goto*//*Label 277*/ GIMT_Encode4(4319), // Rule ID 16 //
4156 /* 4303 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
4157 /* 4306 */ // MIs[0] dst
4158 /* 4306 */ // No operand predicates
4159 /* 4306 */ // MIs[0] src0
4160 /* 4306 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4161 /* 4310 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4162 /* 4314 */ // MIs[1] cst
4163 /* 4314 */ // No operand predicates
4164 /* 4314 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4165 /* 4316 */ // Combiner Rule #16: constant_fold_fptrunc
4166 /* 4316 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4167 /* 4319 */ // Label 277: @4319
4168 /* 4319 */ GIM_Try, /*On fail goto*//*Label 278*/ GIMT_Encode4(4340), // Rule ID 147 //
4169 /* 4324 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule87Enabled),
4170 /* 4327 */ // MIs[0] dst
4171 /* 4327 */ // No operand predicates
4172 /* 4327 */ // MIs[0] src1
4173 /* 4327 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4174 /* 4331 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT),
4175 /* 4335 */ // MIs[1] src0
4176 /* 4335 */ // No operand predicates
4177 /* 4335 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4178 /* 4337 */ // Combiner Rule #87: fptrunc_fpext_fold
4179 /* 4337 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner51),
4180 /* 4340 */ // Label 278: @4340
4181 /* 4340 */ GIM_Reject,
4182 /* 4341 */ // Label 63: @4341
4183 /* 4341 */ GIM_Try, /*On fail goto*//*Label 279*/ GIMT_Encode4(4362), // Rule ID 171 //
4184 /* 4346 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
4185 /* 4349 */ // MIs[0] dst
4186 /* 4349 */ // No operand predicates
4187 /* 4349 */ // MIs[0] __unary_undef_to_undef_match_0.x
4188 /* 4349 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4189 /* 4353 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
4190 /* 4357 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4191 /* 4359 */ // Combiner Rule #100: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[5]]
4192 /* 4359 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
4193 /* 4362 */ // Label 279: @4362
4194 /* 4362 */ GIM_Reject,
4195 /* 4363 */ // Label 64: @4363
4196 /* 4363 */ GIM_Try, /*On fail goto*//*Label 280*/ GIMT_Encode4(4384), // Rule ID 172 //
4197 /* 4368 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
4198 /* 4371 */ // MIs[0] dst
4199 /* 4371 */ // No operand predicates
4200 /* 4371 */ // MIs[0] __unary_undef_to_undef_match_0.x
4201 /* 4371 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4202 /* 4375 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
4203 /* 4379 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4204 /* 4381 */ // Combiner Rule #100: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[6]]
4205 /* 4381 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
4206 /* 4384 */ // Label 280: @4384
4207 /* 4384 */ GIM_Reject,
4208 /* 4385 */ // Label 65: @4385
4209 /* 4385 */ GIM_Try, /*On fail goto*//*Label 281*/ GIMT_Encode4(4396), // Rule ID 155 //
4210 /* 4390 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule94Enabled),
4211 /* 4393 */ // Combiner Rule #94: undef_to_fp_zero; wip_match_opcode 'G_SITOFP'
4212 /* 4393 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner55),
4213 /* 4396 */ // Label 281: @4396
4214 /* 4396 */ GIM_Try, /*On fail goto*//*Label 282*/ GIMT_Encode4(4411), // Rule ID 25 //
4215 /* 4401 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled),
4216 /* 4404 */ // MIs[0] dst
4217 /* 4404 */ // No operand predicates
4218 /* 4404 */ // MIs[0] Operand 1
4219 /* 4404 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
4220 /* 4408 */ // Combiner Rule #25: itof_const_zero_fold_si
4221 /* 4408 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
4222 /* 4411 */ // Label 282: @4411
4223 /* 4411 */ GIM_Reject,
4224 /* 4412 */ // Label 66: @4412
4225 /* 4412 */ GIM_Try, /*On fail goto*//*Label 283*/ GIMT_Encode4(4423), // Rule ID 154 //
4226 /* 4417 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule94Enabled),
4227 /* 4420 */ // Combiner Rule #94: undef_to_fp_zero; wip_match_opcode 'G_UITOFP'
4228 /* 4420 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner55),
4229 /* 4423 */ // Label 283: @4423
4230 /* 4423 */ GIM_Try, /*On fail goto*//*Label 284*/ GIMT_Encode4(4438), // Rule ID 26 //
4231 /* 4428 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
4232 /* 4431 */ // MIs[0] dst
4233 /* 4431 */ // No operand predicates
4234 /* 4431 */ // MIs[0] Operand 1
4235 /* 4431 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
4236 /* 4435 */ // Combiner Rule #26: itof_const_zero_fold_ui
4237 /* 4435 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
4238 /* 4438 */ // Label 284: @4438
4239 /* 4438 */ GIM_Reject,
4240 /* 4439 */ // Label 67: @4439
4241 /* 4439 */ GIM_Try, /*On fail goto*//*Label 285*/ GIMT_Encode4(4460), // Rule ID 13 //
4242 /* 4444 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
4243 /* 4447 */ // MIs[0] dst
4244 /* 4447 */ // No operand predicates
4245 /* 4447 */ // MIs[0] src0
4246 /* 4447 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4247 /* 4451 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4248 /* 4455 */ // MIs[1] cst
4249 /* 4455 */ // No operand predicates
4250 /* 4455 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4251 /* 4457 */ // Combiner Rule #13: constant_fold_fabs
4252 /* 4457 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4253 /* 4460 */ // Label 285: @4460
4254 /* 4460 */ GIM_Reject,
4255 /* 4461 */ // Label 68: @4461
4256 /* 4461 */ GIM_Try, /*On fail goto*//*Label 286*/ GIMT_Encode4(4472), // Rule ID 102 //
4257 /* 4466 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4258 /* 4469 */ // MIs[0] d
4259 /* 4469 */ // No operand predicates
4260 /* 4469 */ // MIs[0] mi.src0
4261 /* 4469 */ // No operand predicates
4262 /* 4469 */ // MIs[0] mi.src1
4263 /* 4469 */ // No operand predicates
4264 /* 4469 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[5]]
4265 /* 4469 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4266 /* 4472 */ // Label 286: @4472
4267 /* 4472 */ GIM_Reject,
4268 /* 4473 */ // Label 69: @4473
4269 /* 4473 */ GIM_Try, /*On fail goto*//*Label 287*/ GIMT_Encode4(4484), // Rule ID 209 //
4270 /* 4478 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
4271 /* 4481 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM'
4272 /* 4481 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4273 /* 4484 */ // Label 287: @4484
4274 /* 4484 */ GIM_Try, /*On fail goto*//*Label 288*/ GIMT_Encode4(4495), // Rule ID 103 //
4275 /* 4489 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4276 /* 4492 */ // MIs[0] d
4277 /* 4492 */ // No operand predicates
4278 /* 4492 */ // MIs[0] mi.src0
4279 /* 4492 */ // No operand predicates
4280 /* 4492 */ // MIs[0] mi.src1
4281 /* 4492 */ // No operand predicates
4282 /* 4492 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[6]]
4283 /* 4492 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4284 /* 4495 */ // Label 288: @4495
4285 /* 4495 */ GIM_Reject,
4286 /* 4496 */ // Label 70: @4496
4287 /* 4496 */ GIM_Try, /*On fail goto*//*Label 289*/ GIMT_Encode4(4507), // Rule ID 210 //
4288 /* 4501 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
4289 /* 4504 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM'
4290 /* 4504 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4291 /* 4507 */ // Label 289: @4507
4292 /* 4507 */ GIM_Try, /*On fail goto*//*Label 290*/ GIMT_Encode4(4518), // Rule ID 104 //
4293 /* 4512 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4294 /* 4515 */ // MIs[0] d
4295 /* 4515 */ // No operand predicates
4296 /* 4515 */ // MIs[0] mi.src0
4297 /* 4515 */ // No operand predicates
4298 /* 4515 */ // MIs[0] mi.src1
4299 /* 4515 */ // No operand predicates
4300 /* 4515 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[7]]
4301 /* 4515 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4302 /* 4518 */ // Label 290: @4518
4303 /* 4518 */ GIM_Reject,
4304 /* 4519 */ // Label 71: @4519
4305 /* 4519 */ GIM_Try, /*On fail goto*//*Label 291*/ GIMT_Encode4(4530), // Rule ID 211 //
4306 /* 4524 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
4307 /* 4527 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM_IEEE'
4308 /* 4527 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4309 /* 4530 */ // Label 291: @4530
4310 /* 4530 */ GIM_Reject,
4311 /* 4531 */ // Label 72: @4531
4312 /* 4531 */ GIM_Try, /*On fail goto*//*Label 292*/ GIMT_Encode4(4542), // Rule ID 212 //
4313 /* 4536 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
4314 /* 4539 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM_IEEE'
4315 /* 4539 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4316 /* 4542 */ // Label 292: @4542
4317 /* 4542 */ GIM_Reject,
4318 /* 4543 */ // Label 73: @4543
4319 /* 4543 */ GIM_Try, /*On fail goto*//*Label 293*/ GIMT_Encode4(4554), // Rule ID 213 //
4320 /* 4548 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
4321 /* 4551 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINIMUM'
4322 /* 4551 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4323 /* 4554 */ // Label 293: @4554
4324 /* 4554 */ GIM_Try, /*On fail goto*//*Label 294*/ GIMT_Encode4(4565), // Rule ID 105 //
4325 /* 4559 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4326 /* 4562 */ // MIs[0] d
4327 /* 4562 */ // No operand predicates
4328 /* 4562 */ // MIs[0] mi.src0
4329 /* 4562 */ // No operand predicates
4330 /* 4562 */ // MIs[0] mi.src1
4331 /* 4562 */ // No operand predicates
4332 /* 4562 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[8]]
4333 /* 4562 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4334 /* 4565 */ // Label 294: @4565
4335 /* 4565 */ GIM_Reject,
4336 /* 4566 */ // Label 74: @4566
4337 /* 4566 */ GIM_Try, /*On fail goto*//*Label 295*/ GIMT_Encode4(4577), // Rule ID 214 //
4338 /* 4571 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
4339 /* 4574 */ // Combiner Rule #111: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXIMUM'
4340 /* 4574 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4341 /* 4577 */ // Label 295: @4577
4342 /* 4577 */ GIM_Try, /*On fail goto*//*Label 296*/ GIMT_Encode4(4588), // Rule ID 106 //
4343 /* 4582 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4344 /* 4585 */ // MIs[0] d
4345 /* 4585 */ // No operand predicates
4346 /* 4585 */ // MIs[0] mi.src0
4347 /* 4585 */ // No operand predicates
4348 /* 4585 */ // MIs[0] mi.src1
4349 /* 4585 */ // No operand predicates
4350 /* 4585 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[9]]
4351 /* 4585 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4352 /* 4588 */ // Label 296: @4588
4353 /* 4588 */ GIM_Reject,
4354 /* 4589 */ // Label 75: @4589
4355 /* 4589 */ GIM_Try, /*On fail goto*//*Label 297*/ GIMT_Encode4(4600), // Rule ID 107 //
4356 /* 4594 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4357 /* 4597 */ // MIs[0] d
4358 /* 4597 */ // No operand predicates
4359 /* 4597 */ // MIs[0] mi.src0
4360 /* 4597 */ // No operand predicates
4361 /* 4597 */ // MIs[0] mi.src1
4362 /* 4597 */ // No operand predicates
4363 /* 4597 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[10]]
4364 /* 4597 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4365 /* 4600 */ // Label 297: @4600
4366 /* 4600 */ GIM_Reject,
4367 /* 4601 */ // Label 76: @4601
4368 /* 4601 */ GIM_Try, /*On fail goto*//*Label 298*/ GIMT_Encode4(4612), // Rule ID 108 //
4369 /* 4606 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4370 /* 4609 */ // MIs[0] d
4371 /* 4609 */ // No operand predicates
4372 /* 4609 */ // MIs[0] mi.src0
4373 /* 4609 */ // No operand predicates
4374 /* 4609 */ // MIs[0] mi.src1
4375 /* 4609 */ // No operand predicates
4376 /* 4609 */ // Combiner Rule #68: constant_fold_fp_binop @ [mi[11]]
4377 /* 4609 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4378 /* 4612 */ // Label 298: @4612
4379 /* 4612 */ GIM_Reject,
4380 /* 4613 */ // Label 77: @4613
4381 /* 4613 */ GIM_Try, /*On fail goto*//*Label 299*/ GIMT_Encode4(4624), // Rule ID 80 //
4382 /* 4618 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
4383 /* 4621 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_PTR_ADD'
4384 /* 4621 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
4385 /* 4624 */ // Label 299: @4624
4386 /* 4624 */ GIM_Try, /*On fail goto*//*Label 300*/ GIMT_Encode4(4635), // Rule ID 151 //
4387 /* 4629 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule91Enabled),
4388 /* 4632 */ // Combiner Rule #91: ptr_add_immed_chain; wip_match_opcode 'G_PTR_ADD'
4389 /* 4632 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner52),
4390 /* 4635 */ // Label 300: @4635
4391 /* 4635 */ GIM_Try, /*On fail goto*//*Label 301*/ GIMT_Encode4(4658), // Rule ID 117 //
4392 /* 4640 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
4393 /* 4643 */ // MIs[0] dst
4394 /* 4643 */ // No operand predicates
4395 /* 4643 */ // MIs[0] lhs
4396 /* 4643 */ // No operand predicates
4397 /* 4643 */ // MIs[0] Operand 2
4398 /* 4643 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
4399 /* 4647 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4400 /* 4652 */ // Combiner Rule #70: right_identity_zero @ [__right_identity_zero_match_0[7]]
4401 /* 4652 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4402 /* 4657 */ GIR_EraseRootFromParent_Done,
4403 /* 4658 */ // Label 301: @4658
4404 /* 4658 */ GIM_Reject,
4405 /* 4659 */ // Label 78: @4659
4406 /* 4659 */ GIM_Try, /*On fail goto*//*Label 302*/ GIMT_Encode4(4670), // Rule ID 93 //
4407 /* 4664 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
4408 /* 4667 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_SMIN'
4409 /* 4667 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
4410 /* 4670 */ // Label 302: @4670
4411 /* 4670 */ GIM_Try, /*On fail goto*//*Label 303*/ GIMT_Encode4(4681), // Rule ID 191 //
4412 /* 4675 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
4413 /* 4678 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SMIN'
4414 /* 4678 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
4415 /* 4681 */ // Label 303: @4681
4416 /* 4681 */ GIM_Reject,
4417 /* 4682 */ // Label 79: @4682
4418 /* 4682 */ GIM_Try, /*On fail goto*//*Label 304*/ GIMT_Encode4(4693), // Rule ID 94 //
4419 /* 4687 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
4420 /* 4690 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_SMAX'
4421 /* 4690 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
4422 /* 4693 */ // Label 304: @4693
4423 /* 4693 */ GIM_Try, /*On fail goto*//*Label 305*/ GIMT_Encode4(4704), // Rule ID 192 //
4424 /* 4698 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
4425 /* 4701 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_SMAX'
4426 /* 4701 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
4427 /* 4704 */ // Label 305: @4704
4428 /* 4704 */ GIM_Reject,
4429 /* 4705 */ // Label 80: @4705
4430 /* 4705 */ GIM_Try, /*On fail goto*//*Label 306*/ GIMT_Encode4(4716), // Rule ID 95 //
4431 /* 4710 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
4432 /* 4713 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_UMIN'
4433 /* 4713 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
4434 /* 4716 */ // Label 306: @4716
4435 /* 4716 */ GIM_Try, /*On fail goto*//*Label 307*/ GIMT_Encode4(4727), // Rule ID 193 //
4436 /* 4721 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
4437 /* 4724 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UMIN'
4438 /* 4724 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
4439 /* 4727 */ // Label 307: @4727
4440 /* 4727 */ GIM_Reject,
4441 /* 4728 */ // Label 81: @4728
4442 /* 4728 */ GIM_Try, /*On fail goto*//*Label 308*/ GIMT_Encode4(4739), // Rule ID 96 //
4443 /* 4733 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
4444 /* 4736 */ // Combiner Rule #67: constant_fold_binop; wip_match_opcode 'G_UMAX'
4445 /* 4736 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
4446 /* 4739 */ // Label 308: @4739
4447 /* 4739 */ GIM_Try, /*On fail goto*//*Label 309*/ GIMT_Encode4(4750), // Rule ID 194 //
4448 /* 4744 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
4449 /* 4747 */ // Combiner Rule #110: commute_int_constant_to_rhs; wip_match_opcode 'G_UMAX'
4450 /* 4747 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
4451 /* 4750 */ // Label 309: @4750
4452 /* 4750 */ GIM_Reject,
4453 /* 4751 */ // Label 82: @4751
4454 /* 4751 */ GIM_Try, /*On fail goto*//*Label 310*/ GIMT_Encode4(4762), // Rule ID 165 //
4455 /* 4756 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule99Enabled),
4456 /* 4759 */ // Combiner Rule #99: unary_undef_to_zero; wip_match_opcode 'G_ABS'
4457 /* 4759 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner58),
4458 /* 4762 */ // Label 310: @4762
4459 /* 4762 */ GIM_Reject,
4460 /* 4763 */ // Label 83: @4763
4461 /* 4763 */ GIM_Try, /*On fail goto*//*Label 311*/ GIMT_Encode4(4774), // Rule ID 180 //
4462 /* 4768 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule105Enabled),
4463 /* 4771 */ // Combiner Rule #105: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_INSERT_VECTOR_ELT'
4464 /* 4771 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner65),
4465 /* 4774 */ // Label 311: @4774
4466 /* 4774 */ GIM_Reject,
4467 /* 4775 */ // Label 84: @4775
4468 /* 4775 */ GIM_Try, /*On fail goto*//*Label 312*/ GIMT_Encode4(4786), // Rule ID 44 //
4469 /* 4780 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled),
4470 /* 4783 */ // Combiner Rule #37: extractvecelt_pairwise_add; wip_match_opcode 'G_EXTRACT_VECTOR_ELT'
4471 /* 4783 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner16),
4472 /* 4786 */ // Label 312: @4786
4473 /* 4786 */ GIM_Try, /*On fail goto*//*Label 313*/ GIMT_Encode4(4797), // Rule ID 181 //
4474 /* 4791 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule105Enabled),
4475 /* 4794 */ // Combiner Rule #105: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_EXTRACT_VECTOR_ELT'
4476 /* 4794 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner65),
4477 /* 4797 */ // Label 313: @4797
4478 /* 4797 */ GIM_Try, /*On fail goto*//*Label 314*/ GIMT_Encode4(4808), // Rule ID 215 //
4479 /* 4802 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule112Enabled),
4480 /* 4805 */ // Combiner Rule #112: extract_vec_elt_build_vec; wip_match_opcode 'G_EXTRACT_VECTOR_ELT'
4481 /* 4805 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72),
4482 /* 4808 */ // Label 314: @4808
4483 /* 4808 */ GIM_Reject,
4484 /* 4809 */ // Label 85: @4809
4485 /* 4809 */ GIM_Try, /*On fail goto*//*Label 315*/ GIMT_Encode4(4820), // Rule ID 176 //
4486 /* 4814 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule102Enabled),
4487 /* 4817 */ // Combiner Rule #102: propagate_undef_all_ops; wip_match_opcode 'G_SHUFFLE_VECTOR'
4488 /* 4817 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62),
4489 /* 4820 */ // Label 315: @4820
4490 /* 4820 */ GIM_Try, /*On fail goto*//*Label 316*/ GIMT_Encode4(4831), // Rule ID 178 //
4491 /* 4825 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled),
4492 /* 4828 */ // Combiner Rule #103: propagate_undef_shuffle_mask; wip_match_opcode 'G_SHUFFLE_VECTOR'
4493 /* 4828 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner63),
4494 /* 4831 */ // Label 316: @4831
4495 /* 4831 */ GIM_Reject,
4496 /* 4832 */ // Label 86: @4832
4497 /* 4832 */ GIM_Try, /*On fail goto*//*Label 317*/ GIMT_Encode4(4853), // Rule ID 18 //
4498 /* 4837 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
4499 /* 4840 */ // MIs[0] dst
4500 /* 4840 */ // No operand predicates
4501 /* 4840 */ // MIs[0] src0
4502 /* 4840 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4503 /* 4844 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4504 /* 4848 */ // MIs[1] cst
4505 /* 4848 */ // No operand predicates
4506 /* 4848 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4507 /* 4850 */ // Combiner Rule #18: constant_fold_fceil
4508 /* 4850 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4509 /* 4853 */ // Label 317: @4853
4510 /* 4853 */ GIM_Reject,
4511 /* 4854 */ // Label 87: @4854
4512 /* 4854 */ GIM_Try, /*On fail goto*//*Label 318*/ GIMT_Encode4(4875), // Rule ID 14 //
4513 /* 4859 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
4514 /* 4862 */ // MIs[0] dst
4515 /* 4862 */ // No operand predicates
4516 /* 4862 */ // MIs[0] src0
4517 /* 4862 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4518 /* 4866 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4519 /* 4870 */ // MIs[1] cst
4520 /* 4870 */ // No operand predicates
4521 /* 4870 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4522 /* 4872 */ // Combiner Rule #14: constant_fold_fsqrt
4523 /* 4872 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4524 /* 4875 */ // Label 318: @4875
4525 /* 4875 */ GIM_Reject,
4526 /* 4876 */ // Label 88: @4876
4527 /* 4876 */ GIM_Try, /*On fail goto*//*Label 319*/ GIMT_Encode4(4897), // Rule ID 19 //
4528 /* 4881 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
4529 /* 4884 */ // MIs[0] dst
4530 /* 4884 */ // No operand predicates
4531 /* 4884 */ // MIs[0] src0
4532 /* 4884 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4533 /* 4888 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4534 /* 4892 */ // MIs[1] cst
4535 /* 4892 */ // No operand predicates
4536 /* 4892 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4537 /* 4894 */ // Combiner Rule #19: constant_fold_ffloor
4538 /* 4894 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4539 /* 4897 */ // Label 319: @4897
4540 /* 4897 */ GIM_Reject,
4541 /* 4898 */ // Label 89: @4898
4542 /* 4898 */ GIM_Try, /*On fail goto*//*Label 320*/ GIMT_Encode4(4919), // Rule ID 23 //
4543 /* 4903 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
4544 /* 4906 */ // MIs[0] dst
4545 /* 4906 */ // No operand predicates
4546 /* 4906 */ // MIs[0] src0
4547 /* 4906 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4548 /* 4910 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4549 /* 4914 */ // MIs[1] cst
4550 /* 4914 */ // No operand predicates
4551 /* 4914 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4552 /* 4916 */ // Combiner Rule #23: constant_fold_frint
4553 /* 4916 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4554 /* 4919 */ // Label 320: @4919
4555 /* 4919 */ GIM_Reject,
4556 /* 4920 */ // Label 90: @4920
4557 /* 4920 */ GIM_Try, /*On fail goto*//*Label 321*/ GIMT_Encode4(4941), // Rule ID 24 //
4558 /* 4925 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
4559 /* 4928 */ // MIs[0] dst
4560 /* 4928 */ // No operand predicates
4561 /* 4928 */ // MIs[0] src0
4562 /* 4928 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4563 /* 4932 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
4564 /* 4936 */ // MIs[1] cst
4565 /* 4936 */ // No operand predicates
4566 /* 4936 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
4567 /* 4938 */ // Combiner Rule #24: constant_fold_fnearbyint
4568 /* 4938 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
4569 /* 4941 */ // Label 321: @4941
4570 /* 4941 */ GIM_Reject,
4571 /* 4942 */ // Label 91: @4942
4572 /* 4942 */ GIM_Reject,
4573 /* 4943 */ }; // Size: 4943 bytes
4574 return MatchTable0;
4575}
4576#undef GIMT_Encode2
4577#undef GIMT_Encode4
4578#undef GIMT_Encode8
4579
4580
4581#endif // GET_GICOMBINER_IMPL
4582
4583#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
4584
4585AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
4586AvailableFunctionFeatures()
4587
4588#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
4589
4590#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
4591
4592, State(0),
4593ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
4594
4595#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
4596
4597