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