1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* RISCVPreLegalizerCombinerImpl Combiner Match Table *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_GICOMBINER_DEPS
10#include "llvm/ADT/SparseBitVector.h"
11namespace llvm {
12extern cl::OptionCategory GICombinerOptionCategory;
13} // end namespace llvm
14#endif // ifdef GET_GICOMBINER_DEPS
15
16#ifdef GET_GICOMBINER_TYPES
17struct RISCVPreLegalizerCombinerImplRuleConfig {
18 SparseBitVector<> DisabledRules;
19
20 bool isRuleEnabled(unsigned RuleID) const;
21 bool parseCommandLineOption();
22 bool setRuleEnabled(StringRef RuleIdentifier);
23 bool setRuleDisabled(StringRef RuleIdentifier);
24};
25
26static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) {
27 uint64_t I;
28 // getAtInteger(...) returns false on success
29 bool Parsed = !RuleIdentifier.getAsInteger(0, I);
30 if (Parsed)
31 return I;
32
33#ifndef NDEBUG
34 switch (RuleIdentifier.size()) {
35 default: break;
36 case 9: // 5 strings to match.
37 switch (RuleIdentifier[0]) {
38 default: break;
39 case 'c': // 1 string to match.
40 if (memcmp(RuleIdentifier.data()+1, "opy_prop", 8) != 0)
41 break;
42 return 8; // "copy_prop"
43 case 'm': // 3 strings to match.
44 switch (RuleIdentifier[1]) {
45 default: break;
46 case 'a': // 1 string to match.
47 if (memcmp(RuleIdentifier.data()+2, "tch_ors", 7) != 0)
48 break;
49 return 180; // "match_ors"
50 case 'u': // 2 strings to match.
51 if (memcmp(RuleIdentifier.data()+2, "lo_by_", 6) != 0)
52 break;
53 switch (RuleIdentifier[8]) {
54 default: break;
55 case '0': // 1 string to match.
56 return 130; // "mulo_by_0"
57 case '2': // 1 string to match.
58 return 129; // "mulo_by_2"
59 }
60 break;
61 }
62 break;
63 case 'n': // 1 string to match.
64 if (memcmp(RuleIdentifier.data()+1, "neg_zext", 8) != 0)
65 break;
66 return 187; // "nneg_zext"
67 }
68 break;
69 case 10: // 6 strings to match.
70 switch (RuleIdentifier[0]) {
71 default: break;
72 case 'i': // 1 string to match.
73 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i", 9) != 0)
74 break;
75 return 74; // "i2p_to_p2i"
76 case 'm': // 2 strings to match.
77 switch (RuleIdentifier[1]) {
78 default: break;
79 case 'a': // 1 string to match.
80 if (memcmp(RuleIdentifier.data()+2, "tch_ands", 8) != 0)
81 break;
82 return 179; // "match_ands"
83 case 'u': // 1 string to match.
84 if (memcmp(RuleIdentifier.data()+2, "l_to_shl", 8) != 0)
85 break;
86 return 9; // "mul_to_shl"
87 }
88 break;
89 case 'p': // 1 string to match.
90 if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p", 9) != 0)
91 break;
92 return 73; // "p2i_to_i2p"
93 case 's': // 1 string to match.
94 if (memcmp(RuleIdentifier.data()+1, "ext_trunc", 9) != 0)
95 break;
96 return 185; // "sext_trunc"
97 case 'z': // 1 string to match.
98 if (memcmp(RuleIdentifier.data()+1, "ext_trunc", 9) != 0)
99 break;
100 return 186; // "zext_trunc"
101 }
102 break;
103 case 11: // 5 strings to match.
104 switch (RuleIdentifier[0]) {
105 default: break;
106 case 'a': // 1 string to match.
107 if (memcmp(RuleIdentifier.data()+1, "dd_sub_reg", 10) != 0)
108 break;
109 return 79; // "add_sub_reg"
110 case 'm': // 1 string to match.
111 if (memcmp(RuleIdentifier.data()+1, "atch_addos", 10) != 0)
112 break;
113 return 184; // "match_addos"
114 case 's': // 1 string to match.
115 if (memcmp(RuleIdentifier.data()+1, "ub_add_reg", 10) != 0)
116 break;
117 return 173; // "sub_add_reg"
118 case 't': // 1 string to match.
119 if (memcmp(RuleIdentifier.data()+1, "runc_shift", 10) != 0)
120 break;
121 return 119; // "trunc_shift"
122 case 'u': // 1 string to match.
123 if (memcmp(RuleIdentifier.data()+1, "nmerge_cst", 10) != 0)
124 break;
125 return 114; // "unmerge_cst"
126 }
127 break;
128 case 12: // 10 strings to match.
129 switch (RuleIdentifier[0]) {
130 default: break;
131 case 'A': // 1 string to match.
132 if (memcmp(RuleIdentifier.data()+1, "PlusBMinusB", 11) != 0)
133 break;
134 return 2; // "APlusBMinusB"
135 case 'B': // 1 string to match.
136 if (memcmp(RuleIdentifier.data()+1, "MinusAPlusA", 11) != 0)
137 break;
138 return 3; // "BMinusAPlusA"
139 case 'a': // 1 string to match.
140 if (memcmp(RuleIdentifier.data()+1, "dde_to_addo", 11) != 0)
141 break;
142 return 131; // "adde_to_addo"
143 case 'e': // 1 string to match.
144 if (memcmp(RuleIdentifier.data()+1, "xt_ext_fold", 11) != 0)
145 break;
146 return 110; // "ext_ext_fold"
147 case 'f': // 1 string to match.
148 if (memcmp(RuleIdentifier.data()+1, "sub_to_fneg", 11) != 0)
149 break;
150 return 176; // "fsub_to_fneg"
151 case 'm': // 1 string to match.
152 if (memcmp(RuleIdentifier.data()+1, "ulh_to_lshr", 11) != 0)
153 break;
154 return 161; // "mulh_to_lshr"
155 case 'n': // 1 string to match.
156 if (memcmp(RuleIdentifier.data()+1, "ot_cmp_fold", 11) != 0)
157 break;
158 return 111; // "not_cmp_fold"
159 case 'r': // 1 string to match.
160 if (memcmp(RuleIdentifier.data()+1, "edundant_or", 11) != 0)
161 break;
162 return 104; // "redundant_or"
163 case 's': // 1 string to match.
164 if (memcmp(RuleIdentifier.data()+1, "div_by_pow2", 11) != 0)
165 break;
166 return 159; // "sdiv_by_pow2"
167 case 'u': // 1 string to match.
168 if (memcmp(RuleIdentifier.data()+1, "div_by_pow2", 11) != 0)
169 break;
170 return 160; // "udiv_by_pow2"
171 }
172 break;
173 case 13: // 13 strings to match.
174 switch (RuleIdentifier[0]) {
175 default: break;
176 case 'a': // 1 string to match.
177 if (memcmp(RuleIdentifier.data()+1, "dd_of_vscale", 12) != 0)
178 break;
179 return 44; // "add_of_vscale"
180 case 'c': // 1 string to match.
181 if (memcmp(RuleIdentifier.data()+1, "ommute_shift", 12) != 0)
182 break;
183 return 147; // "commute_shift"
184 case 'l': // 1 string to match.
185 if (memcmp(RuleIdentifier.data()+1, "oad_and_mask", 12) != 0)
186 break;
187 return 54; // "load_and_mask"
188 case 'm': // 3 strings to match.
189 switch (RuleIdentifier[1]) {
190 default: break;
191 case 'a': // 1 string to match.
192 if (memcmp(RuleIdentifier.data()+2, "tch_selects", 11) != 0)
193 break;
194 return 101; // "match_selects"
195 case 'e': // 1 string to match.
196 if (memcmp(RuleIdentifier.data()+2, "rge_unmerge", 11) != 0)
197 break;
198 return 117; // "merge_unmerge"
199 case 'u': // 1 string to match.
200 if (memcmp(RuleIdentifier.data()+2, "l_of_vscale", 11) != 0)
201 break;
202 return 45; // "mul_of_vscale"
203 }
204 break;
205 case 'r': // 1 string to match.
206 if (memcmp(RuleIdentifier.data()+1, "edundant_and", 12) != 0)
207 break;
208 return 102; // "redundant_and"
209 case 's': // 3 strings to match.
210 switch (RuleIdentifier[1]) {
211 default: break;
212 case 'd': // 1 string to match.
213 if (memcmp(RuleIdentifier.data()+2, "iv_by_const", 11) != 0)
214 break;
215 return 158; // "sdiv_by_const"
216 case 'h': // 1 string to match.
217 if (memcmp(RuleIdentifier.data()+2, "l_of_vscale", 11) != 0)
218 break;
219 return 46; // "shl_of_vscale"
220 case 'u': // 1 string to match.
221 if (memcmp(RuleIdentifier.data()+2, "b_of_vscale", 11) != 0)
222 break;
223 return 47; // "sub_of_vscale"
224 }
225 break;
226 case 'u': // 3 strings to match.
227 switch (RuleIdentifier[1]) {
228 default: break;
229 case 'd': // 1 string to match.
230 if (memcmp(RuleIdentifier.data()+2, "iv_by_const", 11) != 0)
231 break;
232 return 157; // "udiv_by_const"
233 case 'n': // 2 strings to match.
234 if (memcmp(RuleIdentifier.data()+2, "merge_", 6) != 0)
235 break;
236 switch (RuleIdentifier[8]) {
237 default: break;
238 case 'm': // 1 string to match.
239 if (memcmp(RuleIdentifier.data()+9, "erge", 4) != 0)
240 break;
241 return 113; // "unmerge_merge"
242 case 'u': // 1 string to match.
243 if (memcmp(RuleIdentifier.data()+9, "ndef", 4) != 0)
244 break;
245 return 66; // "unmerge_undef"
246 }
247 break;
248 }
249 break;
250 }
251 break;
252 case 14: // 8 strings to match.
253 switch (RuleIdentifier[0]) {
254 default: break;
255 case 'b': // 2 strings to match.
256 if (RuleIdentifier[1] != 'i')
257 break;
258 switch (RuleIdentifier[2]) {
259 default: break;
260 case 'n': // 1 string to match.
261 if (memcmp(RuleIdentifier.data()+3, "op_same_val", 11) != 0)
262 break;
263 return 70; // "binop_same_val"
264 case 't': // 1 string to match.
265 if (memcmp(RuleIdentifier.data()+3, "reverse_shl", 11) != 0)
266 break;
267 return 145; // "bitreverse_shl"
268 }
269 break;
270 case 'f': // 2 strings to match.
271 switch (RuleIdentifier[1]) {
272 default: break;
273 case 'a': // 1 string to match.
274 if (memcmp(RuleIdentifier.data()+2, "bs_fneg_fold", 12) != 0)
275 break;
276 return 156; // "fabs_fneg_fold"
277 case 'n': // 1 string to match.
278 if (memcmp(RuleIdentifier.data()+2, "eg_fneg_fold", 12) != 0)
279 break;
280 return 76; // "fneg_fneg_fold"
281 }
282 break;
283 case 'm': // 1 string to match.
284 if (memcmp(RuleIdentifier.data()+1, "ul_by_neg_one", 13) != 0)
285 break;
286 return 11; // "mul_by_neg_one"
287 case 'r': // 1 string to match.
288 if (memcmp(RuleIdentifier.data()+1, "eassoc_ptradd", 13) != 0)
289 break;
290 return 91; // "reassoc_ptradd"
291 case 's': // 1 string to match.
292 if (memcmp(RuleIdentifier.data()+1, "hifts_too_big", 13) != 0)
293 break;
294 return 90; // "shifts_too_big"
295 case 't': // 1 string to match.
296 if (memcmp(RuleIdentifier.data()+1, "runc_ext_fold", 13) != 0)
297 break;
298 return 118; // "trunc_ext_fold"
299 }
300 break;
301 case 15: // 9 strings to match.
302 switch (RuleIdentifier[0]) {
303 default: break;
304 case 'A': // 1 string to match.
305 if (memcmp(RuleIdentifier.data()+1, "PlusZeroMinusB", 14) != 0)
306 break;
307 return 1; // "APlusZeroMinusB"
308 case 'Z': // 1 string to match.
309 if (memcmp(RuleIdentifier.data()+1, "eroMinusAPlusB", 14) != 0)
310 break;
311 return 0; // "ZeroMinusAPlusB"
312 case 'b': // 1 string to match.
313 if (memcmp(RuleIdentifier.data()+1, "itreverse_lshr", 14) != 0)
314 break;
315 return 146; // "bitreverse_lshr"
316 case 'e': // 1 string to match.
317 if (memcmp(RuleIdentifier.data()+1, "xtending_loads", 14) != 0)
318 break;
319 return 53; // "extending_loads"
320 case 'i': // 1 string to match.
321 if (memcmp(RuleIdentifier.data()+1, "dempotent_prop", 14) != 0)
322 break;
323 return 12; // "idempotent_prop"
324 case 'l': // 1 string to match.
325 if (memcmp(RuleIdentifier.data()+1, "oad_or_combine", 14) != 0)
326 break;
327 return 138; // "load_or_combine"
328 case 'o': // 1 string to match.
329 if (memcmp(RuleIdentifier.data()+1, "verlapping_and", 14) != 0)
330 break;
331 return 128; // "overlapping_and"
332 case 's': // 1 string to match.
333 if (memcmp(RuleIdentifier.data()+1, "elect_same_val", 14) != 0)
334 break;
335 return 68; // "select_same_val"
336 case 'z': // 1 string to match.
337 if (memcmp(RuleIdentifier.data()+1, "ext_trunc_fold", 14) != 0)
338 break;
339 return 106; // "zext_trunc_fold"
340 }
341 break;
342 case 16: // 3 strings to match.
343 switch (RuleIdentifier[0]) {
344 default: break;
345 case 's': // 2 strings to match.
346 if (memcmp(RuleIdentifier.data()+1, "elect_", 6) != 0)
347 break;
348 switch (RuleIdentifier[7]) {
349 default: break;
350 case 't': // 1 string to match.
351 if (memcmp(RuleIdentifier.data()+8, "o_minmax", 8) != 0)
352 break;
353 return 174; // "select_to_minmax"
354 case 'u': // 1 string to match.
355 if (memcmp(RuleIdentifier.data()+8, "ndef_cmp", 8) != 0)
356 break;
357 return 98; // "select_undef_cmp"
358 }
359 break;
360 case 'u': // 1 string to match.
361 if (memcmp(RuleIdentifier.data()+1, "ndef_to_fp_zero", 15) != 0)
362 break;
363 return 56; // "undef_to_fp_zero"
364 }
365 break;
366 case 17: // 12 strings to match.
367 switch (RuleIdentifier[0]) {
368 default: break;
369 case 'A': // 2 strings to match.
370 if (memcmp(RuleIdentifier.data()+1, "PlusBMinus", 10) != 0)
371 break;
372 switch (RuleIdentifier[11]) {
373 default: break;
374 case 'A': // 1 string to match.
375 if (memcmp(RuleIdentifier.data()+12, "plusC", 5) != 0)
376 break;
377 return 6; // "APlusBMinusAplusC"
378 case 'C': // 1 string to match.
379 if (memcmp(RuleIdentifier.data()+12, "PlusA", 5) != 0)
380 break;
381 return 7; // "APlusBMinusCPlusA"
382 }
383 break;
384 case 'a': // 2 strings to match.
385 switch (RuleIdentifier[1]) {
386 default: break;
387 case 'd': // 1 string to match.
388 if (memcmp(RuleIdentifier.data()+2, "d_p2i_to_ptradd", 15) != 0)
389 break;
390 return 10; // "add_p2i_to_ptradd"
391 case 'n': // 1 string to match.
392 if (memcmp(RuleIdentifier.data()+2, "yext_trunc_fold", 15) != 0)
393 break;
394 return 75; // "anyext_trunc_fold"
395 }
396 break;
397 case 'c': // 1 string to match.
398 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fma", 16) != 0)
399 break;
400 return 154; // "constant_fold_fma"
401 case 'd': // 1 string to match.
402 if (memcmp(RuleIdentifier.data()+1, "iv_rem_to_divrem", 16) != 0)
403 break;
404 return 139; // "div_rem_to_divrem"
405 case 'e': // 1 string to match.
406 if (memcmp(RuleIdentifier.data()+1, "rase_undef_store", 16) != 0)
407 break;
408 return 65; // "erase_undef_store"
409 case 'p': // 1 string to match.
410 if (memcmp(RuleIdentifier.data()+1, "tr_add_with_zero", 16) != 0)
411 break;
412 return 135; // "ptr_add_with_zero"
413 case 's': // 2 strings to match.
414 switch (RuleIdentifier[1]) {
415 default: break;
416 case 'e': // 1 string to match.
417 if (memcmp(RuleIdentifier.data()+2, "lect_to_iminmax", 15) != 0)
418 break;
419 return 100; // "select_to_iminmax"
420 case 'h': // 1 string to match.
421 if (memcmp(RuleIdentifier.data()+2, "ift_immed_chain", 15) != 0)
422 break;
423 return 136; // "shift_immed_chain"
424 }
425 break;
426 case 'u': // 2 strings to match.
427 switch (RuleIdentifier[1]) {
428 default: break;
429 case 'n': // 1 string to match.
430 if (memcmp(RuleIdentifier.data()+2, "def_to_int_zero", 15) != 0)
431 break;
432 return 57; // "undef_to_int_zero"
433 case 'r': // 1 string to match.
434 if (memcmp(RuleIdentifier.data()+2, "em_pow2_to_mask", 15) != 0)
435 break;
436 return 105; // "urem_pow2_to_mask"
437 }
438 break;
439 }
440 break;
441 case 18: // 9 strings to match.
442 switch (RuleIdentifier[0]) {
443 default: break;
444 case 'A': // 2 strings to match.
445 if (memcmp(RuleIdentifier.data()+1, "MinusBPlus", 10) != 0)
446 break;
447 switch (RuleIdentifier[11]) {
448 default: break;
449 case 'B': // 1 string to match.
450 if (memcmp(RuleIdentifier.data()+12, "MinusC", 6) != 0)
451 break;
452 return 5; // "AMinusBPlusBMinusC"
453 case 'C': // 1 string to match.
454 if (memcmp(RuleIdentifier.data()+12, "MinusA", 6) != 0)
455 break;
456 return 4; // "AMinusBPlusCMinusA"
457 }
458 break;
459 case 'b': // 1 string to match.
460 if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero", 17) != 0)
461 break;
462 return 71; // "binop_left_to_zero"
463 case 'c': // 3 strings to match.
464 if (RuleIdentifier[1] != 'o')
465 break;
466 switch (RuleIdentifier[2]) {
467 default: break;
468 case 'm': // 1 string to match.
469 if (memcmp(RuleIdentifier.data()+3, "bine_minmax_nan", 15) != 0)
470 break;
471 return 132; // "combine_minmax_nan"
472 case 'n': // 2 strings to match.
473 if (memcmp(RuleIdentifier.data()+3, "stant_fold_f", 12) != 0)
474 break;
475 switch (RuleIdentifier[15]) {
476 default: break;
477 case 'a': // 1 string to match.
478 if (memcmp(RuleIdentifier.data()+16, "bs", 2) != 0)
479 break;
480 return 121; // "constant_fold_fabs"
481 case 'n': // 1 string to match.
482 if (memcmp(RuleIdentifier.data()+16, "eg", 2) != 0)
483 break;
484 return 120; // "constant_fold_fneg"
485 }
486 break;
487 }
488 break;
489 case 'e': // 1 string to match.
490 if (memcmp(RuleIdentifier.data()+1, "xpand_const_fpowi", 17) != 0)
491 break;
492 return 133; // "expand_const_fpowi"
493 case 'f': // 1 string to match.
494 if (memcmp(RuleIdentifier.data()+1, "ptrunc_fpext_fold", 17) != 0)
495 break;
496 return 84; // "fptrunc_fpext_fold"
497 case 's': // 1 string to match.
498 if (memcmp(RuleIdentifier.data()+1, "ext_inreg_of_load", 17) != 0)
499 break;
500 return 95; // "sext_inreg_of_load"
501 }
502 break;
503 case 19: // 12 strings to match.
504 switch (RuleIdentifier[0]) {
505 default: break;
506 case 'b': // 1 string to match.
507 if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero", 18) != 0)
508 break;
509 return 72; // "binop_right_to_zero"
510 case 'c': // 4 strings to match.
511 if (memcmp(RuleIdentifier.data()+1, "onst", 4) != 0)
512 break;
513 switch (RuleIdentifier[5]) {
514 default: break;
515 case '_': // 1 string to match.
516 if (memcmp(RuleIdentifier.data()+6, "ptradd_to_i2p", 13) != 0)
517 break;
518 return 127; // "const_ptradd_to_i2p"
519 case 'a': // 3 strings to match.
520 if (memcmp(RuleIdentifier.data()+6, "nt_fold_", 8) != 0)
521 break;
522 switch (RuleIdentifier[14]) {
523 default: break;
524 case 'b': // 1 string to match.
525 if (memcmp(RuleIdentifier.data()+15, "inop", 4) != 0)
526 break;
527 return 152; // "constant_fold_binop"
528 case 'f': // 2 strings to match.
529 switch (RuleIdentifier[15]) {
530 default: break;
531 case 'l': // 1 string to match.
532 if (memcmp(RuleIdentifier.data()+16, "og2", 3) != 0)
533 break;
534 return 123; // "constant_fold_flog2"
535 case 's': // 1 string to match.
536 if (memcmp(RuleIdentifier.data()+16, "qrt", 3) != 0)
537 break;
538 return 122; // "constant_fold_fsqrt"
539 }
540 break;
541 }
542 break;
543 }
544 break;
545 case 'e': // 1 string to match.
546 if (memcmp(RuleIdentifier.data()+1, "xtend_through_phis", 18) != 0)
547 break;
548 return 87; // "extend_through_phis"
549 case 'p': // 1 string to match.
550 if (memcmp(RuleIdentifier.data()+1, "tr_add_immed_chain", 18) != 0)
551 break;
552 return 93; // "ptr_add_immed_chain"
553 case 'r': // 2 strings to match.
554 switch (RuleIdentifier[1]) {
555 default: break;
556 case 'e': // 1 string to match.
557 if (memcmp(RuleIdentifier.data()+2, "assoc_comm_binops", 17) != 0)
558 break;
559 return 92; // "reassoc_comm_binops"
560 case 'i': // 1 string to match.
561 if (memcmp(RuleIdentifier.data()+2, "ght_identity_zero", 17) != 0)
562 break;
563 return 69; // "right_identity_zero"
564 }
565 break;
566 case 's': // 2 strings to match.
567 switch (RuleIdentifier[1]) {
568 default: break;
569 case 'e': // 1 string to match.
570 if (memcmp(RuleIdentifier.data()+2, "lect_constant_cmp", 17) != 0)
571 break;
572 return 99; // "select_constant_cmp"
573 case 'i': // 1 string to match.
574 if (memcmp(RuleIdentifier.data()+2, "mplify_add_to_sub", 17) != 0)
575 break;
576 return 88; // "simplify_add_to_sub"
577 }
578 break;
579 case 'u': // 1 string to match.
580 if (memcmp(RuleIdentifier.data()+1, "nary_undef_to_zero", 18) != 0)
581 break;
582 return 61; // "unary_undef_to_zero"
583 }
584 break;
585 case 20: // 5 strings to match.
586 switch (RuleIdentifier[0]) {
587 default: break;
588 case 'a': // 1 string to match.
589 if (memcmp(RuleIdentifier.data()+1, "nd_or_disjoint_mask", 19) != 0)
590 break;
591 return 163; // "and_or_disjoint_mask"
592 case 'b': // 1 string to match.
593 if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_fold", 19) != 0)
594 break;
595 return 83; // "bitcast_bitcast_fold"
596 case 'r': // 2 strings to match.
597 if (memcmp(RuleIdentifier.data()+1, "edu", 3) != 0)
598 break;
599 switch (RuleIdentifier[4]) {
600 default: break;
601 case 'c': // 1 string to match.
602 if (memcmp(RuleIdentifier.data()+5, "e_shl_of_extend", 15) != 0)
603 break;
604 return 96; // "reduce_shl_of_extend"
605 case 'n': // 1 string to match.
606 if (memcmp(RuleIdentifier.data()+5, "dant_sext_inreg", 15) != 0)
607 break;
608 return 103; // "redundant_sext_inreg"
609 }
610 break;
611 case 'u': // 1 string to match.
612 if (memcmp(RuleIdentifier.data()+1, "nmerge_zext_to_zext", 19) != 0)
613 break;
614 return 116; // "unmerge_zext_to_zext"
615 }
616 break;
617 case 21: // 7 strings to match.
618 switch (RuleIdentifier[0]) {
619 default: break;
620 case 'c': // 3 strings to match.
621 if (RuleIdentifier[1] != 'o')
622 break;
623 switch (RuleIdentifier[2]) {
624 default: break;
625 case 'm': // 1 string to match.
626 if (memcmp(RuleIdentifier.data()+3, "bine_concat_vector", 18) != 0)
627 break;
628 return 181; // "combine_concat_vector"
629 case 'n': // 2 strings to match.
630 if (memcmp(RuleIdentifier.data()+3, "stant_fold_", 11) != 0)
631 break;
632 switch (RuleIdentifier[14]) {
633 default: break;
634 case 'c': // 1 string to match.
635 if (memcmp(RuleIdentifier.data()+15, "ast_op", 6) != 0)
636 break;
637 return 155; // "constant_fold_cast_op"
638 case 'f': // 1 string to match.
639 if (memcmp(RuleIdentifier.data()+15, "ptrunc", 6) != 0)
640 break;
641 return 124; // "constant_fold_fptrunc"
642 }
643 break;
644 }
645 break;
646 case 'i': // 1 string to match.
647 if (memcmp(RuleIdentifier.data()+1, "nsert_vector_elt_oob", 20) != 0)
648 break;
649 return 18; // "insert_vector_elt_oob"
650 case 'r': // 1 string to match.
651 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_fp", 20) != 0)
652 break;
653 return 78; // "right_identity_one_fp"
654 case 'u': // 2 strings to match.
655 if (RuleIdentifier[1] != 'n')
656 break;
657 switch (RuleIdentifier[2]) {
658 default: break;
659 case 'd': // 1 string to match.
660 if (memcmp(RuleIdentifier.data()+3, "ef_to_negative_one", 18) != 0)
661 break;
662 return 58; // "undef_to_negative_one"
663 case 'm': // 1 string to match.
664 if (memcmp(RuleIdentifier.data()+3, "erge_dead_to_trunc", 18) != 0)
665 break;
666 return 115; // "unmerge_dead_to_trunc"
667 }
668 break;
669 }
670 break;
671 case 22: // 12 strings to match.
672 switch (RuleIdentifier[0]) {
673 default: break;
674 case 'c': // 2 strings to match.
675 if (RuleIdentifier[1] != 'o')
676 break;
677 switch (RuleIdentifier[2]) {
678 default: break;
679 case 'm': // 1 string to match.
680 if (memcmp(RuleIdentifier.data()+3, "bine_shuffle_concat", 19) != 0)
681 break;
682 return 188; // "combine_shuffle_concat"
683 case 'n': // 1 string to match.
684 if (memcmp(RuleIdentifier.data()+3, "stant_fold_fp_binop", 19) != 0)
685 break;
686 return 153; // "constant_fold_fp_binop"
687 }
688 break;
689 case 'f': // 4 strings to match.
690 switch (RuleIdentifier[1]) {
691 default: break;
692 case 'o': // 1 string to match.
693 if (memcmp(RuleIdentifier.data()+2, "ld_binop_into_select", 20) != 0)
694 break;
695 return 172; // "fold_binop_into_select"
696 case 'u': // 3 strings to match.
697 if (memcmp(RuleIdentifier.data()+2, "nnel_shift_", 11) != 0)
698 break;
699 switch (RuleIdentifier[13]) {
700 default: break;
701 case 'l': // 1 string to match.
702 if (memcmp(RuleIdentifier.data()+14, "eft_zero", 8) != 0)
703 break;
704 return 143; // "funnel_shift_left_zero"
705 case 'o': // 1 string to match.
706 if (memcmp(RuleIdentifier.data()+14, "vershift", 8) != 0)
707 break;
708 return 144; // "funnel_shift_overshift"
709 case 't': // 1 string to match.
710 if (memcmp(RuleIdentifier.data()+14, "o_rotate", 8) != 0)
711 break;
712 return 141; // "funnel_shift_to_rotate"
713 }
714 break;
715 }
716 break;
717 case 'i': // 1 string to match.
718 if (memcmp(RuleIdentifier.data()+1, "cmp_to_lhs_known_bits", 21) != 0)
719 break;
720 return 108; // "icmp_to_lhs_known_bits"
721 case 'p': // 1 string to match.
722 if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_any_op", 21) != 0)
723 break;
724 return 62; // "propagate_undef_any_op"
725 case 'r': // 2 strings to match.
726 switch (RuleIdentifier[1]) {
727 default: break;
728 case 'e': // 1 string to match.
729 if (memcmp(RuleIdentifier.data()+2, "dundant_neg_operands", 20) != 0)
730 break;
731 return 162; // "redundant_neg_operands"
732 case 'i': // 1 string to match.
733 if (memcmp(RuleIdentifier.data()+2, "ght_identity_one_int", 20) != 0)
734 break;
735 return 77; // "right_identity_one_int"
736 }
737 break;
738 case 's': // 1 string to match.
739 if (memcmp(RuleIdentifier.data()+1, "hl_ashr_to_sext_inreg", 21) != 0)
740 break;
741 return 94; // "shl_ashr_to_sext_inreg"
742 case 't': // 1 string to match.
743 if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold", 21) != 0)
744 break;
745 return 81; // "trunc_buildvector_fold"
746 }
747 break;
748 case 23: // 4 strings to match.
749 switch (RuleIdentifier[0]) {
750 default: break;
751 case 'f': // 1 string to match.
752 if (memcmp(RuleIdentifier.data()+1, "unnel_shift_right_zero", 22) != 0)
753 break;
754 return 142; // "funnel_shift_right_zero"
755 case 'i': // 2 strings to match.
756 if (memcmp(RuleIdentifier.data()+1, "tof_const_zero_fold_", 20) != 0)
757 break;
758 switch (RuleIdentifier[21]) {
759 default: break;
760 case 's': // 1 string to match.
761 if (RuleIdentifier[22] != 'i')
762 break;
763 return 125; // "itof_const_zero_fold_si"
764 case 'u': // 1 string to match.
765 if (RuleIdentifier[22] != 'i')
766 break;
767 return 126; // "itof_const_zero_fold_ui"
768 }
769 break;
770 case 'p': // 1 string to match.
771 if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_all_ops", 22) != 0)
772 break;
773 return 63; // "propagate_undef_all_ops"
774 }
775 break;
776 case 24: // 5 strings to match.
777 switch (RuleIdentifier[0]) {
778 default: break;
779 case 'b': // 1 string to match.
780 if (memcmp(RuleIdentifier.data()+1, "inop_left_undef_to_zero", 23) != 0)
781 break;
782 return 59; // "binop_left_undef_to_zero"
783 case 'm': // 1 string to match.
784 if (memcmp(RuleIdentifier.data()+1, "atch_extract_of_element", 23) != 0)
785 break;
786 return 17; // "match_extract_of_element"
787 case 'n': // 1 string to match.
788 if (memcmp(RuleIdentifier.data()+1, "arrow_binop_feeding_and", 23) != 0)
789 break;
790 return 97; // "narrow_binop_feeding_and"
791 case 's': // 1 string to match.
792 if (memcmp(RuleIdentifier.data()+1, "ext_inreg_to_zext_inreg", 23) != 0)
793 break;
794 return 109; // "sext_inreg_to_zext_inreg"
795 case 'x': // 1 string to match.
796 if (memcmp(RuleIdentifier.data()+1, "or_of_and_with_same_reg", 23) != 0)
797 break;
798 return 134; // "xor_of_and_with_same_reg"
799 }
800 break;
801 case 25: // 5 strings to match.
802 switch (RuleIdentifier[0]) {
803 default: break;
804 case 'b': // 3 strings to match.
805 switch (RuleIdentifier[1]) {
806 default: break;
807 case 'i': // 2 strings to match.
808 if (memcmp(RuleIdentifier.data()+2, "tfield_extract_from_", 20) != 0)
809 break;
810 switch (RuleIdentifier[22]) {
811 default: break;
812 case 'a': // 1 string to match.
813 if (memcmp(RuleIdentifier.data()+23, "nd", 2) != 0)
814 break;
815 return 149; // "bitfield_extract_from_and"
816 case 's': // 1 string to match.
817 if (memcmp(RuleIdentifier.data()+23, "hr", 2) != 0)
818 break;
819 return 150; // "bitfield_extract_from_shr"
820 }
821 break;
822 case 'u': // 1 string to match.
823 if (memcmp(RuleIdentifier.data()+2, "ildvector_identity_fold", 23) != 0)
824 break;
825 return 80; // "buildvector_identity_fold"
826 }
827 break;
828 case 'e': // 1 string to match.
829 if (memcmp(RuleIdentifier.data()+1, "xtract_vec_elt_build_vec", 24) != 0)
830 break;
831 return 51; // "extract_vec_elt_build_vec"
832 case 'r': // 1 string to match.
833 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_one_fp", 24) != 0)
834 break;
835 return 86; // "right_identity_neg_one_fp"
836 }
837 break;
838 case 26: // 4 strings to match.
839 switch (RuleIdentifier[0]) {
840 default: break;
841 case 'b': // 1 string to match.
842 if (memcmp(RuleIdentifier.data()+1, "inop_right_undef_to_undef", 25) != 0)
843 break;
844 return 60; // "binop_right_undef_to_undef"
845 case 'c': // 1 string to match.
846 if (memcmp(RuleIdentifier.data()+1, "ommute_fp_constant_to_rhs", 25) != 0)
847 break;
848 return 178; // "commute_fp_constant_to_rhs"
849 case 'f': // 1 string to match.
850 if (memcmp(RuleIdentifier.data()+1, "unnel_shift_from_or_shift", 25) != 0)
851 break;
852 return 140; // "funnel_shift_from_or_shift"
853 case 'r': // 1 string to match.
854 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp", 25) != 0)
855 break;
856 return 85; // "right_identity_neg_zero_fp"
857 }
858 break;
859 case 27: // 4 strings to match.
860 switch (RuleIdentifier[0]) {
861 default: break;
862 case 'c': // 1 string to match.
863 if (memcmp(RuleIdentifier.data()+1, "ommute_int_constant_to_rhs", 26) != 0)
864 break;
865 return 177; // "commute_int_constant_to_rhs"
866 case 'd': // 1 string to match.
867 if (memcmp(RuleIdentifier.data()+1, "ouble_icmp_zero_or_combine", 26) != 0)
868 break;
869 return 183; // "double_icmp_zero_or_combine"
870 case 'r': // 1 string to match.
871 if (memcmp(RuleIdentifier.data()+1, "edundant_binop_in_equality", 26) != 0)
872 break;
873 return 175; // "redundant_binop_in_equality"
874 case 't': // 1 string to match.
875 if (memcmp(RuleIdentifier.data()+1, "runc_lshr_buildvector_fold", 26) != 0)
876 break;
877 return 82; // "trunc_lshr_buildvector_fold"
878 }
879 break;
880 case 28: // 4 strings to match.
881 switch (RuleIdentifier[0]) {
882 default: break;
883 case 'd': // 1 string to match.
884 if (memcmp(RuleIdentifier.data()+1, "ouble_icmp_zero_and_combine", 27) != 0)
885 break;
886 return 182; // "double_icmp_zero_and_combine"
887 case 'o': // 1 string to match.
888 if (memcmp(RuleIdentifier.data()+1, "pt_brcond_by_inverting_cond", 27) != 0)
889 break;
890 return 112; // "opt_brcond_by_inverting_cond"
891 case 'p': // 1 string to match.
892 if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_shuffle_mask", 27) != 0)
893 break;
894 return 64; // "propagate_undef_shuffle_mask"
895 case 's': // 1 string to match.
896 if (memcmp(RuleIdentifier.data()+1, "hift_of_shifted_logic_chain", 27) != 0)
897 break;
898 return 137; // "shift_of_shifted_logic_chain"
899 }
900 break;
901 case 29: // 3 strings to match.
902 switch (RuleIdentifier[0]) {
903 default: break;
904 case 'b': // 1 string to match.
905 if (memcmp(RuleIdentifier.data()+1, "itfield_extract_from_shr_and", 28) != 0)
906 break;
907 return 151; // "bitfield_extract_from_shr_and"
908 case 'c': // 1 string to match.
909 if (memcmp(RuleIdentifier.data()+1, "ombine_extracted_vector_load", 28) != 0)
910 break;
911 return 55; // "combine_extracted_vector_load"
912 case 'i': // 1 string to match.
913 if (memcmp(RuleIdentifier.data()+1, "cmp_to_true_false_known_bits", 28) != 0)
914 break;
915 return 107; // "icmp_to_true_false_known_bits"
916 }
917 break;
918 case 30: // 1 string to match.
919 if (memcmp(RuleIdentifier.data()+0, "freeze_of_non_undef_non_poison", 30) != 0)
920 break;
921 return 48; // "freeze_of_non_undef_non_poison"
922 case 31: // 2 strings to match.
923 if (memcmp(RuleIdentifier.data()+0, "insert_vector_element_", 22) != 0)
924 break;
925 switch (RuleIdentifier[22]) {
926 default: break;
927 case 'e': // 1 string to match.
928 if (memcmp(RuleIdentifier.data()+23, "lt_undef", 8) != 0)
929 break;
930 return 16; // "insert_vector_element_elt_undef"
931 case 'i': // 1 string to match.
932 if (memcmp(RuleIdentifier.data()+23, "dx_undef", 8) != 0)
933 break;
934 return 15; // "insert_vector_element_idx_undef"
935 }
936 break;
937 case 32: // 4 strings to match.
938 switch (RuleIdentifier[0]) {
939 default: break;
940 case 'b': // 1 string to match.
941 if (memcmp(RuleIdentifier.data()+1, "itfield_extract_from_sext_inreg", 31) != 0)
942 break;
943 return 148; // "bitfield_extract_from_sext_inreg"
944 case 'c': // 2 strings to match.
945 if (memcmp(RuleIdentifier.data()+1, "ombine_f", 8) != 0)
946 break;
947 switch (RuleIdentifier[9]) {
948 default: break;
949 case 'a': // 1 string to match.
950 if (memcmp(RuleIdentifier.data()+10, "dd_fmul_to_fmad_or_fma", 22) != 0)
951 break;
952 return 164; // "combine_fadd_fmul_to_fmad_or_fma"
953 case 's': // 1 string to match.
954 if (memcmp(RuleIdentifier.data()+10, "ub_fmul_to_fmad_or_fma", 22) != 0)
955 break;
956 return 168; // "combine_fsub_fmul_to_fmad_or_fma"
957 }
958 break;
959 case 'e': // 1 string to match.
960 if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_not_const", 31) != 0)
961 break;
962 return 19; // "extract_vector_element_not_const"
963 }
964 break;
965 case 34: // 1 string to match.
966 if (memcmp(RuleIdentifier.data()+0, "extract_all_elts_from_build_vector", 34) != 0)
967 break;
968 return 52; // "extract_all_elts_from_build_vector"
969 case 36: // 11 strings to match.
970 switch (RuleIdentifier[0]) {
971 default: break;
972 case 'c': // 2 strings to match.
973 if (memcmp(RuleIdentifier.data()+1, "ombine_", 7) != 0)
974 break;
975 switch (RuleIdentifier[8]) {
976 default: break;
977 case 'f': // 1 string to match.
978 if (memcmp(RuleIdentifier.data()+9, "add_fma_fmul_to_fmad_or_fma", 27) != 0)
979 break;
980 return 166; // "combine_fadd_fma_fmul_to_fmad_or_fma"
981 case 'i': // 1 string to match.
982 if (memcmp(RuleIdentifier.data()+9, "nsert_vec_elts_build_vector", 27) != 0)
983 break;
984 return 50; // "combine_insert_vec_elts_build_vector"
985 }
986 break;
987 case 'e': // 7 strings to match.
988 if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_build_vector", 34) != 0)
989 break;
990 switch (RuleIdentifier[35]) {
991 default: break;
992 case '2': // 1 string to match.
993 return 21; // "extract_vector_element_build_vector2"
994 case '3': // 1 string to match.
995 return 22; // "extract_vector_element_build_vector3"
996 case '4': // 1 string to match.
997 return 23; // "extract_vector_element_build_vector4"
998 case '5': // 1 string to match.
999 return 24; // "extract_vector_element_build_vector5"
1000 case '7': // 1 string to match.
1001 return 25; // "extract_vector_element_build_vector7"
1002 case '8': // 1 string to match.
1003 return 26; // "extract_vector_element_build_vector8"
1004 case '9': // 1 string to match.
1005 return 27; // "extract_vector_element_build_vector9"
1006 }
1007 break;
1008 case 'i': // 1 string to match.
1009 if (memcmp(RuleIdentifier.data()+1, "nsert_extract_vec_elt_out_of_bounds", 35) != 0)
1010 break;
1011 return 67; // "insert_extract_vec_elt_out_of_bounds"
1012 case 'm': // 1 string to match.
1013 if (memcmp(RuleIdentifier.data()+1, "atch_extract_of_element_undef_index", 35) != 0)
1014 break;
1015 return 14; // "match_extract_of_element_undef_index"
1016 }
1017 break;
1018 case 37: // 11 strings to match.
1019 switch (RuleIdentifier[0]) {
1020 default: break;
1021 case 'c': // 1 string to match.
1022 if (memcmp(RuleIdentifier.data()+1, "ombine_fsub_fneg_fmul_to_fmad_or_fma", 36) != 0)
1023 break;
1024 return 169; // "combine_fsub_fneg_fmul_to_fmad_or_fma"
1025 case 'e': // 8 strings to match.
1026 if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_", 22) != 0)
1027 break;
1028 switch (RuleIdentifier[23]) {
1029 default: break;
1030 case 'b': // 7 strings to match.
1031 if (memcmp(RuleIdentifier.data()+24, "uild_vector1", 12) != 0)
1032 break;
1033 switch (RuleIdentifier[36]) {
1034 default: break;
1035 case '0': // 1 string to match.
1036 return 28; // "extract_vector_element_build_vector10"
1037 case '1': // 1 string to match.
1038 return 29; // "extract_vector_element_build_vector11"
1039 case '2': // 1 string to match.
1040 return 30; // "extract_vector_element_build_vector12"
1041 case '3': // 1 string to match.
1042 return 31; // "extract_vector_element_build_vector13"
1043 case '4': // 1 string to match.
1044 return 32; // "extract_vector_element_build_vector14"
1045 case '5': // 1 string to match.
1046 return 33; // "extract_vector_element_build_vector15"
1047 case '6': // 1 string to match.
1048 return 34; // "extract_vector_element_build_vector16"
1049 }
1050 break;
1051 case 's': // 1 string to match.
1052 if (memcmp(RuleIdentifier.data()+24, "huffle_vector", 13) != 0)
1053 break;
1054 return 42; // "extract_vector_element_shuffle_vector"
1055 }
1056 break;
1057 case 'h': // 1 string to match.
1058 if (memcmp(RuleIdentifier.data()+1, "oist_logic_op_with_same_opcode_hands", 36) != 0)
1059 break;
1060 return 89; // "hoist_logic_op_with_same_opcode_hands"
1061 case 'm': // 1 string to match.
1062 if (memcmp(RuleIdentifier.data()+1, "atch_extract_of_element_undef_vector", 36) != 0)
1063 break;
1064 return 13; // "match_extract_of_element_undef_vector"
1065 }
1066 break;
1067 case 38: // 2 strings to match.
1068 if (memcmp(RuleIdentifier.data()+0, "combine_f", 9) != 0)
1069 break;
1070 switch (RuleIdentifier[9]) {
1071 default: break;
1072 case 'a': // 1 string to match.
1073 if (memcmp(RuleIdentifier.data()+10, "dd_fpext_fmul_to_fmad_or_fma", 28) != 0)
1074 break;
1075 return 165; // "combine_fadd_fpext_fmul_to_fmad_or_fma"
1076 case 's': // 1 string to match.
1077 if (memcmp(RuleIdentifier.data()+10, "ub_fpext_fmul_to_fmad_or_fma", 28) != 0)
1078 break;
1079 return 170; // "combine_fsub_fpext_fmul_to_fmad_or_fma"
1080 }
1081 break;
1082 case 40: // 1 string to match.
1083 if (memcmp(RuleIdentifier.data()+0, "extract_vector_element_different_indices", 40) != 0)
1084 break;
1085 return 20; // "extract_vector_element_different_indices"
1086 case 42: // 8 strings to match.
1087 switch (RuleIdentifier[0]) {
1088 default: break;
1089 case 'c': // 1 string to match.
1090 if (memcmp(RuleIdentifier.data()+1, "ombine_fadd_fpext_fma_fmul_to_fmad_or_fma", 41) != 0)
1091 break;
1092 return 167; // "combine_fadd_fpext_fma_fmul_to_fmad_or_fma"
1093 case 'e': // 7 strings to match.
1094 if (memcmp(RuleIdentifier.data()+1, "xtract_vector_element_build_vector_trunc", 40) != 0)
1095 break;
1096 switch (RuleIdentifier[41]) {
1097 default: break;
1098 case '2': // 1 string to match.
1099 return 35; // "extract_vector_element_build_vector_trunc2"
1100 case '3': // 1 string to match.
1101 return 36; // "extract_vector_element_build_vector_trunc3"
1102 case '4': // 1 string to match.
1103 return 37; // "extract_vector_element_build_vector_trunc4"
1104 case '5': // 1 string to match.
1105 return 38; // "extract_vector_element_build_vector_trunc5"
1106 case '6': // 1 string to match.
1107 return 39; // "extract_vector_element_build_vector_trunc6"
1108 case '7': // 1 string to match.
1109 return 40; // "extract_vector_element_build_vector_trunc7"
1110 case '8': // 1 string to match.
1111 return 41; // "extract_vector_element_build_vector_trunc8"
1112 }
1113 break;
1114 }
1115 break;
1116 case 43: // 1 string to match.
1117 if (memcmp(RuleIdentifier.data()+0, "combine_fsub_fpext_fneg_fmul_to_fmad_or_fma", 43) != 0)
1118 break;
1119 return 171; // "combine_fsub_fpext_fneg_fmul_to_fmad_or_fma"
1120 case 44: // 1 string to match.
1121 if (memcmp(RuleIdentifier.data()+0, "insert_vector_element_extract_vector_element", 44) != 0)
1122 break;
1123 return 43; // "insert_vector_element_extract_vector_element"
1124 case 46: // 1 string to match.
1125 if (memcmp(RuleIdentifier.data()+0, "push_freeze_to_prevent_poison_from_propagating", 46) != 0)
1126 break;
1127 return 49; // "push_freeze_to_prevent_poison_from_propagating"
1128 }
1129#endif // ifndef NDEBUG
1130
1131 return std::nullopt;
1132}
1133static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
1134 std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
1135 if (!RangePair.second.empty()) {
1136 const auto First = getRuleIdxForIdentifier(RangePair.first);
1137 const auto Last = getRuleIdxForIdentifier(RangePair.second);
1138 if (!First || !Last)
1139 return std::nullopt;
1140 if (First >= Last)
1141 report_fatal_error("Beginning of range should be before end of range");
1142 return {{*First, *Last + 1}};
1143 }
1144 if (RangePair.first == "*") {
1145 return {{0, 189}};
1146 }
1147 const auto I = getRuleIdxForIdentifier(RangePair.first);
1148 if (!I)
1149 return std::nullopt;
1150 return {{*I, *I + 1}};
1151}
1152
1153bool RISCVPreLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
1154 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
1155 if (!MaybeRange)
1156 return false;
1157 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
1158 DisabledRules.reset(I);
1159 return true;
1160}
1161
1162bool RISCVPreLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
1163 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
1164 if (!MaybeRange)
1165 return false;
1166 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
1167 DisabledRules.set(I);
1168 return true;
1169}
1170
1171static std::vector<std::string> RISCVPreLegalizerCombinerOption;
1172static cl::list<std::string> RISCVPreLegalizerCombinerDisableOption(
1173 "riscvprelegalizercombiner-disable-rule",
1174 cl::desc("Disable one or more combiner rules temporarily in the RISCVPreLegalizerCombiner pass"),
1175 cl::CommaSeparated,
1176 cl::Hidden,
1177 cl::cat(GICombinerOptionCategory),
1178 cl::callback([](const std::string &Str) {
1179 RISCVPreLegalizerCombinerOption.push_back(Str);
1180 }));
1181static cl::list<std::string> RISCVPreLegalizerCombinerOnlyEnableOption(
1182 "riscvprelegalizercombiner-only-enable-rule",
1183 cl::desc("Disable all rules in the RISCVPreLegalizerCombiner pass then re-enable the specified ones"),
1184 cl::Hidden,
1185 cl::cat(GICombinerOptionCategory),
1186 cl::callback([](const std::string &CommaSeparatedArg) {
1187 StringRef Str = CommaSeparatedArg;
1188 RISCVPreLegalizerCombinerOption.push_back("*");
1189 do {
1190 auto X = Str.split(",");
1191 RISCVPreLegalizerCombinerOption.push_back(("!" + X.first).str());
1192 Str = X.second;
1193 } while (!Str.empty());
1194 }));
1195
1196
1197bool RISCVPreLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
1198 return !DisabledRules.test(RuleID);
1199}
1200bool RISCVPreLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
1201 for (StringRef Identifier : RISCVPreLegalizerCombinerOption) {
1202 bool Enabled = Identifier.consume_front("!");
1203 if (Enabled && !setRuleEnabled(Identifier))
1204 return false;
1205 if (!Enabled && !setRuleDisabled(Identifier))
1206 return false;
1207 }
1208 return true;
1209}
1210
1211#endif // ifdef GET_GICOMBINER_TYPES
1212
1213#ifdef GET_GICOMBINER_TYPES
1214const unsigned MAX_SUBTARGET_PREDICATES = 0;
1215using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
1216#endif // ifdef GET_GICOMBINER_TYPES
1217
1218#ifdef GET_GICOMBINER_CLASS_MEMBERS
1219PredicateBitset AvailableModuleFeatures;
1220mutable PredicateBitset AvailableFunctionFeatures;
1221PredicateBitset getAvailableFeatures() const {
1222 return AvailableModuleFeatures | AvailableFunctionFeatures;
1223}
1224PredicateBitset
1225computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const;
1226PredicateBitset
1227computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget,
1228 const MachineFunction *MF) const;
1229void setupGeneratedPerFunctionState(MachineFunction &MF) override;
1230#endif // ifdef GET_GICOMBINER_CLASS_MEMBERS
1231#ifdef GET_GICOMBINER_CLASS_MEMBERS
1232 mutable MatcherState State;
1233 typedef ComplexRendererFns(RISCVPreLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
1234 typedef void(RISCVPreLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
1235 const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
1236 static RISCVPreLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
1237 static RISCVPreLegalizerCombinerImpl::CustomRendererFn CustomRenderers[];
1238 bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
1239 bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
1240 bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
1241 const uint8_t *getMatchTable() const override;
1242 bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
1243 bool testSimplePredicate(unsigned PredicateID) const override;
1244 bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
1245#endif // ifdef GET_GICOMBINER_CLASS_MEMBERS
1246
1247#ifdef GET_GICOMBINER_IMPL
1248// LLT Objects.
1249enum {
1250 GILLT_s1,
1251};
1252const static size_t NumTypeObjects = 1;
1253const static LLT TypeObjects[] = {
1254 LLT::scalar(1),
1255};
1256
1257// Bits for subtarget features that participate in instruction matching.
1258enum SubtargetFeatureBits : uint8_t {
1259};
1260
1261PredicateBitset RISCVPreLegalizerCombinerImpl::
1262computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const {
1263 PredicateBitset Features{};
1264 return Features;
1265}
1266
1267void RISCVPreLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
1268 AvailableFunctionFeatures = computeAvailableFunctionFeatures((const RISCVSubtarget *)&MF.getSubtarget(), &MF);
1269}
1270PredicateBitset RISCVPreLegalizerCombinerImpl::
1271computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, const MachineFunction *MF) const {
1272 PredicateBitset Features{};
1273 return Features;
1274}
1275
1276// Feature bitsets.
1277enum {
1278 GIFBS_Invalid,
1279};
1280constexpr static PredicateBitset FeatureBitsets[] {
1281 {}, // GIFBS_Invalid
1282};
1283
1284// ComplexPattern predicates.
1285enum {
1286 GICP_Invalid,
1287};
1288// See constructor for table contents
1289
1290RISCVPreLegalizerCombinerImpl::ComplexMatcherMemFn
1291RISCVPreLegalizerCombinerImpl::ComplexPredicateFns[] = {
1292 nullptr, // GICP_Invalid
1293};
1294
1295enum {
1296 GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1,
1297 GICXXPred_MI_Predicate_GICombiner1,
1298 GICXXPred_MI_Predicate_GICombiner2,
1299 GICXXPred_MI_Predicate_GICombiner3,
1300 GICXXPred_MI_Predicate_GICombiner4,
1301 GICXXPred_MI_Predicate_GICombiner5,
1302 GICXXPred_MI_Predicate_GICombiner6,
1303 GICXXPred_MI_Predicate_GICombiner7,
1304 GICXXPred_MI_Predicate_GICombiner8,
1305};
1306bool RISCVPreLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
1307 switch (PredicateID) {
1308 case GICXXPred_MI_Predicate_GICombiner0: {
1309 return isGuaranteedNotToBePoison(State.MIs[0]->getOperand(1).getReg(), MRI);
1310 }
1311 case GICXXPred_MI_Predicate_GICombiner1: {
1312 return isGuaranteedNotToBeUndefOrPoison(State.MIs[0]->getOperand(1).getReg(), MRI);
1313 }
1314 case GICXXPred_MI_Predicate_GICombiner2: {
1315 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0);
1316 }
1317 case GICXXPred_MI_Predicate_GICombiner3: {
1318 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0);
1319 }
1320 case GICXXPred_MI_Predicate_GICombiner4: {
1321 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0);
1322 }
1323 case GICXXPred_MI_Predicate_GICombiner5: {
1324 return Helper.isLegalOrBeforeLegalizer({TargetOpcode::G_LSHR,
1325 {MRI.getType(State.MIs[2]->getOperand(1).getReg()),
1326 MRI.getType(State.MIs[1]->getOperand(2).getReg())}});
1327 }
1328 case GICXXPred_MI_Predicate_GICombiner6: {
1329 return Helper.isLegalOrBeforeLegalizer({TargetOpcode::G_SHL,
1330 {MRI.getType(State.MIs[2]->getOperand(1).getReg()),
1331 MRI.getType(State.MIs[1]->getOperand(2).getReg())}});
1332 }
1333 case GICXXPred_MI_Predicate_GICombiner7: {
1334 return State.MIs[1]->getOperand(1).getPredicate() == CmpInst::ICMP_EQ &&
1335 !MRI.getType(State.MIs[1]->getOperand(2).getReg()).getScalarType().isPointer() &&
1336 (MRI.getType(State.MIs[1]->getOperand(2).getReg()) ==
1337 MRI.getType(State.MIs[2]->getOperand(2).getReg()));
1338 }
1339 case GICXXPred_MI_Predicate_GICombiner8: {
1340 return State.MIs[1]->getOperand(1).getPredicate() == CmpInst::ICMP_NE &&
1341 !MRI.getType(State.MIs[1]->getOperand(2).getReg()).getScalarType().isPointer() &&
1342 (MRI.getType(State.MIs[1]->getOperand(2).getReg()) ==
1343 MRI.getType(State.MIs[2]->getOperand(2).getReg()));
1344 }
1345 }
1346 llvm_unreachable("Unknown predicate");
1347 return false;
1348}
1349bool RISCVPreLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
1350 llvm_unreachable("Unknown predicate");
1351 return false;
1352}
1353bool RISCVPreLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
1354 llvm_unreachable("Unknown predicate");
1355 return false;
1356}
1357bool RISCVPreLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
1358 llvm_unreachable("Unknown predicate");
1359 return false;
1360}
1361enum {
1362 GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
1363 GICXXPred_Simple_IsRule1Enabled,
1364 GICXXPred_Simple_IsRule2Enabled,
1365 GICXXPred_Simple_IsRule3Enabled,
1366 GICXXPred_Simple_IsRule4Enabled,
1367 GICXXPred_Simple_IsRule5Enabled,
1368 GICXXPred_Simple_IsRule6Enabled,
1369 GICXXPred_Simple_IsRule7Enabled,
1370 GICXXPred_Simple_IsRule8Enabled,
1371 GICXXPred_Simple_IsRule9Enabled,
1372 GICXXPred_Simple_IsRule10Enabled,
1373 GICXXPred_Simple_IsRule11Enabled,
1374 GICXXPred_Simple_IsRule12Enabled,
1375 GICXXPred_Simple_IsRule13Enabled,
1376 GICXXPred_Simple_IsRule14Enabled,
1377 GICXXPred_Simple_IsRule15Enabled,
1378 GICXXPred_Simple_IsRule16Enabled,
1379 GICXXPred_Simple_IsRule17Enabled,
1380 GICXXPred_Simple_IsRule18Enabled,
1381 GICXXPred_Simple_IsRule19Enabled,
1382 GICXXPred_Simple_IsRule20Enabled,
1383 GICXXPred_Simple_IsRule21Enabled,
1384 GICXXPred_Simple_IsRule22Enabled,
1385 GICXXPred_Simple_IsRule23Enabled,
1386 GICXXPred_Simple_IsRule24Enabled,
1387 GICXXPred_Simple_IsRule25Enabled,
1388 GICXXPred_Simple_IsRule26Enabled,
1389 GICXXPred_Simple_IsRule27Enabled,
1390 GICXXPred_Simple_IsRule28Enabled,
1391 GICXXPred_Simple_IsRule29Enabled,
1392 GICXXPred_Simple_IsRule30Enabled,
1393 GICXXPred_Simple_IsRule31Enabled,
1394 GICXXPred_Simple_IsRule32Enabled,
1395 GICXXPred_Simple_IsRule33Enabled,
1396 GICXXPred_Simple_IsRule34Enabled,
1397 GICXXPred_Simple_IsRule35Enabled,
1398 GICXXPred_Simple_IsRule36Enabled,
1399 GICXXPred_Simple_IsRule37Enabled,
1400 GICXXPred_Simple_IsRule38Enabled,
1401 GICXXPred_Simple_IsRule39Enabled,
1402 GICXXPred_Simple_IsRule40Enabled,
1403 GICXXPred_Simple_IsRule41Enabled,
1404 GICXXPred_Simple_IsRule42Enabled,
1405 GICXXPred_Simple_IsRule43Enabled,
1406 GICXXPred_Simple_IsRule44Enabled,
1407 GICXXPred_Simple_IsRule45Enabled,
1408 GICXXPred_Simple_IsRule46Enabled,
1409 GICXXPred_Simple_IsRule47Enabled,
1410 GICXXPred_Simple_IsRule48Enabled,
1411 GICXXPred_Simple_IsRule49Enabled,
1412 GICXXPred_Simple_IsRule50Enabled,
1413 GICXXPred_Simple_IsRule51Enabled,
1414 GICXXPred_Simple_IsRule52Enabled,
1415 GICXXPred_Simple_IsRule53Enabled,
1416 GICXXPred_Simple_IsRule54Enabled,
1417 GICXXPred_Simple_IsRule55Enabled,
1418 GICXXPred_Simple_IsRule56Enabled,
1419 GICXXPred_Simple_IsRule57Enabled,
1420 GICXXPred_Simple_IsRule58Enabled,
1421 GICXXPred_Simple_IsRule59Enabled,
1422 GICXXPred_Simple_IsRule60Enabled,
1423 GICXXPred_Simple_IsRule61Enabled,
1424 GICXXPred_Simple_IsRule62Enabled,
1425 GICXXPred_Simple_IsRule63Enabled,
1426 GICXXPred_Simple_IsRule64Enabled,
1427 GICXXPred_Simple_IsRule65Enabled,
1428 GICXXPred_Simple_IsRule66Enabled,
1429 GICXXPred_Simple_IsRule67Enabled,
1430 GICXXPred_Simple_IsRule68Enabled,
1431 GICXXPred_Simple_IsRule69Enabled,
1432 GICXXPred_Simple_IsRule70Enabled,
1433 GICXXPred_Simple_IsRule71Enabled,
1434 GICXXPred_Simple_IsRule72Enabled,
1435 GICXXPred_Simple_IsRule73Enabled,
1436 GICXXPred_Simple_IsRule74Enabled,
1437 GICXXPred_Simple_IsRule75Enabled,
1438 GICXXPred_Simple_IsRule76Enabled,
1439 GICXXPred_Simple_IsRule77Enabled,
1440 GICXXPred_Simple_IsRule78Enabled,
1441 GICXXPred_Simple_IsRule79Enabled,
1442 GICXXPred_Simple_IsRule80Enabled,
1443 GICXXPred_Simple_IsRule81Enabled,
1444 GICXXPred_Simple_IsRule82Enabled,
1445 GICXXPred_Simple_IsRule83Enabled,
1446 GICXXPred_Simple_IsRule84Enabled,
1447 GICXXPred_Simple_IsRule85Enabled,
1448 GICXXPred_Simple_IsRule86Enabled,
1449 GICXXPred_Simple_IsRule87Enabled,
1450 GICXXPred_Simple_IsRule88Enabled,
1451 GICXXPred_Simple_IsRule89Enabled,
1452 GICXXPred_Simple_IsRule90Enabled,
1453 GICXXPred_Simple_IsRule91Enabled,
1454 GICXXPred_Simple_IsRule92Enabled,
1455 GICXXPred_Simple_IsRule93Enabled,
1456 GICXXPred_Simple_IsRule94Enabled,
1457 GICXXPred_Simple_IsRule95Enabled,
1458 GICXXPred_Simple_IsRule96Enabled,
1459 GICXXPred_Simple_IsRule97Enabled,
1460 GICXXPred_Simple_IsRule98Enabled,
1461 GICXXPred_Simple_IsRule99Enabled,
1462 GICXXPred_Simple_IsRule100Enabled,
1463 GICXXPred_Simple_IsRule101Enabled,
1464 GICXXPred_Simple_IsRule102Enabled,
1465 GICXXPred_Simple_IsRule103Enabled,
1466 GICXXPred_Simple_IsRule104Enabled,
1467 GICXXPred_Simple_IsRule105Enabled,
1468 GICXXPred_Simple_IsRule106Enabled,
1469 GICXXPred_Simple_IsRule107Enabled,
1470 GICXXPred_Simple_IsRule108Enabled,
1471 GICXXPred_Simple_IsRule109Enabled,
1472 GICXXPred_Simple_IsRule110Enabled,
1473 GICXXPred_Simple_IsRule111Enabled,
1474 GICXXPred_Simple_IsRule112Enabled,
1475 GICXXPred_Simple_IsRule113Enabled,
1476 GICXXPred_Simple_IsRule114Enabled,
1477 GICXXPred_Simple_IsRule115Enabled,
1478 GICXXPred_Simple_IsRule116Enabled,
1479 GICXXPred_Simple_IsRule117Enabled,
1480 GICXXPred_Simple_IsRule118Enabled,
1481 GICXXPred_Simple_IsRule119Enabled,
1482 GICXXPred_Simple_IsRule120Enabled,
1483 GICXXPred_Simple_IsRule121Enabled,
1484 GICXXPred_Simple_IsRule122Enabled,
1485 GICXXPred_Simple_IsRule123Enabled,
1486 GICXXPred_Simple_IsRule124Enabled,
1487 GICXXPred_Simple_IsRule125Enabled,
1488 GICXXPred_Simple_IsRule126Enabled,
1489 GICXXPred_Simple_IsRule127Enabled,
1490 GICXXPred_Simple_IsRule128Enabled,
1491 GICXXPred_Simple_IsRule129Enabled,
1492 GICXXPred_Simple_IsRule130Enabled,
1493 GICXXPred_Simple_IsRule131Enabled,
1494 GICXXPred_Simple_IsRule132Enabled,
1495 GICXXPred_Simple_IsRule133Enabled,
1496 GICXXPred_Simple_IsRule134Enabled,
1497 GICXXPred_Simple_IsRule135Enabled,
1498 GICXXPred_Simple_IsRule136Enabled,
1499 GICXXPred_Simple_IsRule137Enabled,
1500 GICXXPred_Simple_IsRule138Enabled,
1501 GICXXPred_Simple_IsRule139Enabled,
1502 GICXXPred_Simple_IsRule140Enabled,
1503 GICXXPred_Simple_IsRule141Enabled,
1504 GICXXPred_Simple_IsRule142Enabled,
1505 GICXXPred_Simple_IsRule143Enabled,
1506 GICXXPred_Simple_IsRule144Enabled,
1507 GICXXPred_Simple_IsRule145Enabled,
1508 GICXXPred_Simple_IsRule146Enabled,
1509 GICXXPred_Simple_IsRule147Enabled,
1510 GICXXPred_Simple_IsRule148Enabled,
1511 GICXXPred_Simple_IsRule149Enabled,
1512 GICXXPred_Simple_IsRule150Enabled,
1513 GICXXPred_Simple_IsRule151Enabled,
1514 GICXXPred_Simple_IsRule152Enabled,
1515 GICXXPred_Simple_IsRule153Enabled,
1516 GICXXPred_Simple_IsRule154Enabled,
1517 GICXXPred_Simple_IsRule155Enabled,
1518 GICXXPred_Simple_IsRule156Enabled,
1519 GICXXPred_Simple_IsRule157Enabled,
1520 GICXXPred_Simple_IsRule158Enabled,
1521 GICXXPred_Simple_IsRule159Enabled,
1522 GICXXPred_Simple_IsRule160Enabled,
1523 GICXXPred_Simple_IsRule161Enabled,
1524 GICXXPred_Simple_IsRule162Enabled,
1525 GICXXPred_Simple_IsRule163Enabled,
1526 GICXXPred_Simple_IsRule164Enabled,
1527 GICXXPred_Simple_IsRule165Enabled,
1528 GICXXPred_Simple_IsRule166Enabled,
1529 GICXXPred_Simple_IsRule167Enabled,
1530 GICXXPred_Simple_IsRule168Enabled,
1531 GICXXPred_Simple_IsRule169Enabled,
1532 GICXXPred_Simple_IsRule170Enabled,
1533 GICXXPred_Simple_IsRule171Enabled,
1534 GICXXPred_Simple_IsRule172Enabled,
1535 GICXXPred_Simple_IsRule173Enabled,
1536 GICXXPred_Simple_IsRule174Enabled,
1537 GICXXPred_Simple_IsRule175Enabled,
1538 GICXXPred_Simple_IsRule176Enabled,
1539 GICXXPred_Simple_IsRule177Enabled,
1540 GICXXPred_Simple_IsRule178Enabled,
1541 GICXXPred_Simple_IsRule179Enabled,
1542 GICXXPred_Simple_IsRule180Enabled,
1543 GICXXPred_Simple_IsRule181Enabled,
1544 GICXXPred_Simple_IsRule182Enabled,
1545 GICXXPred_Simple_IsRule183Enabled,
1546 GICXXPred_Simple_IsRule184Enabled,
1547 GICXXPred_Simple_IsRule185Enabled,
1548 GICXXPred_Simple_IsRule186Enabled,
1549 GICXXPred_Simple_IsRule187Enabled,
1550 GICXXPred_Simple_IsRule188Enabled,
1551};
1552
1553bool RISCVPreLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
1554 return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
1555}
1556// Custom renderers.
1557enum {
1558 GICR_Invalid,
1559};
1560RISCVPreLegalizerCombinerImpl::CustomRendererFn
1561RISCVPreLegalizerCombinerImpl::CustomRenderers[] = {
1562 nullptr, // GICR_Invalid
1563};
1564
1565bool RISCVPreLegalizerCombinerImpl::tryCombineAll(MachineInstr &I) const {
1566 const TargetSubtargetInfo &ST = MF.getSubtarget();
1567 const PredicateBitset AvailableFeatures = getAvailableFeatures();
1568 B.setInstrAndDebugLoc(I);
1569 State.MIs.clear();
1570 State.MIs.push_back(&I);
1571 if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, /*CoverageInfo*/ nullptr)) {
1572 return true;
1573 }
1574
1575 return false;
1576}
1577
1578enum {
1579 GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
1580 GICXXCustomAction_GICombiner1,
1581 GICXXCustomAction_GICombiner2,
1582 GICXXCustomAction_GICombiner3,
1583 GICXXCustomAction_GICombiner4,
1584 GICXXCustomAction_GICombiner5,
1585 GICXXCustomAction_GICombiner6,
1586 GICXXCustomAction_GICombiner7,
1587 GICXXCustomAction_GICombiner8,
1588 GICXXCustomAction_GICombiner9,
1589 GICXXCustomAction_GICombiner10,
1590 GICXXCustomAction_GICombiner11,
1591 GICXXCustomAction_GICombiner12,
1592 GICXXCustomAction_GICombiner13,
1593 GICXXCustomAction_GICombiner14,
1594 GICXXCustomAction_GICombiner15,
1595 GICXXCustomAction_GICombiner16,
1596 GICXXCustomAction_GICombiner17,
1597 GICXXCustomAction_GICombiner18,
1598 GICXXCustomAction_GICombiner19,
1599 GICXXCustomAction_GICombiner20,
1600 GICXXCustomAction_GICombiner21,
1601 GICXXCustomAction_GICombiner22,
1602 GICXXCustomAction_GICombiner23,
1603 GICXXCustomAction_GICombiner24,
1604 GICXXCustomAction_GICombiner25,
1605 GICXXCustomAction_GICombiner26,
1606 GICXXCustomAction_GICombiner27,
1607 GICXXCustomAction_GICombiner28,
1608 GICXXCustomAction_GICombiner29,
1609 GICXXCustomAction_GICombiner30,
1610 GICXXCustomAction_GICombiner31,
1611 GICXXCustomAction_GICombiner32,
1612 GICXXCustomAction_GICombiner33,
1613 GICXXCustomAction_GICombiner34,
1614 GICXXCustomAction_GICombiner35,
1615 GICXXCustomAction_GICombiner36,
1616 GICXXCustomAction_GICombiner37,
1617 GICXXCustomAction_GICombiner38,
1618 GICXXCustomAction_GICombiner39,
1619 GICXXCustomAction_GICombiner40,
1620 GICXXCustomAction_GICombiner41,
1621 GICXXCustomAction_GICombiner42,
1622 GICXXCustomAction_GICombiner43,
1623 GICXXCustomAction_GICombiner44,
1624 GICXXCustomAction_GICombiner45,
1625 GICXXCustomAction_GICombiner46,
1626 GICXXCustomAction_GICombiner47,
1627 GICXXCustomAction_GICombiner48,
1628 GICXXCustomAction_GICombiner49,
1629 GICXXCustomAction_GICombiner50,
1630 GICXXCustomAction_GICombiner51,
1631 GICXXCustomAction_GICombiner52,
1632 GICXXCustomAction_GICombiner53,
1633 GICXXCustomAction_GICombiner54,
1634 GICXXCustomAction_GICombiner55,
1635 GICXXCustomAction_GICombiner56,
1636 GICXXCustomAction_GICombiner57,
1637 GICXXCustomAction_GICombiner58,
1638 GICXXCustomAction_GICombiner59,
1639 GICXXCustomAction_GICombiner60,
1640 GICXXCustomAction_GICombiner61,
1641 GICXXCustomAction_GICombiner62,
1642 GICXXCustomAction_GICombiner63,
1643 GICXXCustomAction_GICombiner64,
1644 GICXXCustomAction_GICombiner65,
1645 GICXXCustomAction_GICombiner66,
1646 GICXXCustomAction_GICombiner67,
1647 GICXXCustomAction_GICombiner68,
1648 GICXXCustomAction_GICombiner69,
1649 GICXXCustomAction_GICombiner70,
1650 GICXXCustomAction_GICombiner71,
1651 GICXXCustomAction_GICombiner72,
1652 GICXXCustomAction_GICombiner73,
1653 GICXXCustomAction_GICombiner74,
1654 GICXXCustomAction_GICombiner75,
1655 GICXXCustomAction_GICombiner76,
1656 GICXXCustomAction_GICombiner77,
1657 GICXXCustomAction_GICombiner78,
1658 GICXXCustomAction_GICombiner79,
1659 GICXXCustomAction_GICombiner80,
1660 GICXXCustomAction_GICombiner81,
1661 GICXXCustomAction_GICombiner82,
1662 GICXXCustomAction_GICombiner83,
1663 GICXXCustomAction_GICombiner84,
1664 GICXXCustomAction_GICombiner85,
1665 GICXXCustomAction_GICombiner86,
1666 GICXXCustomAction_GICombiner87,
1667 GICXXCustomAction_GICombiner88,
1668 GICXXCustomAction_GICombiner89,
1669 GICXXCustomAction_GICombiner90,
1670 GICXXCustomAction_GICombiner91,
1671 GICXXCustomAction_GICombiner92,
1672 GICXXCustomAction_GICombiner93,
1673 GICXXCustomAction_GICombiner94,
1674 GICXXCustomAction_GICombiner95,
1675 GICXXCustomAction_GICombiner96,
1676 GICXXCustomAction_GICombiner97,
1677 GICXXCustomAction_GICombiner98,
1678 GICXXCustomAction_GICombiner99,
1679 GICXXCustomAction_GICombiner100,
1680 GICXXCustomAction_GICombiner101,
1681 GICXXCustomAction_GICombiner102,
1682 GICXXCustomAction_GICombiner103,
1683 GICXXCustomAction_GICombiner104,
1684 GICXXCustomAction_GICombiner105,
1685 GICXXCustomAction_GICombiner106,
1686 GICXXCustomAction_GICombiner107,
1687 GICXXCustomAction_GICombiner108,
1688 GICXXCustomAction_GICombiner109,
1689 GICXXCustomAction_GICombiner110,
1690 GICXXCustomAction_GICombiner111,
1691 GICXXCustomAction_GICombiner112,
1692 GICXXCustomAction_GICombiner113,
1693 GICXXCustomAction_GICombiner114,
1694 GICXXCustomAction_GICombiner115,
1695 GICXXCustomAction_GICombiner116,
1696 GICXXCustomAction_GICombiner117,
1697 GICXXCustomAction_GICombiner118,
1698 GICXXCustomAction_GICombiner119,
1699 GICXXCustomAction_GICombiner120,
1700 GICXXCustomAction_GICombiner121,
1701 GICXXCustomAction_GICombiner122,
1702 GICXXCustomAction_GICombiner123,
1703 GICXXCustomAction_GICombiner124,
1704 GICXXCustomAction_GICombiner125,
1705 GICXXCustomAction_GICombiner126,
1706 GICXXCustomAction_GICombiner127,
1707 GICXXCustomAction_GICombiner128,
1708};
1709bool RISCVPreLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
1710 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
1711 switch(ApplyID) {
1712 case GICXXCustomAction_GICombiner0:{
1713 // Match Patterns
1714 if(![&](){return Helper.matchCombineCopy(*State.MIs[0]);}()) {
1715 return false;
1716 }
1717 // Apply Patterns
1718 Helper.applyCombineCopy(*State.MIs[0]);
1719 return true;
1720 }
1721 case GICXXCustomAction_GICombiner1:{
1722 unsigned GIMatchData_matchinfo;
1723 // Match Patterns
1724 if(![&](){return Helper.matchCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);}()) {
1725 return false;
1726 }
1727 // Apply Patterns
1728 Helper.applyCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);
1729 return true;
1730 }
1731 case GICXXCustomAction_GICombiner2:{
1732 std::pair<Register, bool> GIMatchData_info;
1733 // Match Patterns
1734 if(![&](){return Helper.matchCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info);}()) {
1735 return false;
1736 }
1737 // Apply Patterns
1738 Helper.applyCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info);
1739 return true;
1740 }
1741 case GICXXCustomAction_GICombiner3:{
1742 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1743 // Match Patterns
1744 if(![&](){return Helper.matchExtractVectorElement(*State.MIs[0], GIMatchData_matchinfo);}()) {
1745 return false;
1746 }
1747 // Apply Patterns
1748 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1749 return true;
1750 }
1751 case GICXXCustomAction_GICombiner4:{
1752 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1753 // Match Patterns
1754 if(![&](){return Helper.matchInsertVectorElementOOB(*State.MIs[0], GIMatchData_matchinfo);}()) {
1755 return false;
1756 }
1757 // Apply Patterns
1758 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1759 return true;
1760 }
1761 case GICXXCustomAction_GICombiner5:{
1762 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1763 // Match Patterns
1764 if(![&](){return Helper.matchExtractVectorElementWithDifferentIndices(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1765 return false;
1766 }
1767 // Apply Patterns
1768 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1769 return true;
1770 }
1771 case GICXXCustomAction_GICombiner6:{
1772 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1773 // Match Patterns
1774 if(![&](){return Helper.matchExtractVectorElementWithBuildVector(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1775 return false;
1776 }
1777 // Apply Patterns
1778 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1779 return true;
1780 }
1781 case GICXXCustomAction_GICombiner7:{
1782 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1783 // Match Patterns
1784 if(![&](){return Helper.matchExtractVectorElementWithBuildVectorTrunc(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1785 return false;
1786 }
1787 // Apply Patterns
1788 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1789 return true;
1790 }
1791 case GICXXCustomAction_GICombiner8:{
1792 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1793 // Match Patterns
1794 if(![&](){return Helper.matchExtractVectorElementWithShuffleVector(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1795 return false;
1796 }
1797 // Apply Patterns
1798 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1799 return true;
1800 }
1801 case GICXXCustomAction_GICombiner9:{
1802 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1803 // Match Patterns
1804 if(![&](){return Helper.matchAddOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1805 return false;
1806 }
1807 // Apply Patterns
1808 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1809 return true;
1810 }
1811 case GICXXCustomAction_GICombiner10:{
1812 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1813 // Match Patterns
1814 if(![&](){return Helper.matchMulOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1815 return false;
1816 }
1817 // Apply Patterns
1818 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1819 return true;
1820 }
1821 case GICXXCustomAction_GICombiner11:{
1822 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1823 // Match Patterns
1824 if(![&](){return Helper.matchShlOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1825 return false;
1826 }
1827 // Apply Patterns
1828 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1829 return true;
1830 }
1831 case GICXXCustomAction_GICombiner12:{
1832 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1833 // Match Patterns
1834 if(![&](){return Helper.matchSubOfVScale(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
1835 return false;
1836 }
1837 // Apply Patterns
1838 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
1839 return true;
1840 }
1841 case GICXXCustomAction_GICombiner13:{
1842 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1843 // Match Patterns
1844 if(![&](){return !isGuaranteedNotToBePoison(State.MIs[0]->getOperand(1).getReg(), MRI) && Helper.matchFreezeOfSingleMaybePoisonOperand(*State.MIs[0], GIMatchData_matchinfo);}()) {
1845 return false;
1846 }
1847 // Apply Patterns
1848 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1849 return true;
1850 }
1851 case GICXXCustomAction_GICombiner14:{
1852 SmallVector<Register, 4> GIMatchData_info;
1853 // Match Patterns
1854 if(![&](){return Helper.matchCombineInsertVecElts(*State.MIs[0], GIMatchData_info);}()) {
1855 return false;
1856 }
1857 // Apply Patterns
1858 Helper.applyCombineInsertVecElts(*State.MIs[0], GIMatchData_info);
1859 return true;
1860 }
1861 case GICXXCustomAction_GICombiner15:{
1862 Register GIMatchData_matchinfo;
1863 // Match Patterns
1864 if(![&](){return Helper.matchExtractVecEltBuildVec(*State.MIs[0], GIMatchData_matchinfo);}()) {
1865 return false;
1866 }
1867 // Apply Patterns
1868 Helper.applyExtractVecEltBuildVec(*State.MIs[0], GIMatchData_matchinfo);
1869 return true;
1870 }
1871 case GICXXCustomAction_GICombiner16:{
1872 SmallVector<std::pair<Register, MachineInstr*>> GIMatchData_matchinfo;
1873 // Match Patterns
1874 if(![&](){return Helper.matchExtractAllEltsFromBuildVector(*State.MIs[0], GIMatchData_matchinfo);}()) {
1875 return false;
1876 }
1877 // Apply Patterns
1878 Helper.applyExtractAllEltsFromBuildVector(*State.MIs[0], GIMatchData_matchinfo);
1879 return true;
1880 }
1881 case GICXXCustomAction_GICombiner17:{
1882 PreferredTuple GIMatchData_matchinfo;
1883 // Match Patterns
1884 if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) {
1885 return false;
1886 }
1887 // Apply Patterns
1888 Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);
1889 return true;
1890 }
1891 case GICXXCustomAction_GICombiner18:{
1892 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1893 // Match Patterns
1894 if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) {
1895 return false;
1896 }
1897 // Apply Patterns
1898 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1899 return true;
1900 }
1901 case GICXXCustomAction_GICombiner19:{
1902 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1903 // Match Patterns
1904 if(![&](){return Helper.matchCombineExtractedVectorLoad(*State.MIs[0], GIMatchData_matchinfo);}()) {
1905 return false;
1906 }
1907 // Apply Patterns
1908 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1909 return true;
1910 }
1911 case GICXXCustomAction_GICombiner20:{
1912 // Match Patterns
1913 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
1914 return false;
1915 }
1916 // Apply Patterns
1917 Helper.replaceInstWithFConstant(*State.MIs[0], 0.0);
1918 return true;
1919 }
1920 case GICXXCustomAction_GICombiner21:{
1921 // Match Patterns
1922 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
1923 return false;
1924 }
1925 // Apply Patterns
1926 Helper.replaceInstWithConstant(*State.MIs[0], 0);
1927 return true;
1928 }
1929 case GICXXCustomAction_GICombiner22:{
1930 // Match Patterns
1931 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
1932 return false;
1933 }
1934 // Apply Patterns
1935 Helper.replaceInstWithConstant(*State.MIs[0], -1);
1936 return true;
1937 }
1938 case GICXXCustomAction_GICombiner23:{
1939 // Match Patterns
1940 if(![&](){return Helper.matchOperandIsUndef(*State.MIs[0], 1);}()) {
1941 return false;
1942 }
1943 // Apply Patterns
1944 Helper.replaceInstWithConstant(*State.MIs[0], 0);
1945 return true;
1946 }
1947 case GICXXCustomAction_GICombiner24:{
1948 // Match Patterns
1949 if(![&](){return Helper.matchOperandIsUndef(*State.MIs[0], 2);}()) {
1950 return false;
1951 }
1952 // Apply Patterns
1953 Helper.replaceInstWithUndef(*State.MIs[0]);
1954 return true;
1955 }
1956 case GICXXCustomAction_GICombiner25:{
1957 // Match Patterns
1958 if(![&](){return Helper.matchAnyExplicitUseIsUndef(*State.MIs[0]);}()) {
1959 return false;
1960 }
1961 // Apply Patterns
1962 Helper.replaceInstWithUndef(*State.MIs[0]);
1963 return true;
1964 }
1965 case GICXXCustomAction_GICombiner26:{
1966 // Match Patterns
1967 if(![&](){return Helper.matchAllExplicitUsesAreUndef(*State.MIs[0]);}()) {
1968 return false;
1969 }
1970 // Apply Patterns
1971 Helper.replaceInstWithUndef(*State.MIs[0]);
1972 return true;
1973 }
1974 case GICXXCustomAction_GICombiner27:{
1975 // Match Patterns
1976 if(![&](){return Helper.matchUndefShuffleVectorMask(*State.MIs[0]);}()) {
1977 return false;
1978 }
1979 // Apply Patterns
1980 Helper.replaceInstWithUndef(*State.MIs[0]);
1981 return true;
1982 }
1983 case GICXXCustomAction_GICombiner28:{
1984 // Match Patterns
1985 if(![&](){return Helper.matchUndefStore(*State.MIs[0]);}()) {
1986 return false;
1987 }
1988 // Apply Patterns
1989 Helper.eraseInst(*State.MIs[0]);
1990 return true;
1991 }
1992 case GICXXCustomAction_GICombiner29:{
1993 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1994 // Match Patterns
1995 if(![&](){return Helper.matchCombineUnmergeUndef(*State.MIs[0], GIMatchData_info);}()) {
1996 return false;
1997 }
1998 // Apply Patterns
1999 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2000 return true;
2001 }
2002 case GICXXCustomAction_GICombiner30:{
2003 // Match Patterns
2004 if(![&](){return Helper.matchInsertExtractVecEltOutOfBounds(*State.MIs[0]);}()) {
2005 return false;
2006 }
2007 // Apply Patterns
2008 Helper.replaceInstWithUndef(*State.MIs[0]);
2009 return true;
2010 }
2011 case GICXXCustomAction_GICombiner31:{
2012 // Match Patterns
2013 if(![&](){return Helper.matchSelectSameVal(*State.MIs[0]);}()) {
2014 return false;
2015 }
2016 // Apply Patterns
2017 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 2);
2018 return true;
2019 }
2020 case GICXXCustomAction_GICombiner32:{
2021 // Match Patterns
2022 if(![&](){return Helper.matchOperandIsZero(*State.MIs[0], 1);}()) {
2023 return false;
2024 }
2025 // Apply Patterns
2026 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 1);
2027 return true;
2028 }
2029 case GICXXCustomAction_GICombiner33:{
2030 Register GIMatchData_info;
2031 // Match Patterns
2032 if(![&](){return Helper.matchCombineI2PToP2I(*State.MIs[0], GIMatchData_info);}()) {
2033 return false;
2034 }
2035 // Apply Patterns
2036 Helper.applyCombineI2PToP2I(*State.MIs[0], GIMatchData_info);
2037 return true;
2038 }
2039 case GICXXCustomAction_GICombiner34:{
2040 Register GIMatchData_info;
2041 // Match Patterns
2042 if(![&](){GIMatchData_info = State.MIs[1]->getOperand(1).getReg(); return true;}()) {
2043 return false;
2044 }
2045 // Apply Patterns
2046 Helper.applyCombineP2IToI2P(*State.MIs[0], GIMatchData_info);
2047 return true;
2048 }
2049 case GICXXCustomAction_GICombiner35:{
2050 Register GIMatchData_matchinfo;
2051 // Match Patterns
2052 if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) {
2053 return false;
2054 }
2055 // Apply Patterns
2056 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2057 return true;
2058 }
2059 case GICXXCustomAction_GICombiner36:{
2060 Register GIMatchData_matchinfo;
2061 // Match Patterns
2062 if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
2063 return false;
2064 }
2065 // Apply Patterns
2066 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2067 return true;
2068 }
2069 case GICXXCustomAction_GICombiner37:{
2070 Register GIMatchData_matchinfo;
2071 // Match Patterns
2072 if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
2073 return false;
2074 }
2075 // Apply Patterns
2076 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2077 return true;
2078 }
2079 case GICXXCustomAction_GICombiner38:{
2080 Register GIMatchData_matchinfo;
2081 // Match Patterns
2082 if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
2083 return false;
2084 }
2085 // Apply Patterns
2086 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2087 return true;
2088 }
2089 case GICXXCustomAction_GICombiner39:{
2090 // Match Patterns
2091 if(![&](){return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());}()) {
2092 return false;
2093 }
2094 // Apply Patterns
2095 Helper.replaceSingleDefInstWithReg(*State.MIs[0], State.MIs[1]->getOperand(1).getReg());
2096 return true;
2097 }
2098 case GICXXCustomAction_GICombiner40:{
2099 MachineInstr* GIMatchData_matchinfo;
2100 // Match Patterns
2101 if(![&](){return Helper.matchExtendThroughPhis(*State.MIs[0], GIMatchData_matchinfo);}()) {
2102 return false;
2103 }
2104 // Apply Patterns
2105 Helper.applyExtendThroughPhis(*State.MIs[0], GIMatchData_matchinfo);
2106 return true;
2107 }
2108 case GICXXCustomAction_GICombiner41:{
2109 std::tuple<Register, Register> GIMatchData_info;
2110 // Match Patterns
2111 if(![&](){return Helper.matchSimplifyAddToSub(*State.MIs[0], GIMatchData_info);}()) {
2112 return false;
2113 }
2114 // Apply Patterns
2115 Helper.applySimplifyAddToSub(*State.MIs[0], GIMatchData_info);
2116 return true;
2117 }
2118 case GICXXCustomAction_GICombiner42:{
2119 InstructionStepsMatchInfo GIMatchData_info;
2120 // Match Patterns
2121 if(![&](){return Helper.matchHoistLogicOpWithSameOpcodeHands(*State.MIs[0], GIMatchData_info);}()) {
2122 return false;
2123 }
2124 // Apply Patterns
2125 Helper.applyBuildInstructionSteps(*State.MIs[0], GIMatchData_info);
2126 return true;
2127 }
2128 case GICXXCustomAction_GICombiner43:{
2129 // Match Patterns
2130 if(![&](){return Helper.matchShiftsTooBig(*State.MIs[0]);}()) {
2131 return false;
2132 }
2133 // Apply Patterns
2134 Helper.replaceInstWithUndef(*State.MIs[0]);
2135 return true;
2136 }
2137 case GICXXCustomAction_GICombiner44:{
2138 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2139 // Match Patterns
2140 if(![&](){return Helper.matchReassocPtrAdd(*State.MIs[0], GIMatchData_matchinfo);}()) {
2141 return false;
2142 }
2143 // Apply Patterns
2144 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
2145 return true;
2146 }
2147 case GICXXCustomAction_GICombiner45:{
2148 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2149 // Match Patterns
2150 if(![&](){return Helper.matchReassocCommBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) {
2151 return false;
2152 }
2153 // Apply Patterns
2154 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2155 return true;
2156 }
2157 case GICXXCustomAction_GICombiner46:{
2158 PtrAddChain GIMatchData_matchinfo;
2159 // Match Patterns
2160 if(![&](){return Helper.matchPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) {
2161 return false;
2162 }
2163 // Apply Patterns
2164 Helper.applyPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);
2165 return true;
2166 }
2167 case GICXXCustomAction_GICombiner47:{
2168 std::tuple<Register, int64_t> GIMatchData_info;
2169 // Match Patterns
2170 if(![&](){return Helper.matchAshrShlToSextInreg(*State.MIs[0], GIMatchData_info);}()) {
2171 return false;
2172 }
2173 // Apply Patterns
2174 Helper.applyAshShlToSextInreg(*State.MIs[0], GIMatchData_info);
2175 return true;
2176 }
2177 case GICXXCustomAction_GICombiner48:{
2178 std::tuple<Register, unsigned> GIMatchData_matchinfo;
2179 // Match Patterns
2180 if(![&](){return Helper.matchSextInRegOfLoad(*State.MIs[0], GIMatchData_matchinfo);}()) {
2181 return false;
2182 }
2183 // Apply Patterns
2184 Helper.applySextInRegOfLoad(*State.MIs[0], GIMatchData_matchinfo);
2185 return true;
2186 }
2187 case GICXXCustomAction_GICombiner49:{
2188 RegisterImmPair GIMatchData_matchinfo;
2189 // Match Patterns
2190 if(![&](){return Helper.matchCombineShlOfExtend(*State.MIs[0], GIMatchData_matchinfo);}()) {
2191 return false;
2192 }
2193 // Apply Patterns
2194 Helper.applyCombineShlOfExtend(*State.MIs[0], GIMatchData_matchinfo);
2195 return true;
2196 }
2197 case GICXXCustomAction_GICombiner50:{
2198 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2199 // Match Patterns
2200 if(![&](){return Helper.matchNarrowBinopFeedingAnd(*State.MIs[0], GIMatchData_matchinfo);}()) {
2201 return false;
2202 }
2203 // Apply Patterns
2204 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
2205 return true;
2206 }
2207 case GICXXCustomAction_GICombiner51:{
2208 unsigned GIMatchData_matchinfo;
2209 // Match Patterns
2210 if(![&](){return Helper.matchConstantSelectCmp(*State.MIs[0], GIMatchData_matchinfo);}()) {
2211 return false;
2212 }
2213 // Apply Patterns
2214 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], GIMatchData_matchinfo);
2215 return true;
2216 }
2217 case GICXXCustomAction_GICombiner52:{
2218 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2219 // Match Patterns
2220 if(![&](){return Helper.matchSelectIMinMax(State.MIs[0]->getOperand(0), GIMatchData_info);}()) {
2221 return false;
2222 }
2223 // Apply Patterns
2224 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_info);
2225 return true;
2226 }
2227 case GICXXCustomAction_GICombiner53:{
2228 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2229 // Match Patterns
2230 if(![&](){return Helper.matchSelect(*State.MIs[0], GIMatchData_matchinfo);}()) {
2231 return false;
2232 }
2233 // Apply Patterns
2234 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2235 return true;
2236 }
2237 case GICXXCustomAction_GICombiner54:{
2238 Register GIMatchData_matchinfo;
2239 // Match Patterns
2240 if(![&](){return Helper.matchRedundantAnd(*State.MIs[0], GIMatchData_matchinfo);}()) {
2241 return false;
2242 }
2243 // Apply Patterns
2244 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2245 return true;
2246 }
2247 case GICXXCustomAction_GICombiner55:{
2248 // Match Patterns
2249 if(![&](){return Helper.matchRedundantSExtInReg(*State.MIs[0]);}()) {
2250 return false;
2251 }
2252 // Apply Patterns
2253 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 1);
2254 return true;
2255 }
2256 case GICXXCustomAction_GICombiner56:{
2257 Register GIMatchData_matchinfo;
2258 // Match Patterns
2259 if(![&](){return Helper.matchRedundantOr(*State.MIs[0], GIMatchData_matchinfo);}()) {
2260 return false;
2261 }
2262 // Apply Patterns
2263 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2264 return true;
2265 }
2266 case GICXXCustomAction_GICombiner57:{
2267 // Match Patterns
2268 if(![&](){return Helper.matchOperandIsKnownToBeAPowerOfTwo(*State.MIs[0], 2);}()) {
2269 return false;
2270 }
2271 // Apply Patterns
2272 Helper.applySimplifyURemByPow2(*State.MIs[0]);
2273 return true;
2274 }
2275 case GICXXCustomAction_GICombiner58:{
2276 Register GIMatchData_matchinfo;
2277 // Match Patterns
2278 if(![&](){return Helper.matchCombineZextTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) {
2279 return false;
2280 }
2281 // Apply Patterns
2282 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2283 return true;
2284 }
2285 case GICXXCustomAction_GICombiner59:{
2286 int64_t GIMatchData_matchinfo;
2287 // Match Patterns
2288 if(![&](){return Helper.matchICmpToTrueFalseKnownBits(*State.MIs[0], GIMatchData_matchinfo);}()) {
2289 return false;
2290 }
2291 // Apply Patterns
2292 Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo);
2293 return true;
2294 }
2295 case GICXXCustomAction_GICombiner60:{
2296 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2297 // Match Patterns
2298 if(![&](){return Helper.matchICmpToLHSKnownBits(*State.MIs[0], GIMatchData_info);}()) {
2299 return false;
2300 }
2301 // Apply Patterns
2302 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2303 return true;
2304 }
2305 case GICXXCustomAction_GICombiner61:{
2306 // Match Patterns
2307 if(![&](){unsigned BitWidth = MRI.getType(State.MIs[0]->getOperand(1).getReg()).getScalarSizeInBits();
2308 return Helper.getKnownBits()->maskedValueIsZero(State.MIs[0]->getOperand(1).getReg(),
2309 APInt::getOneBitSet(BitWidth, State.MIs[0]->getOperand(2).getImm() - 1));}()) {
2310 return false;
2311 }
2312 // Apply Patterns
2313 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
2314 Helper.getBuilder().buildZExtInReg(State.MIs[0]->getOperand(0), State.MIs[0]->getOperand(1), State.MIs[0]->getOperand(2).getImm());
2315 State.MIs[0]->eraseFromParent();
2316 return true;
2317 }
2318 case GICXXCustomAction_GICombiner62:{
2319 std::tuple<Register, unsigned> GIMatchData_matchinfo;
2320 // Match Patterns
2321 if(![&](){return Helper.matchCombineExtOfExt(*State.MIs[0], GIMatchData_matchinfo);}()) {
2322 return false;
2323 }
2324 // Apply Patterns
2325 Helper.applyCombineExtOfExt(*State.MIs[0], GIMatchData_matchinfo);
2326 return true;
2327 }
2328 case GICXXCustomAction_GICombiner63:{
2329 SmallVector<Register, 4> GIMatchData_info;
2330 // Match Patterns
2331 if(![&](){return Helper.matchNotCmp(*State.MIs[0], GIMatchData_info);}()) {
2332 return false;
2333 }
2334 // Apply Patterns
2335 Helper.applyNotCmp(*State.MIs[0], GIMatchData_info);
2336 return true;
2337 }
2338 case GICXXCustomAction_GICombiner64:{
2339 MachineInstr * GIMatchData_matchinfo;
2340 // Match Patterns
2341 if(![&](){return Helper.matchOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo);}()) {
2342 return false;
2343 }
2344 // Apply Patterns
2345 Helper.applyOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo);
2346 return true;
2347 }
2348 case GICXXCustomAction_GICombiner65:{
2349 SmallVector<Register, 8> GIMatchData_info;
2350 // Match Patterns
2351 if(![&](){return Helper.matchCombineUnmergeMergeToPlainValues(*State.MIs[0], GIMatchData_info);}()) {
2352 return false;
2353 }
2354 // Apply Patterns
2355 Helper.applyCombineUnmergeMergeToPlainValues(*State.MIs[0], GIMatchData_info);
2356 return true;
2357 }
2358 case GICXXCustomAction_GICombiner66:{
2359 SmallVector<APInt, 8> GIMatchData_info;
2360 // Match Patterns
2361 if(![&](){return Helper.matchCombineUnmergeConstant(*State.MIs[0], GIMatchData_info);}()) {
2362 return false;
2363 }
2364 // Apply Patterns
2365 Helper.applyCombineUnmergeConstant(*State.MIs[0], GIMatchData_info);
2366 return true;
2367 }
2368 case GICXXCustomAction_GICombiner67:{
2369 // Match Patterns
2370 if(![&](){return Helper.matchCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]);}()) {
2371 return false;
2372 }
2373 // Apply Patterns
2374 Helper.applyCombineUnmergeWithDeadLanesToTrunc(*State.MIs[0]);
2375 return true;
2376 }
2377 case GICXXCustomAction_GICombiner68:{
2378 // Match Patterns
2379 if(![&](){return Helper.matchCombineUnmergeZExtToZExt(*State.MIs[0]);}()) {
2380 return false;
2381 }
2382 // Apply Patterns
2383 Helper.applyCombineUnmergeZExtToZExt(*State.MIs[0]);
2384 return true;
2385 }
2386 case GICXXCustomAction_GICombiner69:{
2387 Register GIMatchData_matchinfo;
2388 // Match Patterns
2389 if(![&](){return Helper.matchCombineMergeUnmerge(*State.MIs[0], GIMatchData_matchinfo);}()) {
2390 return false;
2391 }
2392 // Apply Patterns
2393 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
2394 return true;
2395 }
2396 case GICXXCustomAction_GICombiner70:{
2397 std::pair<Register, unsigned> GIMatchData_matchinfo;
2398 // Match Patterns
2399 if(![&](){return Helper.matchCombineTruncOfExt(*State.MIs[0], GIMatchData_matchinfo);}()) {
2400 return false;
2401 }
2402 // Apply Patterns
2403 Helper.applyCombineTruncOfExt(*State.MIs[0], GIMatchData_matchinfo);
2404 return true;
2405 }
2406 case GICXXCustomAction_GICombiner71:{
2407 std::pair<MachineInstr*, LLT> GIMatchData_matchinfo;
2408 // Match Patterns
2409 if(![&](){return Helper.matchCombineTruncOfShift(*State.MIs[0], GIMatchData_matchinfo);}()) {
2410 return false;
2411 }
2412 // Apply Patterns
2413 Helper.applyCombineTruncOfShift(*State.MIs[0], GIMatchData_matchinfo);
2414 return true;
2415 }
2416 case GICXXCustomAction_GICombiner72:{
2417 // Apply Patterns
2418 Helper.applyCombineConstantFoldFpUnary(*State.MIs[0], State.MIs[1]->getOperand(1).getFPImm());
2419 return true;
2420 }
2421 case GICXXCustomAction_GICombiner73:{
2422 // Apply Patterns
2423 Helper.replaceInstWithFConstant(*State.MIs[0]->getOperand(0).getParent(), 0.0);
2424 return true;
2425 }
2426 case GICXXCustomAction_GICombiner74:{
2427 APInt GIMatchData_info;
2428 // Match Patterns
2429 if(![&](){return Helper.matchCombineConstPtrAddToI2P(*State.MIs[0], GIMatchData_info);}()) {
2430 return false;
2431 }
2432 // Apply Patterns
2433 Helper.applyCombineConstPtrAddToI2P(*State.MIs[0], GIMatchData_info);
2434 return true;
2435 }
2436 case GICXXCustomAction_GICombiner75:{
2437 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2438 // Match Patterns
2439 if(![&](){return Helper.matchOverlappingAnd(*State.MIs[0], GIMatchData_info);}()) {
2440 return false;
2441 }
2442 // Apply Patterns
2443 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2444 return true;
2445 }
2446 case GICXXCustomAction_GICombiner76:{
2447 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2448 // Match Patterns
2449 if(![&](){return Helper.matchMulOBy2(*State.MIs[0], GIMatchData_matchinfo);}()) {
2450 return false;
2451 }
2452 // Apply Patterns
2453 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
2454 return true;
2455 }
2456 case GICXXCustomAction_GICombiner77:{
2457 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2458 // Match Patterns
2459 if(![&](){return Helper.matchMulOBy0(*State.MIs[0], GIMatchData_matchinfo);}()) {
2460 return false;
2461 }
2462 // Apply Patterns
2463 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2464 return true;
2465 }
2466 case GICXXCustomAction_GICombiner78:{
2467 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2468 // Match Patterns
2469 if(![&](){return Helper.matchAddEToAddO(*State.MIs[0], GIMatchData_matchinfo);}()) {
2470 return false;
2471 }
2472 // Apply Patterns
2473 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
2474 return true;
2475 }
2476 case GICXXCustomAction_GICombiner79:{
2477 unsigned GIMatchData_info;
2478 // Match Patterns
2479 if(![&](){return Helper.matchCombineFMinMaxNaN(*State.MIs[0], GIMatchData_info);}()) {
2480 return false;
2481 }
2482 // Apply Patterns
2483 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], GIMatchData_info);
2484 return true;
2485 }
2486 case GICXXCustomAction_GICombiner80:{
2487 // Match Patterns
2488 if(![&](){return Helper.matchFPowIExpansion(*State.MIs[0], State.MIs[1]->getOperand(1).getCImm()->getSExtValue());}()) {
2489 return false;
2490 }
2491 // Apply Patterns
2492 Helper.applyExpandFPowI(*State.MIs[0], State.MIs[1]->getOperand(1).getCImm()->getSExtValue());
2493 return true;
2494 }
2495 case GICXXCustomAction_GICombiner81:{
2496 std::pair<Register, Register> GIMatchData_matchinfo;
2497 // Match Patterns
2498 if(![&](){return Helper.matchXorOfAndWithSameReg(*State.MIs[0], GIMatchData_matchinfo);}()) {
2499 return false;
2500 }
2501 // Apply Patterns
2502 Helper.applyXorOfAndWithSameReg(*State.MIs[0], GIMatchData_matchinfo);
2503 return true;
2504 }
2505 case GICXXCustomAction_GICombiner82:{
2506 // Match Patterns
2507 if(![&](){return Helper.matchPtrAddZero(*State.MIs[0]);}()) {
2508 return false;
2509 }
2510 // Apply Patterns
2511 Helper.applyPtrAddZero(*State.MIs[0]);
2512 return true;
2513 }
2514 case GICXXCustomAction_GICombiner83:{
2515 RegisterImmPair GIMatchData_matchinfo;
2516 // Match Patterns
2517 if(![&](){return Helper.matchShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) {
2518 return false;
2519 }
2520 // Apply Patterns
2521 Helper.applyShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);
2522 return true;
2523 }
2524 case GICXXCustomAction_GICombiner84:{
2525 ShiftOfShiftedLogic GIMatchData_matchinfo;
2526 // Match Patterns
2527 if(![&](){return Helper.matchShiftOfShiftedLogic(*State.MIs[0], GIMatchData_matchinfo);}()) {
2528 return false;
2529 }
2530 // Apply Patterns
2531 Helper.applyShiftOfShiftedLogic(*State.MIs[0], GIMatchData_matchinfo);
2532 return true;
2533 }
2534 case GICXXCustomAction_GICombiner85:{
2535 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2536 // Match Patterns
2537 if(![&](){return Helper.matchLoadOrCombine(*State.MIs[0], GIMatchData_info);}()) {
2538 return false;
2539 }
2540 // Apply Patterns
2541 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2542 return true;
2543 }
2544 case GICXXCustomAction_GICombiner86:{
2545 MachineInstr * GIMatchData_matchinfo;
2546 // Match Patterns
2547 if(![&](){return Helper.matchCombineDivRem(*State.MIs[0], GIMatchData_matchinfo);}()) {
2548 return false;
2549 }
2550 // Apply Patterns
2551 Helper.applyCombineDivRem(*State.MIs[0], GIMatchData_matchinfo);
2552 return true;
2553 }
2554 case GICXXCustomAction_GICombiner87:{
2555 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2556 // Match Patterns
2557 if(![&](){return Helper.matchOrShiftToFunnelShift(*State.MIs[0], GIMatchData_info);}()) {
2558 return false;
2559 }
2560 // Apply Patterns
2561 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2562 return true;
2563 }
2564 case GICXXCustomAction_GICombiner88:{
2565 // Match Patterns
2566 if(![&](){return Helper.matchFunnelShiftToRotate(*State.MIs[0]);}()) {
2567 return false;
2568 }
2569 // Apply Patterns
2570 Helper.applyFunnelShiftToRotate(*State.MIs[0]);
2571 return true;
2572 }
2573 case GICXXCustomAction_GICombiner89:{
2574 // Match Patterns
2575 if(![&](){return Helper.matchConstantLargerBitWidth(*State.MIs[0], 3);}()) {
2576 return false;
2577 }
2578 // Apply Patterns
2579 Helper.applyFunnelShiftConstantModulo(*State.MIs[0]);
2580 return true;
2581 }
2582 case GICXXCustomAction_GICombiner90:{
2583 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2584 // Match Patterns
2585 if(![&](){return Helper.matchCommuteShift(*State.MIs[0], GIMatchData_matchinfo);}()) {
2586 return false;
2587 }
2588 // Apply Patterns
2589 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2590 return true;
2591 }
2592 case GICXXCustomAction_GICombiner91:{
2593 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2594 // Match Patterns
2595 if(![&](){return Helper.matchBitfieldExtractFromSExtInReg(*State.MIs[0], GIMatchData_info);}()) {
2596 return false;
2597 }
2598 // Apply Patterns
2599 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2600 return true;
2601 }
2602 case GICXXCustomAction_GICombiner92:{
2603 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2604 // Match Patterns
2605 if(![&](){return Helper.matchBitfieldExtractFromAnd(*State.MIs[0], GIMatchData_info);}()) {
2606 return false;
2607 }
2608 // Apply Patterns
2609 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2610 return true;
2611 }
2612 case GICXXCustomAction_GICombiner93:{
2613 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2614 // Match Patterns
2615 if(![&](){return Helper.matchBitfieldExtractFromShr(*State.MIs[0], GIMatchData_info);}()) {
2616 return false;
2617 }
2618 // Apply Patterns
2619 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2620 return true;
2621 }
2622 case GICXXCustomAction_GICombiner94:{
2623 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2624 // Match Patterns
2625 if(![&](){return Helper.matchBitfieldExtractFromShrAnd(*State.MIs[0], GIMatchData_info);}()) {
2626 return false;
2627 }
2628 // Apply Patterns
2629 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2630 return true;
2631 }
2632 case GICXXCustomAction_GICombiner95:{
2633 APInt GIMatchData_matchinfo;
2634 // Match Patterns
2635 if(![&](){return Helper.matchConstantFoldBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) {
2636 return false;
2637 }
2638 // Apply Patterns
2639 Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo);
2640 return true;
2641 }
2642 case GICXXCustomAction_GICombiner96:{
2643 ConstantFP* GIMatchData_matchinfo;
2644 // Match Patterns
2645 if(![&](){return Helper.matchConstantFoldFPBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) {
2646 return false;
2647 }
2648 // Apply Patterns
2649 Helper.replaceInstWithFConstant(*State.MIs[0], GIMatchData_matchinfo);
2650 return true;
2651 }
2652 case GICXXCustomAction_GICombiner97:{
2653 ConstantFP* GIMatchData_matchinfo;
2654 // Match Patterns
2655 if(![&](){return Helper.matchConstantFoldFMA(*State.MIs[0], GIMatchData_matchinfo);}()) {
2656 return false;
2657 }
2658 // Apply Patterns
2659 Helper.replaceInstWithFConstant(*State.MIs[0], GIMatchData_matchinfo);
2660 return true;
2661 }
2662 case GICXXCustomAction_GICombiner98:{
2663 APInt GIMatchData_matchinfo;
2664 // Match Patterns
2665 if(![&](){return Helper.matchConstantFoldCastOp(*State.MIs[0], GIMatchData_matchinfo);}()) {
2666 return false;
2667 }
2668 // Apply Patterns
2669 Helper.replaceInstWithConstant(*State.MIs[0], GIMatchData_matchinfo);
2670 return true;
2671 }
2672 case GICXXCustomAction_GICombiner99:{
2673 // Match Patterns
2674 if(![&](){return Helper.matchUDivByConst(*State.MIs[0]);}()) {
2675 return false;
2676 }
2677 // Apply Patterns
2678 Helper.applyUDivByConst(*State.MIs[0]);
2679 return true;
2680 }
2681 case GICXXCustomAction_GICombiner100:{
2682 // Match Patterns
2683 if(![&](){return Helper.matchSDivByConst(*State.MIs[0]);}()) {
2684 return false;
2685 }
2686 // Apply Patterns
2687 Helper.applySDivByConst(*State.MIs[0]);
2688 return true;
2689 }
2690 case GICXXCustomAction_GICombiner101:{
2691 // Match Patterns
2692 if(![&](){return Helper.matchDivByPow2(*State.MIs[0], /*IsSigned=*/true);}()) {
2693 return false;
2694 }
2695 // Apply Patterns
2696 Helper.applySDivByPow2(*State.MIs[0]);
2697 return true;
2698 }
2699 case GICXXCustomAction_GICombiner102:{
2700 // Match Patterns
2701 if(![&](){return Helper.matchDivByPow2(*State.MIs[0], /*IsSigned=*/false);}()) {
2702 return false;
2703 }
2704 // Apply Patterns
2705 Helper.applyUDivByPow2(*State.MIs[0]);
2706 return true;
2707 }
2708 case GICXXCustomAction_GICombiner103:{
2709 // Match Patterns
2710 if(![&](){return Helper.matchUMulHToLShr(*State.MIs[0]);}()) {
2711 return false;
2712 }
2713 // Apply Patterns
2714 Helper.applyUMulHToLShr(*State.MIs[0]);
2715 return true;
2716 }
2717 case GICXXCustomAction_GICombiner104:{
2718 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2719 // Match Patterns
2720 if(![&](){return Helper.matchRedundantNegOperands(*State.MIs[0], GIMatchData_matchinfo);}()) {
2721 return false;
2722 }
2723 // Apply Patterns
2724 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
2725 return true;
2726 }
2727 case GICXXCustomAction_GICombiner105:{
2728 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2729 // Match Patterns
2730 if(![&](){return Helper.matchAndOrDisjointMask(*State.MIs[0], GIMatchData_info);}()) {
2731 return false;
2732 }
2733 // Apply Patterns
2734 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_info);
2735 return true;
2736 }
2737 case GICXXCustomAction_GICombiner106:{
2738 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2739 // Match Patterns
2740 if(![&](){return Helper.matchCombineFAddFMulToFMadOrFMA(*State.MIs[0],
2741 GIMatchData_info);}()) {
2742 return false;
2743 }
2744 // Apply Patterns
2745 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2746 return true;
2747 }
2748 case GICXXCustomAction_GICombiner107:{
2749 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2750 // Match Patterns
2751 if(![&](){return Helper.matchCombineFAddFpExtFMulToFMadOrFMA(*State.MIs[0],
2752 GIMatchData_info);}()) {
2753 return false;
2754 }
2755 // Apply Patterns
2756 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2757 return true;
2758 }
2759 case GICXXCustomAction_GICombiner108:{
2760 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2761 // Match Patterns
2762 if(![&](){return Helper.matchCombineFAddFMAFMulToFMadOrFMA(*State.MIs[0],
2763 GIMatchData_info);}()) {
2764 return false;
2765 }
2766 // Apply Patterns
2767 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2768 return true;
2769 }
2770 case GICXXCustomAction_GICombiner109:{
2771 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2772 // Match Patterns
2773 if(![&](){return Helper.matchCombineFAddFpExtFMulToFMadOrFMAAggressive(
2774 *State.MIs[0], GIMatchData_info);}()) {
2775 return false;
2776 }
2777 // Apply Patterns
2778 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2779 return true;
2780 }
2781 case GICXXCustomAction_GICombiner110:{
2782 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2783 // Match Patterns
2784 if(![&](){return Helper.matchCombineFSubFMulToFMadOrFMA(*State.MIs[0],
2785 GIMatchData_info);}()) {
2786 return false;
2787 }
2788 // Apply Patterns
2789 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2790 return true;
2791 }
2792 case GICXXCustomAction_GICombiner111:{
2793 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2794 // Match Patterns
2795 if(![&](){return Helper.matchCombineFSubFNegFMulToFMadOrFMA(*State.MIs[0],
2796 GIMatchData_info);}()) {
2797 return false;
2798 }
2799 // Apply Patterns
2800 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2801 return true;
2802 }
2803 case GICXXCustomAction_GICombiner112:{
2804 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2805 // Match Patterns
2806 if(![&](){return Helper.matchCombineFSubFpExtFMulToFMadOrFMA(*State.MIs[0],
2807 GIMatchData_info);}()) {
2808 return false;
2809 }
2810 // Apply Patterns
2811 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2812 return true;
2813 }
2814 case GICXXCustomAction_GICombiner113:{
2815 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2816 // Match Patterns
2817 if(![&](){return Helper.matchCombineFSubFpExtFNegFMulToFMadOrFMA(
2818 *State.MIs[0], GIMatchData_info);}()) {
2819 return false;
2820 }
2821 // Apply Patterns
2822 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2823 return true;
2824 }
2825 case GICXXCustomAction_GICombiner114:{
2826 unsigned GIMatchData_select_op_no;
2827 // Match Patterns
2828 if(![&](){return Helper.matchFoldBinOpIntoSelect(*State.MIs[0], GIMatchData_select_op_no);}()) {
2829 return false;
2830 }
2831 // Apply Patterns
2832 Helper.applyFoldBinOpIntoSelect(*State.MIs[0], GIMatchData_select_op_no);
2833 return true;
2834 }
2835 case GICXXCustomAction_GICombiner115:{
2836 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2837 // Match Patterns
2838 if(![&](){return Helper.matchSubAddSameReg(*State.MIs[0], GIMatchData_matchinfo);}()) {
2839 return false;
2840 }
2841 // Apply Patterns
2842 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2843 return true;
2844 }
2845 case GICXXCustomAction_GICombiner116:{
2846 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2847 // Match Patterns
2848 if(![&](){return Helper.matchSimplifySelectToMinMax(*State.MIs[0], GIMatchData_info);}()) {
2849 return false;
2850 }
2851 // Apply Patterns
2852 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2853 return true;
2854 }
2855 case GICXXCustomAction_GICombiner117:{
2856 std::function<void(MachineIRBuilder &)> GIMatchData_info;
2857 // Match Patterns
2858 if(![&](){return Helper.matchRedundantBinOpInEquality(*State.MIs[0], GIMatchData_info);}()) {
2859 return false;
2860 }
2861 // Apply Patterns
2862 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
2863 return true;
2864 }
2865 case GICXXCustomAction_GICombiner118:{
2866 Register GIMatchData_matchinfo;
2867 // Match Patterns
2868 if(![&](){return Helper.matchFsubToFneg(*State.MIs[0], GIMatchData_matchinfo);}()) {
2869 return false;
2870 }
2871 // Apply Patterns
2872 Helper.applyFsubToFneg(*State.MIs[0], GIMatchData_matchinfo);
2873 return true;
2874 }
2875 case GICXXCustomAction_GICombiner119:{
2876 // Match Patterns
2877 if(![&](){return Helper.matchCommuteConstantToRHS(*State.MIs[0]);}()) {
2878 return false;
2879 }
2880 // Apply Patterns
2881 Helper.applyCommuteBinOpOperands(*State.MIs[0]);
2882 return true;
2883 }
2884 case GICXXCustomAction_GICombiner120:{
2885 // Match Patterns
2886 if(![&](){return Helper.matchCommuteFPConstantToRHS(*State.MIs[0]);}()) {
2887 return false;
2888 }
2889 // Apply Patterns
2890 Helper.applyCommuteBinOpOperands(*State.MIs[0]);
2891 return true;
2892 }
2893 case GICXXCustomAction_GICombiner121:{
2894 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2895 // Match Patterns
2896 if(![&](){return Helper.matchAnd(*State.MIs[0], GIMatchData_matchinfo);}()) {
2897 return false;
2898 }
2899 // Apply Patterns
2900 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2901 return true;
2902 }
2903 case GICXXCustomAction_GICombiner122:{
2904 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2905 // Match Patterns
2906 if(![&](){return Helper.matchOr(*State.MIs[0], GIMatchData_matchinfo);}()) {
2907 return false;
2908 }
2909 // Apply Patterns
2910 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2911 return true;
2912 }
2913 case GICXXCustomAction_GICombiner123:{
2914 SmallVector<Register> GIMatchData_matchinfo;
2915 // Match Patterns
2916 if(![&](){return Helper.matchCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);}()) {
2917 return false;
2918 }
2919 // Apply Patterns
2920 Helper.applyCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);
2921 return true;
2922 }
2923 case GICXXCustomAction_GICombiner124:{
2924 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2925 // Match Patterns
2926 if(![&](){return Helper.matchAddOverflow(*State.MIs[0], GIMatchData_matchinfo);}()) {
2927 return false;
2928 }
2929 // Apply Patterns
2930 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
2931 return true;
2932 }
2933 case GICXXCustomAction_GICombiner125:{
2934 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2935 // Match Patterns
2936 if(![&](){return Helper.matchSextOfTrunc(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
2937 return false;
2938 }
2939 // Apply Patterns
2940 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
2941 return true;
2942 }
2943 case GICXXCustomAction_GICombiner126:{
2944 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2945 // Match Patterns
2946 if(![&](){return Helper.matchZextOfTrunc(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
2947 return false;
2948 }
2949 // Apply Patterns
2950 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
2951 return true;
2952 }
2953 case GICXXCustomAction_GICombiner127:{
2954 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
2955 // Match Patterns
2956 if(![&](){return Helper.matchNonNegZext(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);}()) {
2957 return false;
2958 }
2959 // Apply Patterns
2960 Helper.applyBuildFnMO(State.MIs[0]->getOperand(0), GIMatchData_matchinfo);
2961 return true;
2962 }
2963 case GICXXCustomAction_GICombiner128:{
2964 SmallVector<Register> GIMatchData_matchinfo;
2965 // Match Patterns
2966 if(![&](){return Helper.matchCombineShuffleConcat(*State.MIs[0], GIMatchData_matchinfo);}()) {
2967 return false;
2968 }
2969 // Apply Patterns
2970 Helper.applyCombineShuffleConcat(*State.MIs[0], GIMatchData_matchinfo);
2971 return true;
2972 }
2973 }
2974 llvm_unreachable("Unknown Apply Action");
2975}
2976#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
2977#define GIMT_Encode2(Val) uint8_t(Val), uint8_t((uint16_t)Val >> 8)
2978#define GIMT_Encode4(Val) uint8_t(Val), uint8_t((uint32_t)Val >> 8), uint8_t((uint32_t)Val >> 16), uint8_t((uint32_t)Val >> 24)
2979#define GIMT_Encode8(Val) uint8_t(Val), uint8_t((uint64_t)Val >> 8), uint8_t((uint64_t)Val >> 16), uint8_t((uint64_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)
2980#else
2981#define GIMT_Encode2(Val) uint8_t((uint16_t)Val >> 8), uint8_t(Val)
2982#define GIMT_Encode4(Val) uint8_t((uint32_t)Val >> 24), uint8_t((uint32_t)Val >> 16), uint8_t((uint32_t)Val >> 8), uint8_t(Val)
2983#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((uint64_t)Val >> 24), uint8_t((uint64_t)Val >> 16), uint8_t((uint64_t)Val >> 8), uint8_t(Val)
2984#endif
2985const uint8_t *RISCVPreLegalizerCombinerImpl::getMatchTable() const {
2986 constexpr static uint8_t MatchTable0[] = {
2987 GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(19), GIMT_Encode2(249), /*)*//*default:*//*Label 92*/ GIMT_Encode4(6113),
2988 /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(930), 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),
2989 /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(942),
2990 /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(1462),
2991 /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(1557),
2992 /*TargetOpcode::G_SDIV*//*Label 4*/ GIMT_Encode4(1723),
2993 /*TargetOpcode::G_UDIV*//*Label 5*/ GIMT_Encode4(1785),
2994 /*TargetOpcode::G_SREM*//*Label 6*/ GIMT_Encode4(1858),
2995 /*TargetOpcode::G_UREM*//*Label 7*/ GIMT_Encode4(1892), GIMT_Encode4(0), GIMT_Encode4(0),
2996 /*TargetOpcode::G_AND*//*Label 8*/ GIMT_Encode4(1948),
2997 /*TargetOpcode::G_OR*//*Label 9*/ GIMT_Encode4(2229),
2998 /*TargetOpcode::G_XOR*//*Label 10*/ GIMT_Encode4(2474), GIMT_Encode4(0),
2999 /*TargetOpcode::G_PHI*//*Label 11*/ GIMT_Encode4(2575), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3000 /*TargetOpcode::G_UNMERGE_VALUES*//*Label 12*/ GIMT_Encode4(2587), GIMT_Encode4(0),
3001 /*TargetOpcode::G_MERGE_VALUES*//*Label 13*/ GIMT_Encode4(2643),
3002 /*TargetOpcode::G_BUILD_VECTOR*//*Label 14*/ GIMT_Encode4(2655),
3003 /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 15*/ GIMT_Encode4(2678),
3004 /*TargetOpcode::G_CONCAT_VECTORS*//*Label 16*/ GIMT_Encode4(2690),
3005 /*TargetOpcode::G_PTRTOINT*//*Label 17*/ GIMT_Encode4(2702),
3006 /*TargetOpcode::G_INTTOPTR*//*Label 18*/ GIMT_Encode4(2724),
3007 /*TargetOpcode::G_BITCAST*//*Label 19*/ GIMT_Encode4(2736),
3008 /*TargetOpcode::G_FREEZE*//*Label 20*/ GIMT_Encode4(2758), 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),
3009 /*TargetOpcode::G_LOAD*//*Label 21*/ GIMT_Encode4(2822),
3010 /*TargetOpcode::G_SEXTLOAD*//*Label 22*/ GIMT_Encode4(2834),
3011 /*TargetOpcode::G_ZEXTLOAD*//*Label 23*/ GIMT_Encode4(2846), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3012 /*TargetOpcode::G_STORE*//*Label 24*/ GIMT_Encode4(2858), 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),
3013 /*TargetOpcode::G_ANYEXT*//*Label 25*/ GIMT_Encode4(2870),
3014 /*TargetOpcode::G_TRUNC*//*Label 26*/ GIMT_Encode4(2904), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3015 /*TargetOpcode::G_SEXT*//*Label 27*/ GIMT_Encode4(2960),
3016 /*TargetOpcode::G_SEXT_INREG*//*Label 28*/ GIMT_Encode4(3010),
3017 /*TargetOpcode::G_ZEXT*//*Label 29*/ GIMT_Encode4(3055),
3018 /*TargetOpcode::G_SHL*//*Label 30*/ GIMT_Encode4(3133),
3019 /*TargetOpcode::G_LSHR*//*Label 31*/ GIMT_Encode4(3291),
3020 /*TargetOpcode::G_ASHR*//*Label 32*/ GIMT_Encode4(3403),
3021 /*TargetOpcode::G_FSHL*//*Label 33*/ GIMT_Encode4(3526),
3022 /*TargetOpcode::G_FSHR*//*Label 34*/ GIMT_Encode4(3569),
3023 /*TargetOpcode::G_ROTR*//*Label 35*/ GIMT_Encode4(3612),
3024 /*TargetOpcode::G_ROTL*//*Label 36*/ GIMT_Encode4(3636),
3025 /*TargetOpcode::G_ICMP*//*Label 37*/ GIMT_Encode4(3660), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3026 /*TargetOpcode::G_SELECT*//*Label 38*/ GIMT_Encode4(3694),
3027 /*TargetOpcode::G_UADDO*//*Label 39*/ GIMT_Encode4(3789),
3028 /*TargetOpcode::G_UADDE*//*Label 40*/ GIMT_Encode4(3812), GIMT_Encode4(0),
3029 /*TargetOpcode::G_USUBE*//*Label 41*/ GIMT_Encode4(3824),
3030 /*TargetOpcode::G_SADDO*//*Label 42*/ GIMT_Encode4(3836),
3031 /*TargetOpcode::G_SADDE*//*Label 43*/ GIMT_Encode4(3859), GIMT_Encode4(0),
3032 /*TargetOpcode::G_SSUBE*//*Label 44*/ GIMT_Encode4(3871),
3033 /*TargetOpcode::G_UMULO*//*Label 45*/ GIMT_Encode4(3883),
3034 /*TargetOpcode::G_SMULO*//*Label 46*/ GIMT_Encode4(3917),
3035 /*TargetOpcode::G_UMULH*//*Label 47*/ GIMT_Encode4(3951),
3036 /*TargetOpcode::G_SMULH*//*Label 48*/ GIMT_Encode4(3974),
3037 /*TargetOpcode::G_UADDSAT*//*Label 49*/ GIMT_Encode4(3986),
3038 /*TargetOpcode::G_SADDSAT*//*Label 50*/ GIMT_Encode4(3998), GIMT_Encode4(0), GIMT_Encode4(0),
3039 /*TargetOpcode::G_USHLSAT*//*Label 51*/ GIMT_Encode4(4010),
3040 /*TargetOpcode::G_SSHLSAT*//*Label 52*/ GIMT_Encode4(4033),
3041 /*TargetOpcode::G_SMULFIX*//*Label 53*/ GIMT_Encode4(4056),
3042 /*TargetOpcode::G_UMULFIX*//*Label 54*/ GIMT_Encode4(4068),
3043 /*TargetOpcode::G_SMULFIXSAT*//*Label 55*/ GIMT_Encode4(4080),
3044 /*TargetOpcode::G_UMULFIXSAT*//*Label 56*/ GIMT_Encode4(4092), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3045 /*TargetOpcode::G_FADD*//*Label 57*/ GIMT_Encode4(4104),
3046 /*TargetOpcode::G_FSUB*//*Label 58*/ GIMT_Encode4(4216),
3047 /*TargetOpcode::G_FMUL*//*Label 59*/ GIMT_Encode4(4305),
3048 /*TargetOpcode::G_FMA*//*Label 60*/ GIMT_Encode4(4393),
3049 /*TargetOpcode::G_FMAD*//*Label 61*/ GIMT_Encode4(4416),
3050 /*TargetOpcode::G_FDIV*//*Label 62*/ GIMT_Encode4(4439),
3051 /*TargetOpcode::G_FREM*//*Label 63*/ GIMT_Encode4(4473), GIMT_Encode4(0),
3052 /*TargetOpcode::G_FPOWI*//*Label 64*/ GIMT_Encode4(4485), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3053 /*TargetOpcode::G_FLOG2*//*Label 65*/ GIMT_Encode4(4507), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3054 /*TargetOpcode::G_FNEG*//*Label 66*/ GIMT_Encode4(4529), GIMT_Encode4(0),
3055 /*TargetOpcode::G_FPTRUNC*//*Label 67*/ GIMT_Encode4(4580),
3056 /*TargetOpcode::G_FPTOSI*//*Label 68*/ GIMT_Encode4(4623),
3057 /*TargetOpcode::G_FPTOUI*//*Label 69*/ GIMT_Encode4(4635),
3058 /*TargetOpcode::G_SITOFP*//*Label 70*/ GIMT_Encode4(4647),
3059 /*TargetOpcode::G_UITOFP*//*Label 71*/ GIMT_Encode4(4674),
3060 /*TargetOpcode::G_FABS*//*Label 72*/ GIMT_Encode4(4701), GIMT_Encode4(0), GIMT_Encode4(0),
3061 /*TargetOpcode::G_FCANONICALIZE*//*Label 73*/ GIMT_Encode4(4780),
3062 /*TargetOpcode::G_FMINNUM*//*Label 74*/ GIMT_Encode4(4810),
3063 /*TargetOpcode::G_FMAXNUM*//*Label 75*/ GIMT_Encode4(4844),
3064 /*TargetOpcode::G_FMINNUM_IEEE*//*Label 76*/ GIMT_Encode4(4878),
3065 /*TargetOpcode::G_FMAXNUM_IEEE*//*Label 77*/ GIMT_Encode4(4890),
3066 /*TargetOpcode::G_FMINIMUM*//*Label 78*/ GIMT_Encode4(4902),
3067 /*TargetOpcode::G_FMAXIMUM*//*Label 79*/ GIMT_Encode4(4936), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3068 /*TargetOpcode::G_PTR_ADD*//*Label 80*/ GIMT_Encode4(4970), GIMT_Encode4(0),
3069 /*TargetOpcode::G_SMIN*//*Label 81*/ GIMT_Encode4(5049),
3070 /*TargetOpcode::G_SMAX*//*Label 82*/ GIMT_Encode4(5072),
3071 /*TargetOpcode::G_UMIN*//*Label 83*/ GIMT_Encode4(5095),
3072 /*TargetOpcode::G_UMAX*//*Label 84*/ GIMT_Encode4(5118),
3073 /*TargetOpcode::G_ABS*//*Label 85*/ GIMT_Encode4(5141), GIMT_Encode4(0), GIMT_Encode4(0),
3074 /*TargetOpcode::G_BR*//*Label 86*/ GIMT_Encode4(5153), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3075 /*TargetOpcode::G_INSERT_VECTOR_ELT*//*Label 87*/ GIMT_Encode4(5165),
3076 /*TargetOpcode::G_EXTRACT_VECTOR_ELT*//*Label 88*/ GIMT_Encode4(5295),
3077 /*TargetOpcode::G_SHUFFLE_VECTOR*//*Label 89*/ GIMT_Encode4(5968), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
3078 /*TargetOpcode::G_BITREVERSE*//*Label 90*/ GIMT_Encode4(6002), 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),
3079 /*TargetOpcode::G_FSQRT*//*Label 91*/ GIMT_Encode4(6091),
3080 // Label 0: @930
3081 GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(941), // Rule ID 8 //
3082 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
3083 // MIs[0] d
3084 // No operand predicates
3085 // MIs[0] s
3086 // No operand predicates
3087 // Combiner Rule #8: copy_prop
3088 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
3089 // Label 93: @941
3090 GIM_Reject,
3091 // Label 1: @942
3092 GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(953), // Rule ID 10 //
3093 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
3094 // Combiner Rule #10: add_p2i_to_ptradd; wip_match_opcode 'G_ADD'
3095 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
3096 // Label 94: @953
3097 GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(964), // Rule ID 72 //
3098 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
3099 // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_ADD'
3100 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25),
3101 // Label 95: @964
3102 GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(975), // Rule ID 119 //
3103 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule88Enabled),
3104 // Combiner Rule #88: simplify_add_to_sub; wip_match_opcode 'G_ADD'
3105 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner41),
3106 // Label 96: @975
3107 GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(986), // Rule ID 212 //
3108 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
3109 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_ADD'
3110 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
3111 // Label 97: @986
3112 GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(997), // Rule ID 251 //
3113 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3114 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_ADD'
3115 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3116 // Label 98: @997
3117 GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(1008), // Rule ID 281 //
3118 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
3119 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_ADD'
3120 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
3121 // Label 99: @1008
3122 GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(1042), // Rule ID 0 //
3123 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
3124 // MIs[0] root
3125 // No operand predicates
3126 // MIs[0] sub
3127 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3128 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3129 // MIs[1] Operand 1
3130 GIM_CheckConstantInt8, /*MI*/1, /*Op*/1, 0,
3131 // MIs[1] A
3132 // No operand predicates
3133 // MIs[0] B
3134 // No operand predicates
3135 GIM_CheckIsSafeToFold, /*NumInsns*/1,
3136 // Combiner Rule #0: ZeroMinusAPlusB
3137 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
3138 GIR_RootToRootCopy, /*OpIdx*/0, // root
3139 GIR_RootToRootCopy, /*OpIdx*/2, // B
3140 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // A
3141 GIR_EraseRootFromParent_Done,
3142 // Label 100: @1042
3143 GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(1076), // Rule ID 3 //
3144 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
3145 // MIs[0] root
3146 // No operand predicates
3147 // MIs[0] sub
3148 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3149 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3150 // MIs[1] B
3151 // No operand predicates
3152 // MIs[1] A
3153 // No operand predicates
3154 // MIs[0] A
3155 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
3156 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3157 GIM_CheckIsSafeToFold, /*NumInsns*/1,
3158 // Combiner Rule #3: BMinusAPlusA
3159 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3160 GIR_EraseRootFromParent_Done,
3161 // Label 101: @1076
3162 GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(1110), // Rule ID 109 //
3163 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule79Enabled),
3164 // MIs[0] dst
3165 // No operand predicates
3166 // MIs[0] __add_sub_reg_match_0.tmp
3167 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3168 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3169 // MIs[1] src
3170 // No operand predicates
3171 // MIs[1] __add_sub_reg_match_0.x
3172 // No operand predicates
3173 // MIs[0] __add_sub_reg_match_0.x
3174 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
3175 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3176 GIM_CheckIsSafeToFold, /*NumInsns*/1,
3177 // Combiner Rule #79: add_sub_reg @ [__add_sub_reg_match_0[1]]
3178 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3179 GIR_EraseRootFromParent_Done,
3180 // Label 102: @1110
3181 GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(1155), // Rule ID 5 //
3182 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
3183 // MIs[0] root
3184 // No operand predicates
3185 // MIs[0] sub1
3186 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3187 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3188 // MIs[1] A
3189 // No operand predicates
3190 // MIs[1] B
3191 // No operand predicates
3192 // MIs[0] sub2
3193 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2]
3194 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_SUB),
3195 // MIs[2] B
3196 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/1, /*OtherOpIdx*/2,
3197 // MIs[2] C
3198 // No operand predicates
3199 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3200 // Combiner Rule #5: AMinusBPlusBMinusC
3201 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
3202 GIR_RootToRootCopy, /*OpIdx*/0, // root
3203 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // A
3204 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // C
3205 GIR_EraseRootFromParent_Done,
3206 // Label 103: @1155
3207 GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(1200), // Rule ID 4 //
3208 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
3209 // MIs[0] root
3210 // No operand predicates
3211 // MIs[0] sub1
3212 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3213 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3214 // MIs[1] A
3215 // No operand predicates
3216 // MIs[1] B
3217 // No operand predicates
3218 // MIs[0] sub2
3219 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2]
3220 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_SUB),
3221 // MIs[2] C
3222 // No operand predicates
3223 // MIs[2] A
3224 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/1,
3225 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3226 // Combiner Rule #4: AMinusBPlusCMinusA
3227 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
3228 GIR_RootToRootCopy, /*OpIdx*/0, // root
3229 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // C
3230 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // B
3231 GIR_EraseRootFromParent_Done,
3232 // Label 104: @1200
3233 GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(1235), // Rule ID 46 //
3234 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled),
3235 GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap),
3236 // MIs[0] root
3237 // No operand predicates
3238 // MIs[0] left
3239 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3240 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE),
3241 // MIs[1] imm1
3242 // No operand predicates
3243 // MIs[0] right
3244 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2]
3245 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_VSCALE),
3246 // MIs[2] imm2
3247 // No operand predicates
3248 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3249 // Combiner Rule #44: add_of_vscale
3250 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
3251 // Label 105: @1235
3252 GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(1269), // Rule ID 1 //
3253 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
3254 // MIs[0] root
3255 // No operand predicates
3256 // MIs[0] A
3257 // No operand predicates
3258 // MIs[0] sub
3259 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
3260 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3261 // MIs[1] Operand 1
3262 GIM_CheckConstantInt8, /*MI*/1, /*Op*/1, 0,
3263 // MIs[1] B
3264 // No operand predicates
3265 GIM_CheckIsSafeToFold, /*NumInsns*/1,
3266 // Combiner Rule #1: APlusZeroMinusB
3267 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
3268 GIR_RootToRootCopy, /*OpIdx*/0, // root
3269 GIR_RootToRootCopy, /*OpIdx*/1, // A
3270 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // B
3271 GIR_EraseRootFromParent_Done,
3272 // Label 106: @1269
3273 GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(1303), // Rule ID 2 //
3274 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
3275 // MIs[0] root
3276 // No operand predicates
3277 // MIs[0] A
3278 // No operand predicates
3279 // MIs[0] sub
3280 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
3281 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3282 // MIs[1] B
3283 // No operand predicates
3284 // MIs[1] A
3285 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
3286 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3287 GIM_CheckIsSafeToFold, /*NumInsns*/1,
3288 // Combiner Rule #2: APlusBMinusB
3289 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3290 GIR_EraseRootFromParent_Done,
3291 // Label 107: @1303
3292 GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(1337), // Rule ID 108 //
3293 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule79Enabled),
3294 // MIs[0] dst
3295 // No operand predicates
3296 // MIs[0] __add_sub_reg_match_0.x
3297 // No operand predicates
3298 // MIs[0] __add_sub_reg_match_0.tmp
3299 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
3300 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3301 // MIs[1] src
3302 // No operand predicates
3303 // MIs[1] __add_sub_reg_match_0.x
3304 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
3305 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3306 GIM_CheckIsSafeToFold, /*NumInsns*/1,
3307 // Combiner Rule #79: add_sub_reg @ [__add_sub_reg_match_0[0]]
3308 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
3309 GIR_EraseRootFromParent_Done,
3310 // Label 108: @1337
3311 GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(1382), // Rule ID 6 //
3312 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
3313 // MIs[0] root
3314 // No operand predicates
3315 // MIs[0] A
3316 // No operand predicates
3317 // MIs[0] sub1
3318 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
3319 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3320 // MIs[1] B
3321 // No operand predicates
3322 // MIs[1] add1
3323 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/2, // MIs[2]
3324 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ADD),
3325 // MIs[2] A
3326 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/0, /*OtherOpIdx*/1,
3327 // MIs[2] C
3328 // No operand predicates
3329 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3330 // Combiner Rule #6: APlusBMinusAplusC
3331 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
3332 GIR_RootToRootCopy, /*OpIdx*/0, // root
3333 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // B
3334 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // C
3335 GIR_EraseRootFromParent_Done,
3336 // Label 109: @1382
3337 GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(1427), // Rule ID 7 //
3338 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
3339 // MIs[0] root
3340 // No operand predicates
3341 // MIs[0] A
3342 // No operand predicates
3343 // MIs[0] sub1
3344 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
3345 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
3346 // MIs[1] B
3347 // No operand predicates
3348 // MIs[1] add1
3349 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/2, // MIs[2]
3350 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ADD),
3351 // MIs[2] C
3352 // No operand predicates
3353 // MIs[2] A
3354 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
3355 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3356 // Combiner Rule #7: APlusBMinusCPlusA
3357 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
3358 GIR_RootToRootCopy, /*OpIdx*/0, // root
3359 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // B
3360 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // C
3361 GIR_EraseRootFromParent_Done,
3362 // Label 110: @1427
3363 GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(1450), // Rule ID 86 //
3364 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
3365 // MIs[0] dst
3366 // No operand predicates
3367 // MIs[0] lhs
3368 // No operand predicates
3369 // MIs[0] Operand 2
3370 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3371 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3372 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[1]]
3373 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3374 GIR_EraseRootFromParent_Done,
3375 // Label 111: @1450
3376 GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(1461), // Rule ID 127 //
3377 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule92Enabled),
3378 // MIs[0] root
3379 // No operand predicates
3380 // MIs[0] src1
3381 // No operand predicates
3382 // MIs[0] src2
3383 // No operand predicates
3384 // Combiner Rule #92: reassoc_comm_binops
3385 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner45),
3386 // Label 112: @1461
3387 GIM_Reject,
3388 // Label 2: @1462
3389 GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(1473), // Rule ID 75 //
3390 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
3391 // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_SUB'
3392 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25),
3393 // Label 113: @1473
3394 GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(1484), // Rule ID 213 //
3395 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
3396 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_SUB'
3397 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
3398 // Label 114: @1484
3399 GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(1495), // Rule ID 252 //
3400 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3401 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SUB'
3402 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3403 // Label 115: @1495
3404 GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(1506), // Rule ID 277 //
3405 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule173Enabled),
3406 // Combiner Rule #173: sub_add_reg; wip_match_opcode 'G_SUB'
3407 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner115),
3408 // Label 116: @1506
3409 GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(1533), // Rule ID 49 //
3410 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule47Enabled),
3411 GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap),
3412 // MIs[0] root
3413 // No operand predicates
3414 // MIs[0] x
3415 // No operand predicates
3416 // MIs[0] right
3417 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
3418 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE),
3419 // MIs[1] imm
3420 // No operand predicates
3421 GIM_CheckIsSafeToFold, /*NumInsns*/1,
3422 // Combiner Rule #47: sub_of_vscale
3423 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
3424 // Label 117: @1533
3425 GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(1556), // Rule ID 85 //
3426 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
3427 // MIs[0] dst
3428 // No operand predicates
3429 // MIs[0] lhs
3430 // No operand predicates
3431 // MIs[0] Operand 2
3432 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3433 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3434 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[0]]
3435 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3436 GIR_EraseRootFromParent_Done,
3437 // Label 118: @1556
3438 GIM_Reject,
3439 // Label 3: @1557
3440 GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(1568), // Rule ID 63 //
3441 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled),
3442 // Combiner Rule #57: undef_to_int_zero; wip_match_opcode 'G_MUL'
3443 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner21),
3444 // Label 119: @1568
3445 GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(1579), // Rule ID 214 //
3446 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
3447 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_MUL'
3448 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
3449 // Label 120: @1579
3450 GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(1590), // Rule ID 282 //
3451 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
3452 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_MUL'
3453 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
3454 // Label 121: @1590
3455 GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(1630), // Rule ID 11 //
3456 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
3457 // MIs[0] dst
3458 GIM_RecordRegType, /*MI*/0, /*Op*/0, /*TempTypeIdx*/uint8_t(-1),
3459 // MIs[0] x
3460 // No operand predicates
3461 // MIs[0] Operand 2
3462 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, uint8_t(-1),
3463 GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/uint8_t(-1),
3464 GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
3465 // Combiner Rule #11: mul_by_neg_one
3466 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
3467 GIR_RootToRootCopy, /*OpIdx*/0, // dst
3468 GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
3469 GIR_RootToRootCopy, /*OpIdx*/1, // x
3470 GIR_EraseRootFromParent_Done,
3471 // Label 122: @1630
3472 GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(1665), // Rule ID 47 //
3473 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule45Enabled),
3474 GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap),
3475 // MIs[0] root
3476 // No operand predicates
3477 // MIs[0] left
3478 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3479 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE),
3480 // MIs[1] scale
3481 // No operand predicates
3482 // MIs[0] x
3483 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2]
3484 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT),
3485 // MIs[2] imm1
3486 // No operand predicates
3487 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3488 // Combiner Rule #45: mul_of_vscale
3489 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
3490 // Label 123: @1665
3491 GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(1688), // Rule ID 101 //
3492 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule72Enabled),
3493 // MIs[0] dst
3494 // No operand predicates
3495 // MIs[0] lhs
3496 // No operand predicates
3497 // MIs[0] zero
3498 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3499 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
3500 // Combiner Rule #72: binop_right_to_zero
3501 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
3502 GIR_EraseRootFromParent_Done,
3503 // Label 124: @1688
3504 GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(1711), // Rule ID 106 //
3505 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule77Enabled),
3506 // MIs[0] dst
3507 // No operand predicates
3508 // MIs[0] x
3509 // No operand predicates
3510 // MIs[0] Operand 2
3511 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1,
3512 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3513 // Combiner Rule #77: right_identity_one_int
3514 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3515 GIR_EraseRootFromParent_Done,
3516 // Label 125: @1711
3517 GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(1722), // Rule ID 9 //
3518 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
3519 // MIs[0] d
3520 // No operand predicates
3521 // MIs[0] op1
3522 // No operand predicates
3523 // MIs[0] op2
3524 // No operand predicates
3525 // Combiner Rule #9: mul_to_shl
3526 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
3527 // Label 126: @1722
3528 GIM_Reject,
3529 // Label 4: @1723
3530 GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(1734), // Rule ID 97 //
3531 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled),
3532 // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_SDIV'
3533 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32),
3534 // Label 127: @1734
3535 GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(1745), // Rule ID 192 //
3536 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled),
3537 // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_SDIV'
3538 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86),
3539 // Label 128: @1745
3540 GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(1756), // Rule ID 232 //
3541 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule158Enabled),
3542 // Combiner Rule #158: sdiv_by_const; wip_match_opcode 'G_SDIV'
3543 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner100),
3544 // Label 129: @1756
3545 GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(1767), // Rule ID 257 //
3546 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3547 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SDIV'
3548 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3549 // Label 130: @1767
3550 GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(1784), // Rule ID 233 //
3551 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule159Enabled),
3552 GIM_MIFlagsNot, /*MI*/0, GIMT_Encode4(MachineInstr::IsExact),
3553 // MIs[0] dst
3554 // No operand predicates
3555 // MIs[0] x
3556 // No operand predicates
3557 // MIs[0] y
3558 // No operand predicates
3559 // Combiner Rule #159: sdiv_by_pow2
3560 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner101),
3561 // Label 131: @1784
3562 GIM_Reject,
3563 // Label 5: @1785
3564 GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(1796), // Rule ID 66 //
3565 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
3566 // Combiner Rule #59: binop_left_undef_to_zero; wip_match_opcode 'G_UDIV'
3567 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23),
3568 // Label 132: @1796
3569 GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(1807), // Rule ID 98 //
3570 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled),
3571 // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_UDIV'
3572 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32),
3573 // Label 133: @1807
3574 GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(1818), // Rule ID 193 //
3575 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled),
3576 // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_UDIV'
3577 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86),
3578 // Label 134: @1818
3579 GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(1829), // Rule ID 231 //
3580 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule157Enabled),
3581 // Combiner Rule #157: udiv_by_const; wip_match_opcode 'G_UDIV'
3582 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner99),
3583 // Label 135: @1829
3584 GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(1840), // Rule ID 259 //
3585 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3586 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UDIV'
3587 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3588 // Label 136: @1840
3589 GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(1857), // Rule ID 234 //
3590 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule160Enabled),
3591 GIM_MIFlagsNot, /*MI*/0, GIMT_Encode4(MachineInstr::IsExact),
3592 // MIs[0] dst
3593 // No operand predicates
3594 // MIs[0] x
3595 // No operand predicates
3596 // MIs[0] y
3597 // No operand predicates
3598 // Combiner Rule #160: udiv_by_pow2
3599 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner102),
3600 // Label 137: @1857
3601 GIM_Reject,
3602 // Label 6: @1858
3603 GIM_Try, /*On fail goto*//*Label 138*/ GIMT_Encode4(1869), // Rule ID 99 //
3604 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled),
3605 // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_SREM'
3606 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32),
3607 // Label 138: @1869
3608 GIM_Try, /*On fail goto*//*Label 139*/ GIMT_Encode4(1880), // Rule ID 194 //
3609 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled),
3610 // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_SREM'
3611 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86),
3612 // Label 139: @1880
3613 GIM_Try, /*On fail goto*//*Label 140*/ GIMT_Encode4(1891), // Rule ID 258 //
3614 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3615 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SREM'
3616 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3617 // Label 140: @1891
3618 GIM_Reject,
3619 // Label 7: @1892
3620 GIM_Try, /*On fail goto*//*Label 141*/ GIMT_Encode4(1903), // Rule ID 67 //
3621 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
3622 // Combiner Rule #59: binop_left_undef_to_zero; wip_match_opcode 'G_UREM'
3623 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23),
3624 // Label 141: @1903
3625 GIM_Try, /*On fail goto*//*Label 142*/ GIMT_Encode4(1914), // Rule ID 100 //
3626 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled),
3627 // Combiner Rule #71: binop_left_to_zero; wip_match_opcode 'G_UREM'
3628 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner32),
3629 // Label 142: @1914
3630 GIM_Try, /*On fail goto*//*Label 143*/ GIMT_Encode4(1925), // Rule ID 140 //
3631 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule105Enabled),
3632 // Combiner Rule #105: urem_pow2_to_mask; wip_match_opcode 'G_UREM'
3633 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner57),
3634 // Label 143: @1925
3635 GIM_Try, /*On fail goto*//*Label 144*/ GIMT_Encode4(1936), // Rule ID 195 //
3636 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule139Enabled),
3637 // Combiner Rule #139: div_rem_to_divrem; wip_match_opcode 'G_UREM'
3638 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner86),
3639 // Label 144: @1936
3640 GIM_Try, /*On fail goto*//*Label 145*/ GIMT_Encode4(1947), // Rule ID 260 //
3641 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3642 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UREM'
3643 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3644 // Label 145: @1947
3645 GIM_Reject,
3646 // Label 8: @1948
3647 GIM_Try, /*On fail goto*//*Label 146*/ GIMT_Encode4(1959), // Rule ID 58 //
3648 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule54Enabled),
3649 // Combiner Rule #54: load_and_mask; wip_match_opcode 'G_AND'
3650 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner18),
3651 // Label 146: @1959
3652 GIM_Try, /*On fail goto*//*Label 147*/ GIMT_Encode4(1970), // Rule ID 62 //
3653 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled),
3654 // Combiner Rule #57: undef_to_int_zero; wip_match_opcode 'G_AND'
3655 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner21),
3656 // Label 147: @1970
3657 GIM_Try, /*On fail goto*//*Label 148*/ GIMT_Encode4(1981), // Rule ID 120 //
3658 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled),
3659 // Combiner Rule #89: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_AND'
3660 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
3661 // Label 148: @1981
3662 GIM_Try, /*On fail goto*//*Label 149*/ GIMT_Encode4(1992), // Rule ID 132 //
3663 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule97Enabled),
3664 // Combiner Rule #97: narrow_binop_feeding_and; wip_match_opcode 'G_AND'
3665 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner50),
3666 // Label 149: @1992
3667 GIM_Try, /*On fail goto*//*Label 150*/ GIMT_Encode4(2003), // Rule ID 137 //
3668 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule102Enabled),
3669 // Combiner Rule #102: redundant_and; wip_match_opcode 'G_AND'
3670 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner54),
3671 // Label 150: @2003
3672 GIM_Try, /*On fail goto*//*Label 151*/ GIMT_Encode4(2014), // Rule ID 165 //
3673 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule128Enabled),
3674 // Combiner Rule #128: overlapping_and; wip_match_opcode 'G_AND'
3675 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner75),
3676 // Label 151: @2014
3677 GIM_Try, /*On fail goto*//*Label 152*/ GIMT_Encode4(2025), // Rule ID 215 //
3678 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
3679 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_AND'
3680 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
3681 // Label 152: @2025
3682 GIM_Try, /*On fail goto*//*Label 153*/ GIMT_Encode4(2036), // Rule ID 242 //
3683 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule163Enabled),
3684 // Combiner Rule #163: and_or_disjoint_mask; wip_match_opcode 'G_AND'
3685 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner105),
3686 // Label 153: @2036
3687 GIM_Try, /*On fail goto*//*Label 154*/ GIMT_Encode4(2047), // Rule ID 254 //
3688 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3689 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_AND'
3690 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3691 // Label 154: @2047
3692 GIM_Try, /*On fail goto*//*Label 155*/ GIMT_Encode4(2058), // Rule ID 283 //
3693 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
3694 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_AND'
3695 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
3696 // Label 155: @2058
3697 GIM_Try, /*On fail goto*//*Label 156*/ GIMT_Encode4(2069), // Rule ID 310 //
3698 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule179Enabled),
3699 // Combiner Rule #179: match_ands; wip_match_opcode 'G_AND'
3700 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner121),
3701 // Label 156: @2069
3702 GIM_Try, /*On fail goto*//*Label 157*/ GIMT_Encode4(2167), // Rule ID 313 //
3703 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule182Enabled),
3704 // MIs[0] root
3705 // No operand predicates
3706 // MIs[0] d1
3707 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3708 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ICMP),
3709 // MIs[1] p
3710 // No operand predicates
3711 // MIs[1] s1
3712 GIM_RecordRegType, /*MI*/1, /*Op*/2, /*TempTypeIdx*/uint8_t(-1),
3713 // MIs[1] Operand 3
3714 GIM_CheckConstantInt8, /*MI*/1, /*Op*/3, 0,
3715 // MIs[0] d2
3716 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2]
3717 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ICMP),
3718 // MIs[2] p
3719 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/1, /*OtherOpIdx*/1,
3720 // MIs[2] s2
3721 // No operand predicates
3722 // MIs[2] Operand 3
3723 GIM_CheckConstantInt8, /*MI*/2, /*Op*/3, 0,
3724 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner7),
3725 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3726 GIR_MakeTempReg, /*TempRegID*/1, /*TypeID*/uint8_t(-1),
3727 GIR_BuildConstant, /*TempRegID*/1, /*Val*/GIMT_Encode8(0),
3728 GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/uint8_t(-1),
3729 // Combiner Rule #182: double_icmp_zero_and_combine
3730 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_OR),
3731 GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(RegState::Define),
3732 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // s1
3733 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // s2
3734 GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ICMP),
3735 GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // root
3736 GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/1, /*OpIdx*/1, // p
3737 GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0,
3738 GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/1,
3739 GIR_EraseRootFromParent_Done,
3740 // Label 157: @2167
3741 GIM_Try, /*On fail goto*//*Label 158*/ GIMT_Encode4(2204), // Rule ID 207 //
3742 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule149Enabled),
3743 // MIs[0] root
3744 // No operand predicates
3745 // MIs[0] shift
3746 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3747 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_LSHR),
3748 // MIs[1] x
3749 // No operand predicates
3750 // MIs[1] lsb
3751 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/2, // MIs[2]
3752 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT),
3753 // MIs[2] imm1
3754 // No operand predicates
3755 // MIs[0] mask
3756 GIM_RecordInsnIgnoreCopies, /*DefineMI*/3, /*MI*/0, /*OpIdx*/2, // MIs[3]
3757 GIM_CheckOpcode, /*MI*/3, GIMT_Encode2(TargetOpcode::G_CONSTANT),
3758 // MIs[3] imm2
3759 // No operand predicates
3760 GIM_CheckIsSafeToFold, /*NumInsns*/3,
3761 // Combiner Rule #149: bitfield_extract_from_and
3762 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner92),
3763 // Label 158: @2204
3764 GIM_Try, /*On fail goto*//*Label 159*/ GIMT_Encode4(2228), // Rule ID 95 //
3765 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3766 // MIs[0] dst
3767 // No operand predicates
3768 // MIs[0] src
3769 // No operand predicates
3770 // MIs[0] src
3771 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
3772 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3773 // Combiner Rule #70: binop_same_val @ [__binop_same_val_match_0[0]]
3774 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3775 GIR_EraseRootFromParent_Done,
3776 // Label 159: @2228
3777 GIM_Reject,
3778 // Label 9: @2229
3779 GIM_Try, /*On fail goto*//*Label 160*/ GIMT_Encode4(2240), // Rule ID 64 //
3780 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule58Enabled),
3781 // Combiner Rule #58: undef_to_negative_one; wip_match_opcode 'G_OR'
3782 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner22),
3783 // Label 160: @2240
3784 GIM_Try, /*On fail goto*//*Label 161*/ GIMT_Encode4(2251), // Rule ID 121 //
3785 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled),
3786 // Combiner Rule #89: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_OR'
3787 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
3788 // Label 161: @2251
3789 GIM_Try, /*On fail goto*//*Label 162*/ GIMT_Encode4(2262), // Rule ID 139 //
3790 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule104Enabled),
3791 // Combiner Rule #104: redundant_or; wip_match_opcode 'G_OR'
3792 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner56),
3793 // Label 162: @2262
3794 GIM_Try, /*On fail goto*//*Label 163*/ GIMT_Encode4(2273), // Rule ID 191 //
3795 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule138Enabled),
3796 // Combiner Rule #138: load_or_combine; wip_match_opcode 'G_OR'
3797 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner85),
3798 // Label 163: @2273
3799 GIM_Try, /*On fail goto*//*Label 164*/ GIMT_Encode4(2284), // Rule ID 196 //
3800 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule140Enabled),
3801 // Combiner Rule #140: funnel_shift_from_or_shift; wip_match_opcode 'G_OR'
3802 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner87),
3803 // Label 164: @2284
3804 GIM_Try, /*On fail goto*//*Label 165*/ GIMT_Encode4(2295), // Rule ID 216 //
3805 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
3806 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_OR'
3807 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
3808 // Label 165: @2295
3809 GIM_Try, /*On fail goto*//*Label 166*/ GIMT_Encode4(2306), // Rule ID 255 //
3810 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3811 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_OR'
3812 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3813 // Label 166: @2306
3814 GIM_Try, /*On fail goto*//*Label 167*/ GIMT_Encode4(2317), // Rule ID 284 //
3815 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
3816 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_OR'
3817 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
3818 // Label 167: @2317
3819 GIM_Try, /*On fail goto*//*Label 168*/ GIMT_Encode4(2328), // Rule ID 311 //
3820 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule180Enabled),
3821 // Combiner Rule #180: match_ors; wip_match_opcode 'G_OR'
3822 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner122),
3823 // Label 168: @2328
3824 GIM_Try, /*On fail goto*//*Label 169*/ GIMT_Encode4(2426), // Rule ID 314 //
3825 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule183Enabled),
3826 // MIs[0] root
3827 // No operand predicates
3828 // MIs[0] d1
3829 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3830 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ICMP),
3831 // MIs[1] p
3832 // No operand predicates
3833 // MIs[1] s1
3834 GIM_RecordRegType, /*MI*/1, /*Op*/2, /*TempTypeIdx*/uint8_t(-1),
3835 // MIs[1] Operand 3
3836 GIM_CheckConstantInt8, /*MI*/1, /*Op*/3, 0,
3837 // MIs[0] d2
3838 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2]
3839 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_ICMP),
3840 // MIs[2] p
3841 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/2, /*OpIdx*/1, /*OtherMI*/1, /*OtherOpIdx*/1,
3842 // MIs[2] s2
3843 // No operand predicates
3844 // MIs[2] Operand 3
3845 GIM_CheckConstantInt8, /*MI*/2, /*Op*/3, 0,
3846 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner8),
3847 GIM_CheckIsSafeToFold, /*NumInsns*/2,
3848 GIR_MakeTempReg, /*TempRegID*/1, /*TypeID*/uint8_t(-1),
3849 GIR_BuildConstant, /*TempRegID*/1, /*Val*/GIMT_Encode8(0),
3850 GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/uint8_t(-1),
3851 // Combiner Rule #183: double_icmp_zero_or_combine
3852 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_OR),
3853 GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(RegState::Define),
3854 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // s1
3855 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/2, // s2
3856 GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ICMP),
3857 GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // root
3858 GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/1, /*OpIdx*/1, // p
3859 GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0,
3860 GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/1,
3861 GIR_EraseRootFromParent_Done,
3862 // Label 169: @2426
3863 GIM_Try, /*On fail goto*//*Label 170*/ GIMT_Encode4(2450), // Rule ID 96 //
3864 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3865 // MIs[0] dst
3866 // No operand predicates
3867 // MIs[0] src
3868 // No operand predicates
3869 // MIs[0] src
3870 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
3871 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3872 // Combiner Rule #70: binop_same_val @ [__binop_same_val_match_0[1]]
3873 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3874 GIR_EraseRootFromParent_Done,
3875 // Label 170: @2450
3876 GIM_Try, /*On fail goto*//*Label 171*/ GIMT_Encode4(2473), // Rule ID 87 //
3877 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
3878 // MIs[0] dst
3879 // No operand predicates
3880 // MIs[0] lhs
3881 // No operand predicates
3882 // MIs[0] Operand 2
3883 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3884 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3885 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[2]]
3886 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3887 GIR_EraseRootFromParent_Done,
3888 // Label 171: @2473
3889 GIM_Reject,
3890 // Label 10: @2474
3891 GIM_Try, /*On fail goto*//*Label 172*/ GIMT_Encode4(2485), // Rule ID 76 //
3892 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
3893 // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_XOR'
3894 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25),
3895 // Label 172: @2485
3896 GIM_Try, /*On fail goto*//*Label 173*/ GIMT_Encode4(2496), // Rule ID 122 //
3897 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule89Enabled),
3898 // Combiner Rule #89: hoist_logic_op_with_same_opcode_hands; wip_match_opcode 'G_XOR'
3899 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner42),
3900 // Label 173: @2496
3901 GIM_Try, /*On fail goto*//*Label 174*/ GIMT_Encode4(2507), // Rule ID 148 //
3902 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule111Enabled),
3903 // Combiner Rule #111: not_cmp_fold; wip_match_opcode 'G_XOR'
3904 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner63),
3905 // Label 174: @2507
3906 GIM_Try, /*On fail goto*//*Label 175*/ GIMT_Encode4(2518), // Rule ID 179 //
3907 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule134Enabled),
3908 // Combiner Rule #134: xor_of_and_with_same_reg; wip_match_opcode 'G_XOR'
3909 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner81),
3910 // Label 175: @2518
3911 GIM_Try, /*On fail goto*//*Label 176*/ GIMT_Encode4(2529), // Rule ID 217 //
3912 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
3913 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_XOR'
3914 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
3915 // Label 176: @2529
3916 GIM_Try, /*On fail goto*//*Label 177*/ GIMT_Encode4(2540), // Rule ID 256 //
3917 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
3918 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_XOR'
3919 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
3920 // Label 177: @2540
3921 GIM_Try, /*On fail goto*//*Label 178*/ GIMT_Encode4(2551), // Rule ID 285 //
3922 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
3923 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_XOR'
3924 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
3925 // Label 178: @2551
3926 GIM_Try, /*On fail goto*//*Label 179*/ GIMT_Encode4(2574), // Rule ID 88 //
3927 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
3928 // MIs[0] dst
3929 // No operand predicates
3930 // MIs[0] lhs
3931 // No operand predicates
3932 // MIs[0] Operand 2
3933 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3934 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3935 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[3]]
3936 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3937 GIR_EraseRootFromParent_Done,
3938 // Label 179: @2574
3939 GIM_Reject,
3940 // Label 11: @2575
3941 GIM_Try, /*On fail goto*//*Label 180*/ GIMT_Encode4(2586), // Rule ID 118 //
3942 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule87Enabled),
3943 // Combiner Rule #87: extend_through_phis; wip_match_opcode 'G_PHI'
3944 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner40),
3945 // Label 180: @2586
3946 GIM_Reject,
3947 // Label 12: @2587
3948 GIM_Try, /*On fail goto*//*Label 181*/ GIMT_Encode4(2598), // Rule ID 81 //
3949 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule66Enabled),
3950 // Combiner Rule #66: unmerge_undef; wip_match_opcode 'G_UNMERGE_VALUES'
3951 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner29),
3952 // Label 181: @2598
3953 GIM_Try, /*On fail goto*//*Label 182*/ GIMT_Encode4(2609), // Rule ID 150 //
3954 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule113Enabled),
3955 // Combiner Rule #113: unmerge_merge; wip_match_opcode 'G_UNMERGE_VALUES'
3956 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner65),
3957 // Label 182: @2609
3958 GIM_Try, /*On fail goto*//*Label 183*/ GIMT_Encode4(2620), // Rule ID 151 //
3959 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule114Enabled),
3960 // Combiner Rule #114: unmerge_cst; wip_match_opcode 'G_UNMERGE_VALUES'
3961 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner66),
3962 // Label 183: @2620
3963 GIM_Try, /*On fail goto*//*Label 184*/ GIMT_Encode4(2631), // Rule ID 152 //
3964 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule115Enabled),
3965 // Combiner Rule #115: unmerge_dead_to_trunc; wip_match_opcode 'G_UNMERGE_VALUES'
3966 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner67),
3967 // Label 184: @2631
3968 GIM_Try, /*On fail goto*//*Label 185*/ GIMT_Encode4(2642), // Rule ID 153 //
3969 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule116Enabled),
3970 // Combiner Rule #116: unmerge_zext_to_zext; wip_match_opcode 'G_UNMERGE_VALUES'
3971 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner68),
3972 // Label 185: @2642
3973 GIM_Reject,
3974 // Label 13: @2643
3975 GIM_Try, /*On fail goto*//*Label 186*/ GIMT_Encode4(2654), // Rule ID 154 //
3976 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule117Enabled),
3977 // Combiner Rule #117: merge_unmerge; wip_match_opcode 'G_MERGE_VALUES'
3978 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner69),
3979 // Label 186: @2654
3980 GIM_Reject,
3981 // Label 14: @2655
3982 GIM_Try, /*On fail goto*//*Label 187*/ GIMT_Encode4(2666), // Rule ID 54 //
3983 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule52Enabled),
3984 // Combiner Rule #52: extract_all_elts_from_build_vector; wip_match_opcode 'G_BUILD_VECTOR'
3985 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner16),
3986 // Label 187: @2666
3987 GIM_Try, /*On fail goto*//*Label 188*/ GIMT_Encode4(2677), // Rule ID 111 //
3988 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule80Enabled),
3989 // Combiner Rule #80: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR'
3990 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner36),
3991 // Label 188: @2677
3992 GIM_Reject,
3993 // Label 15: @2678
3994 GIM_Try, /*On fail goto*//*Label 189*/ GIMT_Encode4(2689), // Rule ID 110 //
3995 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule80Enabled),
3996 // Combiner Rule #80: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC'
3997 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner36),
3998 // Label 189: @2689
3999 GIM_Reject,
4000 // Label 16: @2690
4001 GIM_Try, /*On fail goto*//*Label 190*/ GIMT_Encode4(2701), // Rule ID 312 //
4002 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule181Enabled),
4003 // Combiner Rule #181: combine_concat_vector; wip_match_opcode 'G_CONCAT_VECTORS'
4004 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner123),
4005 // Label 190: @2701
4006 GIM_Reject,
4007 // Label 17: @2702
4008 GIM_Try, /*On fail goto*//*Label 191*/ GIMT_Encode4(2723), // Rule ID 103 //
4009 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule74Enabled),
4010 // MIs[0] dst
4011 // No operand predicates
4012 // MIs[0] t
4013 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4014 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
4015 // MIs[1] ptr
4016 // No operand predicates
4017 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4018 // Combiner Rule #74: i2p_to_p2i
4019 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner34),
4020 // Label 191: @2723
4021 GIM_Reject,
4022 // Label 18: @2724
4023 GIM_Try, /*On fail goto*//*Label 192*/ GIMT_Encode4(2735), // Rule ID 102 //
4024 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
4025 // Combiner Rule #73: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR'
4026 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner33),
4027 // Label 192: @2735
4028 GIM_Reject,
4029 // Label 19: @2736
4030 GIM_Try, /*On fail goto*//*Label 193*/ GIMT_Encode4(2757), // Rule ID 114 //
4031 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule83Enabled),
4032 // MIs[0] dst
4033 // No operand predicates
4034 // MIs[0] src1
4035 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4036 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
4037 // MIs[1] src0
4038 // No operand predicates
4039 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4040 // Combiner Rule #83: bitcast_bitcast_fold
4041 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner39),
4042 // Label 193: @2757
4043 GIM_Reject,
4044 // Label 20: @2758
4045 GIM_Try, /*On fail goto*//*Label 194*/ GIMT_Encode4(2787), // Rule ID 12 //
4046 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
4047 // MIs[0] dst
4048 // No operand predicates
4049 // MIs[0] src
4050 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4051 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FREEZE),
4052 // MIs[1] __idempotent_prop_match_0.x
4053 // No operand predicates
4054 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4055 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4056 // Combiner Rule #12: idempotent_prop @ [__idempotent_prop_match_0[0]]
4057 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4058 GIR_EraseRootFromParent_Done,
4059 // Label 194: @2787
4060 GIM_Try, /*On fail goto*//*Label 195*/ GIMT_Encode4(2810), // Rule ID 50 //
4061 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule48Enabled),
4062 // MIs[0] root
4063 // No operand predicates
4064 // MIs[0] src
4065 // No operand predicates
4066 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
4067 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4068 // Combiner Rule #48: freeze_of_non_undef_non_poison
4069 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4070 GIR_EraseRootFromParent_Done,
4071 // Label 195: @2810
4072 GIM_Try, /*On fail goto*//*Label 196*/ GIMT_Encode4(2821), // Rule ID 51 //
4073 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule49Enabled),
4074 // MIs[0] dst
4075 // No operand predicates
4076 // MIs[0] src
4077 // No operand predicates
4078 // Combiner Rule #49: push_freeze_to_prevent_poison_from_propagating
4079 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
4080 // Label 196: @2821
4081 GIM_Reject,
4082 // Label 21: @2822
4083 GIM_Try, /*On fail goto*//*Label 197*/ GIMT_Encode4(2833), // Rule ID 55 //
4084 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled),
4085 // Combiner Rule #53: extending_loads; wip_match_opcode 'G_LOAD'
4086 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17),
4087 // Label 197: @2833
4088 GIM_Reject,
4089 // Label 22: @2834
4090 GIM_Try, /*On fail goto*//*Label 198*/ GIMT_Encode4(2845), // Rule ID 56 //
4091 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled),
4092 // Combiner Rule #53: extending_loads; wip_match_opcode 'G_SEXTLOAD'
4093 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17),
4094 // Label 198: @2845
4095 GIM_Reject,
4096 // Label 23: @2846
4097 GIM_Try, /*On fail goto*//*Label 199*/ GIMT_Encode4(2857), // Rule ID 57 //
4098 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled),
4099 // Combiner Rule #53: extending_loads; wip_match_opcode 'G_ZEXTLOAD'
4100 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17),
4101 // Label 199: @2857
4102 GIM_Reject,
4103 // Label 24: @2858
4104 GIM_Try, /*On fail goto*//*Label 200*/ GIMT_Encode4(2869), // Rule ID 80 //
4105 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
4106 // Combiner Rule #65: erase_undef_store; wip_match_opcode 'G_STORE'
4107 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner28),
4108 // Label 200: @2869
4109 GIM_Reject,
4110 // Label 25: @2870
4111 GIM_Try, /*On fail goto*//*Label 201*/ GIMT_Encode4(2881), // Rule ID 104 //
4112 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule75Enabled),
4113 // Combiner Rule #75: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT'
4114 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner35),
4115 // Label 201: @2881
4116 GIM_Try, /*On fail goto*//*Label 202*/ GIMT_Encode4(2892), // Rule ID 145 //
4117 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
4118 // Combiner Rule #110: ext_ext_fold; wip_match_opcode 'G_ANYEXT'
4119 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62),
4120 // Label 202: @2892
4121 GIM_Try, /*On fail goto*//*Label 203*/ GIMT_Encode4(2903), // Rule ID 229 //
4122 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule155Enabled),
4123 // Combiner Rule #155: constant_fold_cast_op; wip_match_opcode 'G_ANYEXT'
4124 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner98),
4125 // Label 203: @2903
4126 GIM_Reject,
4127 // Label 26: @2904
4128 GIM_Try, /*On fail goto*//*Label 204*/ GIMT_Encode4(2915), // Rule ID 77 //
4129 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
4130 // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_TRUNC'
4131 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25),
4132 // Label 204: @2915
4133 GIM_Try, /*On fail goto*//*Label 205*/ GIMT_Encode4(2926), // Rule ID 112 //
4134 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule81Enabled),
4135 // Combiner Rule #81: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC'
4136 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner37),
4137 // Label 205: @2926
4138 GIM_Try, /*On fail goto*//*Label 206*/ GIMT_Encode4(2937), // Rule ID 113 //
4139 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule82Enabled),
4140 // Combiner Rule #82: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC'
4141 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner38),
4142 // Label 206: @2937
4143 GIM_Try, /*On fail goto*//*Label 207*/ GIMT_Encode4(2948), // Rule ID 155 //
4144 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule118Enabled),
4145 // Combiner Rule #118: trunc_ext_fold; wip_match_opcode 'G_TRUNC'
4146 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner70),
4147 // Label 207: @2948
4148 GIM_Try, /*On fail goto*//*Label 208*/ GIMT_Encode4(2959), // Rule ID 156 //
4149 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule119Enabled),
4150 // Combiner Rule #119: trunc_shift; wip_match_opcode 'G_TRUNC'
4151 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner71),
4152 // Label 208: @2959
4153 GIM_Reject,
4154 // Label 27: @2960
4155 GIM_Try, /*On fail goto*//*Label 209*/ GIMT_Encode4(2971), // Rule ID 146 //
4156 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
4157 // Combiner Rule #110: ext_ext_fold; wip_match_opcode 'G_SEXT'
4158 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62),
4159 // Label 209: @2971
4160 GIM_Try, /*On fail goto*//*Label 210*/ GIMT_Encode4(2982), // Rule ID 228 //
4161 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule155Enabled),
4162 // Combiner Rule #155: constant_fold_cast_op; wip_match_opcode 'G_SEXT'
4163 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner98),
4164 // Label 210: @2982
4165 GIM_Try, /*On fail goto*//*Label 211*/ GIMT_Encode4(3009), // Rule ID 317 //
4166 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule185Enabled),
4167 // MIs[0] root
4168 // No operand predicates
4169 // MIs[0] src
4170 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4171 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_TRUNC),
4172 GIM_MIFlags, /*MI*/1, GIMT_Encode4(MachineInstr::NoSWrap),
4173 // MIs[1] x
4174 // No operand predicates
4175 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4176 // Combiner Rule #185: sext_trunc
4177 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner125),
4178 // Label 211: @3009
4179 GIM_Reject,
4180 // Label 28: @3010
4181 GIM_Try, /*On fail goto*//*Label 212*/ GIMT_Encode4(3021), // Rule ID 130 //
4182 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule95Enabled),
4183 // Combiner Rule #95: sext_inreg_of_load; wip_match_opcode 'G_SEXT_INREG'
4184 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner48),
4185 // Label 212: @3021
4186 GIM_Try, /*On fail goto*//*Label 213*/ GIMT_Encode4(3032), // Rule ID 138 //
4187 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule103Enabled),
4188 // Combiner Rule #103: redundant_sext_inreg; wip_match_opcode 'G_SEXT_INREG'
4189 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner55),
4190 // Label 213: @3032
4191 GIM_Try, /*On fail goto*//*Label 214*/ GIMT_Encode4(3043), // Rule ID 206 //
4192 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule148Enabled),
4193 // Combiner Rule #148: bitfield_extract_from_sext_inreg; wip_match_opcode 'G_SEXT_INREG'
4194 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner91),
4195 // Label 214: @3043
4196 GIM_Try, /*On fail goto*//*Label 215*/ GIMT_Encode4(3054), // Rule ID 144 //
4197 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule109Enabled),
4198 // MIs[0] dst
4199 // No operand predicates
4200 // MIs[0] src
4201 // No operand predicates
4202 // MIs[0] imm
4203 // No operand predicates
4204 // Combiner Rule #109: sext_inreg_to_zext_inreg
4205 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner61),
4206 // Label 215: @3054
4207 GIM_Reject,
4208 // Label 29: @3055
4209 GIM_Try, /*On fail goto*//*Label 216*/ GIMT_Encode4(3066), // Rule ID 141 //
4210 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule106Enabled),
4211 // Combiner Rule #106: zext_trunc_fold; wip_match_opcode 'G_ZEXT'
4212 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner58),
4213 // Label 216: @3066
4214 GIM_Try, /*On fail goto*//*Label 217*/ GIMT_Encode4(3077), // Rule ID 147 //
4215 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule110Enabled),
4216 // Combiner Rule #110: ext_ext_fold; wip_match_opcode 'G_ZEXT'
4217 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner62),
4218 // Label 217: @3077
4219 GIM_Try, /*On fail goto*//*Label 218*/ GIMT_Encode4(3088), // Rule ID 227 //
4220 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule155Enabled),
4221 // Combiner Rule #155: constant_fold_cast_op; wip_match_opcode 'G_ZEXT'
4222 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner98),
4223 // Label 218: @3088
4224 GIM_Try, /*On fail goto*//*Label 219*/ GIMT_Encode4(3115), // Rule ID 318 //
4225 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule186Enabled),
4226 // MIs[0] root
4227 // No operand predicates
4228 // MIs[0] src
4229 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4230 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_TRUNC),
4231 GIM_MIFlags, /*MI*/1, GIMT_Encode4(MachineInstr::NoUWrap),
4232 // MIs[1] x
4233 // No operand predicates
4234 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4235 // Combiner Rule #186: zext_trunc
4236 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner126),
4237 // Label 219: @3115
4238 GIM_Try, /*On fail goto*//*Label 220*/ GIMT_Encode4(3132), // Rule ID 319 //
4239 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule187Enabled),
4240 GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NonNeg),
4241 // MIs[0] root
4242 // No operand predicates
4243 // MIs[0] x
4244 // No operand predicates
4245 // Combiner Rule #187: nneg_zext
4246 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner127),
4247 // Label 220: @3132
4248 GIM_Reject,
4249 // Label 30: @3133
4250 GIM_Try, /*On fail goto*//*Label 221*/ GIMT_Encode4(3144), // Rule ID 65 //
4251 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
4252 // Combiner Rule #59: binop_left_undef_to_zero; wip_match_opcode 'G_SHL'
4253 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23),
4254 // Label 221: @3144
4255 GIM_Try, /*On fail goto*//*Label 222*/ GIMT_Encode4(3155), // Rule ID 68 //
4256 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled),
4257 // Combiner Rule #60: binop_right_undef_to_undef; wip_match_opcode 'G_SHL'
4258 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24),
4259 // Label 222: @3155
4260 GIM_Try, /*On fail goto*//*Label 223*/ GIMT_Encode4(3166), // Rule ID 123 //
4261 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled),
4262 // Combiner Rule #90: shifts_too_big; wip_match_opcode 'G_SHL'
4263 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4264 // Label 223: @3166
4265 GIM_Try, /*On fail goto*//*Label 224*/ GIMT_Encode4(3177), // Rule ID 181 //
4266 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled),
4267 // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_SHL'
4268 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83),
4269 // Label 224: @3177
4270 GIM_Try, /*On fail goto*//*Label 225*/ GIMT_Encode4(3188), // Rule ID 186 //
4271 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled),
4272 // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_SHL'
4273 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84),
4274 // Label 225: @3188
4275 GIM_Try, /*On fail goto*//*Label 226*/ GIMT_Encode4(3199), // Rule ID 205 //
4276 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule147Enabled),
4277 // Combiner Rule #147: commute_shift; wip_match_opcode 'G_SHL'
4278 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner90),
4279 // Label 226: @3199
4280 GIM_Try, /*On fail goto*//*Label 227*/ GIMT_Encode4(3210), // Rule ID 218 //
4281 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
4282 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_SHL'
4283 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
4284 // Label 227: @3210
4285 GIM_Try, /*On fail goto*//*Label 228*/ GIMT_Encode4(3221), // Rule ID 263 //
4286 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4287 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SHL'
4288 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4289 // Label 228: @3221
4290 GIM_Try, /*On fail goto*//*Label 229*/ GIMT_Encode4(3256), // Rule ID 48 //
4291 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule46Enabled),
4292 GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::NoSWrap),
4293 // MIs[0] root
4294 // No operand predicates
4295 // MIs[0] left
4296 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4297 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_VSCALE),
4298 // MIs[1] imm
4299 // No operand predicates
4300 // MIs[0] x
4301 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/0, /*OpIdx*/2, // MIs[2]
4302 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT),
4303 // MIs[2] imm1
4304 // No operand predicates
4305 GIM_CheckIsSafeToFold, /*NumInsns*/2,
4306 // Combiner Rule #46: shl_of_vscale
4307 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
4308 // Label 229: @3256
4309 GIM_Try, /*On fail goto*//*Label 230*/ GIMT_Encode4(3279), // Rule ID 89 //
4310 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
4311 // MIs[0] dst
4312 // No operand predicates
4313 // MIs[0] lhs
4314 // No operand predicates
4315 // MIs[0] Operand 2
4316 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
4317 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4318 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[4]]
4319 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4320 GIR_EraseRootFromParent_Done,
4321 // Label 230: @3279
4322 GIM_Try, /*On fail goto*//*Label 231*/ GIMT_Encode4(3290), // Rule ID 131 //
4323 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule96Enabled),
4324 // MIs[0] dst
4325 // No operand predicates
4326 // MIs[0] src0
4327 // No operand predicates
4328 // MIs[0] src1
4329 // No operand predicates
4330 // Combiner Rule #96: reduce_shl_of_extend
4331 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner49),
4332 // Label 231: @3290
4333 GIM_Reject,
4334 // Label 31: @3291
4335 GIM_Try, /*On fail goto*//*Label 232*/ GIMT_Encode4(3302), // Rule ID 70 //
4336 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled),
4337 // Combiner Rule #60: binop_right_undef_to_undef; wip_match_opcode 'G_LSHR'
4338 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24),
4339 // Label 232: @3302
4340 GIM_Try, /*On fail goto*//*Label 233*/ GIMT_Encode4(3313), // Rule ID 125 //
4341 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled),
4342 // Combiner Rule #90: shifts_too_big; wip_match_opcode 'G_LSHR'
4343 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4344 // Label 233: @3313
4345 GIM_Try, /*On fail goto*//*Label 234*/ GIMT_Encode4(3324), // Rule ID 183 //
4346 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled),
4347 // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_LSHR'
4348 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83),
4349 // Label 234: @3324
4350 GIM_Try, /*On fail goto*//*Label 235*/ GIMT_Encode4(3335), // Rule ID 188 //
4351 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled),
4352 // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_LSHR'
4353 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84),
4354 // Label 235: @3335
4355 GIM_Try, /*On fail goto*//*Label 236*/ GIMT_Encode4(3346), // Rule ID 209 //
4356 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule150Enabled),
4357 // Combiner Rule #150: bitfield_extract_from_shr; wip_match_opcode 'G_LSHR'
4358 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner93),
4359 // Label 236: @3346
4360 GIM_Try, /*On fail goto*//*Label 237*/ GIMT_Encode4(3357), // Rule ID 211 //
4361 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule151Enabled),
4362 // Combiner Rule #151: bitfield_extract_from_shr_and; wip_match_opcode 'G_LSHR'
4363 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner94),
4364 // Label 237: @3357
4365 GIM_Try, /*On fail goto*//*Label 238*/ GIMT_Encode4(3368), // Rule ID 219 //
4366 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
4367 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_LSHR'
4368 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
4369 // Label 238: @3368
4370 GIM_Try, /*On fail goto*//*Label 239*/ GIMT_Encode4(3379), // Rule ID 261 //
4371 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4372 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_LSHR'
4373 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4374 // Label 239: @3379
4375 GIM_Try, /*On fail goto*//*Label 240*/ GIMT_Encode4(3402), // Rule ID 91 //
4376 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
4377 // MIs[0] dst
4378 // No operand predicates
4379 // MIs[0] lhs
4380 // No operand predicates
4381 // MIs[0] Operand 2
4382 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
4383 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4384 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[6]]
4385 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4386 GIR_EraseRootFromParent_Done,
4387 // Label 240: @3402
4388 GIM_Reject,
4389 // Label 32: @3403
4390 GIM_Try, /*On fail goto*//*Label 241*/ GIMT_Encode4(3414), // Rule ID 69 //
4391 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled),
4392 // Combiner Rule #60: binop_right_undef_to_undef; wip_match_opcode 'G_ASHR'
4393 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner24),
4394 // Label 241: @3414
4395 GIM_Try, /*On fail goto*//*Label 242*/ GIMT_Encode4(3425), // Rule ID 124 //
4396 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule90Enabled),
4397 // Combiner Rule #90: shifts_too_big; wip_match_opcode 'G_ASHR'
4398 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner43),
4399 // Label 242: @3425
4400 GIM_Try, /*On fail goto*//*Label 243*/ GIMT_Encode4(3436), // Rule ID 129 //
4401 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule94Enabled),
4402 // Combiner Rule #94: shl_ashr_to_sext_inreg; wip_match_opcode 'G_ASHR'
4403 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner47),
4404 // Label 243: @3436
4405 GIM_Try, /*On fail goto*//*Label 244*/ GIMT_Encode4(3447), // Rule ID 182 //
4406 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled),
4407 // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_ASHR'
4408 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83),
4409 // Label 244: @3447
4410 GIM_Try, /*On fail goto*//*Label 245*/ GIMT_Encode4(3458), // Rule ID 187 //
4411 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled),
4412 // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_ASHR'
4413 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84),
4414 // Label 245: @3458
4415 GIM_Try, /*On fail goto*//*Label 246*/ GIMT_Encode4(3469), // Rule ID 208 //
4416 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule150Enabled),
4417 // Combiner Rule #150: bitfield_extract_from_shr; wip_match_opcode 'G_ASHR'
4418 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner93),
4419 // Label 246: @3469
4420 GIM_Try, /*On fail goto*//*Label 247*/ GIMT_Encode4(3480), // Rule ID 210 //
4421 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule151Enabled),
4422 // Combiner Rule #151: bitfield_extract_from_shr_and; wip_match_opcode 'G_ASHR'
4423 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner94),
4424 // Label 247: @3480
4425 GIM_Try, /*On fail goto*//*Label 248*/ GIMT_Encode4(3491), // Rule ID 220 //
4426 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule152Enabled),
4427 // Combiner Rule #152: constant_fold_binop; wip_match_opcode 'G_ASHR'
4428 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner95),
4429 // Label 248: @3491
4430 GIM_Try, /*On fail goto*//*Label 249*/ GIMT_Encode4(3502), // Rule ID 262 //
4431 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4432 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_ASHR'
4433 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4434 // Label 249: @3502
4435 GIM_Try, /*On fail goto*//*Label 250*/ GIMT_Encode4(3525), // Rule ID 90 //
4436 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
4437 // MIs[0] dst
4438 // No operand predicates
4439 // MIs[0] lhs
4440 // No operand predicates
4441 // MIs[0] Operand 2
4442 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
4443 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4444 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[5]]
4445 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4446 GIR_EraseRootFromParent_Done,
4447 // Label 250: @3525
4448 GIM_Reject,
4449 // Label 33: @3526
4450 GIM_Try, /*On fail goto*//*Label 251*/ GIMT_Encode4(3537), // Rule ID 197 //
4451 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule141Enabled),
4452 // Combiner Rule #141: funnel_shift_to_rotate; wip_match_opcode 'G_FSHL'
4453 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner88),
4454 // Label 251: @3537
4455 GIM_Try, /*On fail goto*//*Label 252*/ GIMT_Encode4(3548), // Rule ID 201 //
4456 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule144Enabled),
4457 // Combiner Rule #144: funnel_shift_overshift; wip_match_opcode 'G_FSHL'
4458 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner89),
4459 // Label 252: @3548
4460 GIM_Try, /*On fail goto*//*Label 253*/ GIMT_Encode4(3568), // Rule ID 200 //
4461 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule143Enabled),
4462 // MIs[0] x
4463 // No operand predicates
4464 // MIs[0] y
4465 // No operand predicates
4466 // MIs[0] z
4467 // No operand predicates
4468 // MIs[0] Operand 3
4469 GIM_CheckConstantInt8, /*MI*/0, /*Op*/3, 0,
4470 // Combiner Rule #143: funnel_shift_left_zero
4471 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
4472 GIR_RootToRootCopy, /*OpIdx*/0, // x
4473 GIR_RootToRootCopy, /*OpIdx*/1, // y
4474 GIR_EraseRootFromParent_Done,
4475 // Label 253: @3568
4476 GIM_Reject,
4477 // Label 34: @3569
4478 GIM_Try, /*On fail goto*//*Label 254*/ GIMT_Encode4(3580), // Rule ID 198 //
4479 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule141Enabled),
4480 // Combiner Rule #141: funnel_shift_to_rotate; wip_match_opcode 'G_FSHR'
4481 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner88),
4482 // Label 254: @3580
4483 GIM_Try, /*On fail goto*//*Label 255*/ GIMT_Encode4(3591), // Rule ID 202 //
4484 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule144Enabled),
4485 // Combiner Rule #144: funnel_shift_overshift; wip_match_opcode 'G_FSHR'
4486 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner89),
4487 // Label 255: @3591
4488 GIM_Try, /*On fail goto*//*Label 256*/ GIMT_Encode4(3611), // Rule ID 199 //
4489 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule142Enabled),
4490 // MIs[0] x
4491 // No operand predicates
4492 // MIs[0] y
4493 // No operand predicates
4494 // MIs[0] z
4495 // No operand predicates
4496 // MIs[0] Operand 3
4497 GIM_CheckConstantInt8, /*MI*/0, /*Op*/3, 0,
4498 // Combiner Rule #142: funnel_shift_right_zero
4499 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
4500 GIR_RootToRootCopy, /*OpIdx*/0, // x
4501 GIR_RootToRootCopy, /*OpIdx*/2, // z
4502 GIR_EraseRootFromParent_Done,
4503 // Label 256: @3611
4504 GIM_Reject,
4505 // Label 35: @3612
4506 GIM_Try, /*On fail goto*//*Label 257*/ GIMT_Encode4(3635), // Rule ID 94 //
4507 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
4508 // MIs[0] dst
4509 // No operand predicates
4510 // MIs[0] lhs
4511 // No operand predicates
4512 // MIs[0] Operand 2
4513 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
4514 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4515 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[9]]
4516 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4517 GIR_EraseRootFromParent_Done,
4518 // Label 257: @3635
4519 GIM_Reject,
4520 // Label 36: @3636
4521 GIM_Try, /*On fail goto*//*Label 258*/ GIMT_Encode4(3659), // Rule ID 93 //
4522 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
4523 // MIs[0] dst
4524 // No operand predicates
4525 // MIs[0] lhs
4526 // No operand predicates
4527 // MIs[0] Operand 2
4528 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
4529 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4530 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[8]]
4531 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4532 GIR_EraseRootFromParent_Done,
4533 // Label 258: @3659
4534 GIM_Reject,
4535 // Label 37: @3660
4536 GIM_Try, /*On fail goto*//*Label 259*/ GIMT_Encode4(3671), // Rule ID 142 //
4537 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule107Enabled),
4538 // Combiner Rule #107: icmp_to_true_false_known_bits; wip_match_opcode 'G_ICMP'
4539 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner59),
4540 // Label 259: @3671
4541 GIM_Try, /*On fail goto*//*Label 260*/ GIMT_Encode4(3682), // Rule ID 143 //
4542 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule108Enabled),
4543 // Combiner Rule #108: icmp_to_lhs_known_bits; wip_match_opcode 'G_ICMP'
4544 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner60),
4545 // Label 260: @3682
4546 GIM_Try, /*On fail goto*//*Label 261*/ GIMT_Encode4(3693), // Rule ID 279 //
4547 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule175Enabled),
4548 // Combiner Rule #175: redundant_binop_in_equality; wip_match_opcode 'G_ICMP'
4549 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner117),
4550 // Label 261: @3693
4551 GIM_Reject,
4552 // Label 38: @3694
4553 GIM_Try, /*On fail goto*//*Label 262*/ GIMT_Encode4(3705), // Rule ID 84 //
4554 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
4555 // Combiner Rule #68: select_same_val; wip_match_opcode 'G_SELECT'
4556 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner31),
4557 // Label 262: @3705
4558 GIM_Try, /*On fail goto*//*Label 263*/ GIMT_Encode4(3716), // Rule ID 134 //
4559 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule99Enabled),
4560 // Combiner Rule #99: select_constant_cmp; wip_match_opcode 'G_SELECT'
4561 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner51),
4562 // Label 263: @3716
4563 GIM_Try, /*On fail goto*//*Label 264*/ GIMT_Encode4(3727), // Rule ID 136 //
4564 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule101Enabled),
4565 // Combiner Rule #101: match_selects; wip_match_opcode 'G_SELECT'
4566 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner53),
4567 // Label 264: @3727
4568 GIM_Try, /*On fail goto*//*Label 265*/ GIMT_Encode4(3738), // Rule ID 278 //
4569 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule174Enabled),
4570 // Combiner Rule #174: select_to_minmax; wip_match_opcode 'G_SELECT'
4571 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner116),
4572 // Label 265: @3738
4573 GIM_Try, /*On fail goto*//*Label 266*/ GIMT_Encode4(3759), // Rule ID 135 //
4574 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule100Enabled),
4575 // MIs[0] root
4576 // No operand predicates
4577 // MIs[0] tst
4578 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4579 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_ICMP),
4580 // MIs[1] tst1
4581 // No operand predicates
4582 // MIs[1] a
4583 // No operand predicates
4584 // MIs[1] b
4585 // No operand predicates
4586 // MIs[0] x
4587 // No operand predicates
4588 // MIs[0] y
4589 // No operand predicates
4590 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4591 // Combiner Rule #100: select_to_iminmax
4592 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner52),
4593 // Label 266: @3759
4594 GIM_Try, /*On fail goto*//*Label 267*/ GIMT_Encode4(3788), // Rule ID 133 //
4595 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule98Enabled),
4596 // MIs[0] dst
4597 // No operand predicates
4598 // MIs[0] undef
4599 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
4600 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
4601 // MIs[0] x
4602 // No operand predicates
4603 // MIs[0] y
4604 // No operand predicates
4605 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3,
4606 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4607 // Combiner Rule #98: select_undef_cmp
4608 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/3,
4609 GIR_EraseRootFromParent_Done,
4610 // Label 267: @3788
4611 GIM_Reject,
4612 // Label 39: @3789
4613 GIM_Try, /*On fail goto*//*Label 268*/ GIMT_Encode4(3800), // Rule ID 290 //
4614 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4615 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDO'
4616 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4617 // Label 268: @3800
4618 GIM_Try, /*On fail goto*//*Label 269*/ GIMT_Encode4(3811), // Rule ID 316 //
4619 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule184Enabled),
4620 // Combiner Rule #184: match_addos; wip_match_opcode 'G_UADDO'
4621 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner124),
4622 // Label 269: @3811
4623 GIM_Reject,
4624 // Label 40: @3812
4625 GIM_Try, /*On fail goto*//*Label 270*/ GIMT_Encode4(3823), // Rule ID 170 //
4626 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled),
4627 // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_UADDE'
4628 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78),
4629 // Label 270: @3823
4630 GIM_Reject,
4631 // Label 41: @3824
4632 GIM_Try, /*On fail goto*//*Label 271*/ GIMT_Encode4(3835), // Rule ID 172 //
4633 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled),
4634 // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_USUBE'
4635 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78),
4636 // Label 271: @3835
4637 GIM_Reject,
4638 // Label 42: @3836
4639 GIM_Try, /*On fail goto*//*Label 272*/ GIMT_Encode4(3847), // Rule ID 291 //
4640 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4641 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDO'
4642 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4643 // Label 272: @3847
4644 GIM_Try, /*On fail goto*//*Label 273*/ GIMT_Encode4(3858), // Rule ID 315 //
4645 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule184Enabled),
4646 // Combiner Rule #184: match_addos; wip_match_opcode 'G_SADDO'
4647 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner124),
4648 // Label 273: @3858
4649 GIM_Reject,
4650 // Label 43: @3859
4651 GIM_Try, /*On fail goto*//*Label 274*/ GIMT_Encode4(3870), // Rule ID 171 //
4652 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled),
4653 // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_SADDE'
4654 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78),
4655 // Label 274: @3870
4656 GIM_Reject,
4657 // Label 44: @3871
4658 GIM_Try, /*On fail goto*//*Label 275*/ GIMT_Encode4(3882), // Rule ID 173 //
4659 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule131Enabled),
4660 // Combiner Rule #131: adde_to_addo; wip_match_opcode 'G_SSUBE'
4661 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner78),
4662 // Label 275: @3882
4663 GIM_Reject,
4664 // Label 45: @3883
4665 GIM_Try, /*On fail goto*//*Label 276*/ GIMT_Encode4(3894), // Rule ID 166 //
4666 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule129Enabled),
4667 // Combiner Rule #129: mulo_by_2; wip_match_opcode 'G_UMULO'
4668 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner76),
4669 // Label 276: @3894
4670 GIM_Try, /*On fail goto*//*Label 277*/ GIMT_Encode4(3905), // Rule ID 168 //
4671 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule130Enabled),
4672 // Combiner Rule #130: mulo_by_0; wip_match_opcode 'G_UMULO'
4673 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner77),
4674 // Label 277: @3905
4675 GIM_Try, /*On fail goto*//*Label 278*/ GIMT_Encode4(3916), // Rule ID 292 //
4676 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4677 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULO'
4678 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4679 // Label 278: @3916
4680 GIM_Reject,
4681 // Label 46: @3917
4682 GIM_Try, /*On fail goto*//*Label 279*/ GIMT_Encode4(3928), // Rule ID 167 //
4683 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule129Enabled),
4684 // Combiner Rule #129: mulo_by_2; wip_match_opcode 'G_SMULO'
4685 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner76),
4686 // Label 279: @3928
4687 GIM_Try, /*On fail goto*//*Label 280*/ GIMT_Encode4(3939), // Rule ID 169 //
4688 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule130Enabled),
4689 // Combiner Rule #130: mulo_by_0; wip_match_opcode 'G_SMULO'
4690 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner77),
4691 // Label 280: @3939
4692 GIM_Try, /*On fail goto*//*Label 281*/ GIMT_Encode4(3950), // Rule ID 293 //
4693 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4694 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULO'
4695 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4696 // Label 281: @3950
4697 GIM_Reject,
4698 // Label 47: @3951
4699 GIM_Try, /*On fail goto*//*Label 282*/ GIMT_Encode4(3962), // Rule ID 235 //
4700 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule161Enabled),
4701 // Combiner Rule #161: mulh_to_lshr; wip_match_opcode 'G_UMULH'
4702 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner103),
4703 // Label 282: @3962
4704 GIM_Try, /*On fail goto*//*Label 283*/ GIMT_Encode4(3973), // Rule ID 294 //
4705 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4706 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULH'
4707 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4708 // Label 283: @3973
4709 GIM_Reject,
4710 // Label 48: @3974
4711 GIM_Try, /*On fail goto*//*Label 284*/ GIMT_Encode4(3985), // Rule ID 295 //
4712 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4713 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULH'
4714 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4715 // Label 284: @3985
4716 GIM_Reject,
4717 // Label 49: @3986
4718 GIM_Try, /*On fail goto*//*Label 285*/ GIMT_Encode4(3997), // Rule ID 296 //
4719 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4720 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDSAT'
4721 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4722 // Label 285: @3997
4723 GIM_Reject,
4724 // Label 50: @3998
4725 GIM_Try, /*On fail goto*//*Label 286*/ GIMT_Encode4(4009), // Rule ID 297 //
4726 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4727 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDSAT'
4728 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4729 // Label 286: @4009
4730 GIM_Reject,
4731 // Label 51: @4010
4732 GIM_Try, /*On fail goto*//*Label 287*/ GIMT_Encode4(4021), // Rule ID 185 //
4733 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled),
4734 // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_USHLSAT'
4735 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83),
4736 // Label 287: @4021
4737 GIM_Try, /*On fail goto*//*Label 288*/ GIMT_Encode4(4032), // Rule ID 189 //
4738 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled),
4739 // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_USHLSAT'
4740 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84),
4741 // Label 288: @4032
4742 GIM_Reject,
4743 // Label 52: @4033
4744 GIM_Try, /*On fail goto*//*Label 289*/ GIMT_Encode4(4044), // Rule ID 184 //
4745 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule136Enabled),
4746 // Combiner Rule #136: shift_immed_chain; wip_match_opcode 'G_SSHLSAT'
4747 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner83),
4748 // Label 289: @4044
4749 GIM_Try, /*On fail goto*//*Label 290*/ GIMT_Encode4(4055), // Rule ID 190 //
4750 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule137Enabled),
4751 // Combiner Rule #137: shift_of_shifted_logic_chain; wip_match_opcode 'G_SSHLSAT'
4752 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner84),
4753 // Label 290: @4055
4754 GIM_Reject,
4755 // Label 53: @4056
4756 GIM_Try, /*On fail goto*//*Label 291*/ GIMT_Encode4(4067), // Rule ID 298 //
4757 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4758 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIX'
4759 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4760 // Label 291: @4067
4761 GIM_Reject,
4762 // Label 54: @4068
4763 GIM_Try, /*On fail goto*//*Label 292*/ GIMT_Encode4(4079), // Rule ID 299 //
4764 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4765 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIX'
4766 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4767 // Label 292: @4079
4768 GIM_Reject,
4769 // Label 55: @4080
4770 GIM_Try, /*On fail goto*//*Label 293*/ GIMT_Encode4(4091), // Rule ID 300 //
4771 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4772 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIXSAT'
4773 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4774 // Label 293: @4091
4775 GIM_Reject,
4776 // Label 56: @4092
4777 GIM_Try, /*On fail goto*//*Label 294*/ GIMT_Encode4(4103), // Rule ID 301 //
4778 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
4779 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIXSAT'
4780 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
4781 // Label 294: @4103
4782 GIM_Reject,
4783 // Label 57: @4104
4784 GIM_Try, /*On fail goto*//*Label 295*/ GIMT_Encode4(4115), // Rule ID 221 //
4785 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled),
4786 // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FADD'
4787 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96),
4788 // Label 295: @4115
4789 GIM_Try, /*On fail goto*//*Label 296*/ GIMT_Encode4(4126), // Rule ID 236 //
4790 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled),
4791 // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FADD'
4792 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104),
4793 // Label 296: @4126
4794 GIM_Try, /*On fail goto*//*Label 297*/ GIMT_Encode4(4137), // Rule ID 243 //
4795 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule164Enabled),
4796 // Combiner Rule #164: combine_fadd_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD'
4797 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner106),
4798 // Label 297: @4137
4799 GIM_Try, /*On fail goto*//*Label 298*/ GIMT_Encode4(4148), // Rule ID 244 //
4800 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule165Enabled),
4801 // Combiner Rule #165: combine_fadd_fpext_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD'
4802 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner107),
4803 // Label 298: @4148
4804 GIM_Try, /*On fail goto*//*Label 299*/ GIMT_Encode4(4159), // Rule ID 245 //
4805 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule166Enabled),
4806 // Combiner Rule #166: combine_fadd_fma_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD'
4807 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner108),
4808 // Label 299: @4159
4809 GIM_Try, /*On fail goto*//*Label 300*/ GIMT_Encode4(4170), // Rule ID 246 //
4810 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule167Enabled),
4811 // Combiner Rule #167: combine_fadd_fpext_fma_fmul_to_fmad_or_fma; wip_match_opcode 'G_FADD'
4812 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner109),
4813 // Label 300: @4170
4814 GIM_Try, /*On fail goto*//*Label 301*/ GIMT_Encode4(4181), // Rule ID 269 //
4815 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4816 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FADD'
4817 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4818 // Label 301: @4181
4819 GIM_Try, /*On fail goto*//*Label 302*/ GIMT_Encode4(4192), // Rule ID 302 //
4820 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
4821 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FADD'
4822 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
4823 // Label 302: @4192
4824 GIM_Try, /*On fail goto*//*Label 303*/ GIMT_Encode4(4215), // Rule ID 116 //
4825 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule85Enabled),
4826 // MIs[0] dst
4827 // No operand predicates
4828 // MIs[0] x
4829 // No operand predicates
4830 // MIs[0] y
4831 // No operand predicates
4832 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3),
4833 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4834 // Combiner Rule #85: right_identity_neg_zero_fp
4835 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4836 GIR_EraseRootFromParent_Done,
4837 // Label 303: @4215
4838 GIM_Reject,
4839 // Label 58: @4216
4840 GIM_Try, /*On fail goto*//*Label 304*/ GIMT_Encode4(4227), // Rule ID 222 //
4841 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled),
4842 // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FSUB'
4843 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96),
4844 // Label 304: @4227
4845 GIM_Try, /*On fail goto*//*Label 305*/ GIMT_Encode4(4238), // Rule ID 237 //
4846 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled),
4847 // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FSUB'
4848 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104),
4849 // Label 305: @4238
4850 GIM_Try, /*On fail goto*//*Label 306*/ GIMT_Encode4(4249), // Rule ID 247 //
4851 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule168Enabled),
4852 // Combiner Rule #168: combine_fsub_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB'
4853 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner110),
4854 // Label 306: @4249
4855 GIM_Try, /*On fail goto*//*Label 307*/ GIMT_Encode4(4260), // Rule ID 248 //
4856 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule169Enabled),
4857 // Combiner Rule #169: combine_fsub_fneg_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB'
4858 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner111),
4859 // Label 307: @4260
4860 GIM_Try, /*On fail goto*//*Label 308*/ GIMT_Encode4(4271), // Rule ID 249 //
4861 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule170Enabled),
4862 // Combiner Rule #170: combine_fsub_fpext_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB'
4863 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner112),
4864 // Label 308: @4271
4865 GIM_Try, /*On fail goto*//*Label 309*/ GIMT_Encode4(4282), // Rule ID 250 //
4866 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule171Enabled),
4867 // Combiner Rule #171: combine_fsub_fpext_fneg_fmul_to_fmad_or_fma; wip_match_opcode 'G_FSUB'
4868 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner113),
4869 // Label 309: @4282
4870 GIM_Try, /*On fail goto*//*Label 310*/ GIMT_Encode4(4293), // Rule ID 270 //
4871 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4872 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FSUB'
4873 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4874 // Label 310: @4293
4875 GIM_Try, /*On fail goto*//*Label 311*/ GIMT_Encode4(4304), // Rule ID 280 //
4876 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule176Enabled),
4877 // Combiner Rule #176: fsub_to_fneg; wip_match_opcode 'G_FSUB'
4878 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner118),
4879 // Label 311: @4304
4880 GIM_Reject,
4881 // Label 59: @4305
4882 GIM_Try, /*On fail goto*//*Label 312*/ GIMT_Encode4(4316), // Rule ID 223 //
4883 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled),
4884 // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FMUL'
4885 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96),
4886 // Label 312: @4316
4887 GIM_Try, /*On fail goto*//*Label 313*/ GIMT_Encode4(4327), // Rule ID 238 //
4888 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled),
4889 // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FMUL'
4890 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104),
4891 // Label 313: @4327
4892 GIM_Try, /*On fail goto*//*Label 314*/ GIMT_Encode4(4338), // Rule ID 268 //
4893 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4894 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMUL'
4895 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4896 // Label 314: @4338
4897 GIM_Try, /*On fail goto*//*Label 315*/ GIMT_Encode4(4349), // Rule ID 303 //
4898 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
4899 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMUL'
4900 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
4901 // Label 315: @4349
4902 GIM_Try, /*On fail goto*//*Label 316*/ GIMT_Encode4(4372), // Rule ID 107 //
4903 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule78Enabled),
4904 // MIs[0] dst
4905 // No operand predicates
4906 // MIs[0] x
4907 // No operand predicates
4908 // MIs[0] y
4909 // No operand predicates
4910 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
4911 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4912 // Combiner Rule #78: right_identity_one_fp
4913 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
4914 GIR_EraseRootFromParent_Done,
4915 // Label 316: @4372
4916 GIM_Try, /*On fail goto*//*Label 317*/ GIMT_Encode4(4392), // Rule ID 117 //
4917 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule86Enabled),
4918 // MIs[0] dst
4919 // No operand predicates
4920 // MIs[0] x
4921 // No operand predicates
4922 // MIs[0] y
4923 // No operand predicates
4924 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner4),
4925 // Combiner Rule #86: right_identity_neg_one_fp
4926 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG),
4927 GIR_RootToRootCopy, /*OpIdx*/0, // dst
4928 GIR_RootToRootCopy, /*OpIdx*/1, // x
4929 GIR_EraseRootFromParent_Done,
4930 // Label 317: @4392
4931 GIM_Reject,
4932 // Label 60: @4393
4933 GIM_Try, /*On fail goto*//*Label 318*/ GIMT_Encode4(4404), // Rule ID 226 //
4934 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule154Enabled),
4935 // Combiner Rule #154: constant_fold_fma; wip_match_opcode 'G_FMA'
4936 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner97),
4937 // Label 318: @4404
4938 GIM_Try, /*On fail goto*//*Label 319*/ GIMT_Encode4(4415), // Rule ID 241 //
4939 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled),
4940 // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FMA'
4941 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104),
4942 // Label 319: @4415
4943 GIM_Reject,
4944 // Label 61: @4416
4945 GIM_Try, /*On fail goto*//*Label 320*/ GIMT_Encode4(4427), // Rule ID 225 //
4946 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule154Enabled),
4947 // Combiner Rule #154: constant_fold_fma; wip_match_opcode 'G_FMAD'
4948 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner97),
4949 // Label 320: @4427
4950 GIM_Try, /*On fail goto*//*Label 321*/ GIMT_Encode4(4438), // Rule ID 240 //
4951 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled),
4952 // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FMAD'
4953 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104),
4954 // Label 321: @4438
4955 GIM_Reject,
4956 // Label 62: @4439
4957 GIM_Try, /*On fail goto*//*Label 322*/ GIMT_Encode4(4450), // Rule ID 224 //
4958 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule153Enabled),
4959 // Combiner Rule #153: constant_fold_fp_binop; wip_match_opcode 'G_FDIV'
4960 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner96),
4961 // Label 322: @4450
4962 GIM_Try, /*On fail goto*//*Label 323*/ GIMT_Encode4(4461), // Rule ID 239 //
4963 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule162Enabled),
4964 // Combiner Rule #162: redundant_neg_operands; wip_match_opcode 'G_FDIV'
4965 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner104),
4966 // Label 323: @4461
4967 GIM_Try, /*On fail goto*//*Label 324*/ GIMT_Encode4(4472), // Rule ID 271 //
4968 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4969 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FDIV'
4970 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4971 // Label 324: @4472
4972 GIM_Reject,
4973 // Label 63: @4473
4974 GIM_Try, /*On fail goto*//*Label 325*/ GIMT_Encode4(4484), // Rule ID 272 //
4975 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
4976 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FREM'
4977 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
4978 // Label 325: @4484
4979 GIM_Reject,
4980 // Label 64: @4485
4981 GIM_Try, /*On fail goto*//*Label 326*/ GIMT_Encode4(4506), // Rule ID 178 //
4982 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule133Enabled),
4983 // MIs[0] dst
4984 // No operand predicates
4985 // MIs[0] float
4986 // No operand predicates
4987 // MIs[0] int
4988 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
4989 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
4990 // MIs[1] imm
4991 // No operand predicates
4992 GIM_CheckIsSafeToFold, /*NumInsns*/1,
4993 // Combiner Rule #133: expand_const_fpowi
4994 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner80),
4995 // Label 326: @4506
4996 GIM_Reject,
4997 // Label 65: @4507
4998 GIM_Try, /*On fail goto*//*Label 327*/ GIMT_Encode4(4528), // Rule ID 160 //
4999 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule123Enabled),
5000 // MIs[0] dst
5001 // No operand predicates
5002 // MIs[0] src0
5003 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5004 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
5005 // MIs[1] cst
5006 // No operand predicates
5007 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5008 // Combiner Rule #123: constant_fold_flog2
5009 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72),
5010 // Label 327: @4528
5011 GIM_Reject,
5012 // Label 66: @4529
5013 GIM_Try, /*On fail goto*//*Label 328*/ GIMT_Encode4(4550), // Rule ID 157 //
5014 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule120Enabled),
5015 // MIs[0] dst
5016 // No operand predicates
5017 // MIs[0] src0
5018 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5019 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
5020 // MIs[1] cst
5021 // No operand predicates
5022 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5023 // Combiner Rule #120: constant_fold_fneg
5024 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72),
5025 // Label 328: @4550
5026 GIM_Try, /*On fail goto*//*Label 329*/ GIMT_Encode4(4579), // Rule ID 105 //
5027 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule76Enabled),
5028 // MIs[0] dst
5029 // No operand predicates
5030 // MIs[0] t
5031 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5032 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
5033 // MIs[1] src
5034 // No operand predicates
5035 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
5036 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5037 // Combiner Rule #76: fneg_fneg_fold
5038 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
5039 GIR_EraseRootFromParent_Done,
5040 // Label 329: @4579
5041 GIM_Reject,
5042 // Label 67: @4580
5043 GIM_Try, /*On fail goto*//*Label 330*/ GIMT_Encode4(4601), // Rule ID 161 //
5044 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule124Enabled),
5045 // MIs[0] dst
5046 // No operand predicates
5047 // MIs[0] src0
5048 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5049 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
5050 // MIs[1] cst
5051 // No operand predicates
5052 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5053 // Combiner Rule #124: constant_fold_fptrunc
5054 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72),
5055 // Label 330: @4601
5056 GIM_Try, /*On fail goto*//*Label 331*/ GIMT_Encode4(4622), // Rule ID 115 //
5057 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule84Enabled),
5058 // MIs[0] dst
5059 // No operand predicates
5060 // MIs[0] src1
5061 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5062 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT),
5063 // MIs[1] src0
5064 // No operand predicates
5065 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5066 // Combiner Rule #84: fptrunc_fpext_fold
5067 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner39),
5068 // Label 331: @4622
5069 GIM_Reject,
5070 // Label 68: @4623
5071 GIM_Try, /*On fail goto*//*Label 332*/ GIMT_Encode4(4634), // Rule ID 73 //
5072 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
5073 // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_FPTOSI'
5074 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25),
5075 // Label 332: @4634
5076 GIM_Reject,
5077 // Label 69: @4635
5078 GIM_Try, /*On fail goto*//*Label 333*/ GIMT_Encode4(4646), // Rule ID 74 //
5079 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
5080 // Combiner Rule #62: propagate_undef_any_op; wip_match_opcode 'G_FPTOUI'
5081 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner25),
5082 // Label 333: @4646
5083 GIM_Reject,
5084 // Label 70: @4647
5085 GIM_Try, /*On fail goto*//*Label 334*/ GIMT_Encode4(4658), // Rule ID 61 //
5086 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled),
5087 // Combiner Rule #56: undef_to_fp_zero; wip_match_opcode 'G_SITOFP'
5088 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner20),
5089 // Label 334: @4658
5090 GIM_Try, /*On fail goto*//*Label 335*/ GIMT_Encode4(4673), // Rule ID 162 //
5091 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule125Enabled),
5092 // MIs[0] dst
5093 // No operand predicates
5094 // MIs[0] Operand 1
5095 GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
5096 // Combiner Rule #125: itof_const_zero_fold_si
5097 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner73),
5098 // Label 335: @4673
5099 GIM_Reject,
5100 // Label 71: @4674
5101 GIM_Try, /*On fail goto*//*Label 336*/ GIMT_Encode4(4685), // Rule ID 60 //
5102 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled),
5103 // Combiner Rule #56: undef_to_fp_zero; wip_match_opcode 'G_UITOFP'
5104 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner20),
5105 // Label 336: @4685
5106 GIM_Try, /*On fail goto*//*Label 337*/ GIMT_Encode4(4700), // Rule ID 163 //
5107 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule126Enabled),
5108 // MIs[0] dst
5109 // No operand predicates
5110 // MIs[0] Operand 1
5111 GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
5112 // Combiner Rule #126: itof_const_zero_fold_ui
5113 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner73),
5114 // Label 337: @4700
5115 GIM_Reject,
5116 // Label 72: @4701
5117 GIM_Try, /*On fail goto*//*Label 338*/ GIMT_Encode4(4730), // Rule ID 13 //
5118 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
5119 // MIs[0] dst
5120 // No operand predicates
5121 // MIs[0] src
5122 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5123 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FABS),
5124 // MIs[1] __idempotent_prop_match_0.x
5125 // No operand predicates
5126 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5127 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5128 // Combiner Rule #12: idempotent_prop @ [__idempotent_prop_match_0[1]]
5129 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5130 GIR_EraseRootFromParent_Done,
5131 // Label 338: @4730
5132 GIM_Try, /*On fail goto*//*Label 339*/ GIMT_Encode4(4751), // Rule ID 158 //
5133 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule121Enabled),
5134 // MIs[0] dst
5135 // No operand predicates
5136 // MIs[0] src0
5137 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5138 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
5139 // MIs[1] cst
5140 // No operand predicates
5141 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5142 // Combiner Rule #121: constant_fold_fabs
5143 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72),
5144 // Label 339: @4751
5145 GIM_Try, /*On fail goto*//*Label 340*/ GIMT_Encode4(4779), // Rule ID 230 //
5146 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule156Enabled),
5147 // MIs[0] dst
5148 // No operand predicates
5149 // MIs[0] tmp
5150 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5151 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
5152 // MIs[1] x
5153 // No operand predicates
5154 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5155 // Combiner Rule #156: fabs_fneg_fold
5156 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FABS),
5157 GIR_RootToRootCopy, /*OpIdx*/0, // dst
5158 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // x
5159 GIR_EraseRootFromParent_Done,
5160 // Label 340: @4779
5161 GIM_Reject,
5162 // Label 73: @4780
5163 GIM_Try, /*On fail goto*//*Label 341*/ GIMT_Encode4(4809), // Rule ID 14 //
5164 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
5165 // MIs[0] dst
5166 // No operand predicates
5167 // MIs[0] src
5168 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5169 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCANONICALIZE),
5170 // MIs[1] __idempotent_prop_match_0.x
5171 // No operand predicates
5172 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5173 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5174 // Combiner Rule #12: idempotent_prop @ [__idempotent_prop_match_0[2]]
5175 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5176 GIR_EraseRootFromParent_Done,
5177 // Label 341: @4809
5178 GIM_Reject,
5179 // Label 74: @4810
5180 GIM_Try, /*On fail goto*//*Label 342*/ GIMT_Encode4(4821), // Rule ID 174 //
5181 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled),
5182 // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMINNUM'
5183 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79),
5184 // Label 342: @4821
5185 GIM_Try, /*On fail goto*//*Label 343*/ GIMT_Encode4(4832), // Rule ID 273 //
5186 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5187 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMINNUM'
5188 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5189 // Label 343: @4832
5190 GIM_Try, /*On fail goto*//*Label 344*/ GIMT_Encode4(4843), // Rule ID 304 //
5191 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
5192 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM'
5193 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
5194 // Label 344: @4843
5195 GIM_Reject,
5196 // Label 75: @4844
5197 GIM_Try, /*On fail goto*//*Label 345*/ GIMT_Encode4(4855), // Rule ID 175 //
5198 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled),
5199 // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMAXNUM'
5200 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79),
5201 // Label 345: @4855
5202 GIM_Try, /*On fail goto*//*Label 346*/ GIMT_Encode4(4866), // Rule ID 274 //
5203 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5204 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMAXNUM'
5205 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5206 // Label 346: @4866
5207 GIM_Try, /*On fail goto*//*Label 347*/ GIMT_Encode4(4877), // Rule ID 305 //
5208 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
5209 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM'
5210 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
5211 // Label 347: @4877
5212 GIM_Reject,
5213 // Label 76: @4878
5214 GIM_Try, /*On fail goto*//*Label 348*/ GIMT_Encode4(4889), // Rule ID 306 //
5215 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
5216 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM_IEEE'
5217 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
5218 // Label 348: @4889
5219 GIM_Reject,
5220 // Label 77: @4890
5221 GIM_Try, /*On fail goto*//*Label 349*/ GIMT_Encode4(4901), // Rule ID 307 //
5222 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
5223 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM_IEEE'
5224 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
5225 // Label 349: @4901
5226 GIM_Reject,
5227 // Label 78: @4902
5228 GIM_Try, /*On fail goto*//*Label 350*/ GIMT_Encode4(4913), // Rule ID 176 //
5229 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled),
5230 // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMINIMUM'
5231 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79),
5232 // Label 350: @4913
5233 GIM_Try, /*On fail goto*//*Label 351*/ GIMT_Encode4(4924), // Rule ID 275 //
5234 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5235 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMINIMUM'
5236 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5237 // Label 351: @4924
5238 GIM_Try, /*On fail goto*//*Label 352*/ GIMT_Encode4(4935), // Rule ID 308 //
5239 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
5240 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINIMUM'
5241 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
5242 // Label 352: @4935
5243 GIM_Reject,
5244 // Label 79: @4936
5245 GIM_Try, /*On fail goto*//*Label 353*/ GIMT_Encode4(4947), // Rule ID 177 //
5246 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule132Enabled),
5247 // Combiner Rule #132: combine_minmax_nan; wip_match_opcode 'G_FMAXIMUM'
5248 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner79),
5249 // Label 353: @4947
5250 GIM_Try, /*On fail goto*//*Label 354*/ GIMT_Encode4(4958), // Rule ID 276 //
5251 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5252 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_FMAXIMUM'
5253 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5254 // Label 354: @4958
5255 GIM_Try, /*On fail goto*//*Label 355*/ GIMT_Encode4(4969), // Rule ID 309 //
5256 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule178Enabled),
5257 // Combiner Rule #178: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXIMUM'
5258 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner120),
5259 // Label 355: @4969
5260 GIM_Reject,
5261 // Label 80: @4970
5262 GIM_Try, /*On fail goto*//*Label 356*/ GIMT_Encode4(4981), // Rule ID 126 //
5263 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule91Enabled),
5264 // Combiner Rule #91: reassoc_ptradd; wip_match_opcode 'G_PTR_ADD'
5265 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner44),
5266 // Label 356: @4981
5267 GIM_Try, /*On fail goto*//*Label 357*/ GIMT_Encode4(4992), // Rule ID 128 //
5268 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule93Enabled),
5269 // Combiner Rule #93: ptr_add_immed_chain; wip_match_opcode 'G_PTR_ADD'
5270 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner46),
5271 // Label 357: @4992
5272 GIM_Try, /*On fail goto*//*Label 358*/ GIMT_Encode4(5003), // Rule ID 164 //
5273 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule127Enabled),
5274 // Combiner Rule #127: const_ptradd_to_i2p; wip_match_opcode 'G_PTR_ADD'
5275 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner74),
5276 // Label 358: @5003
5277 GIM_Try, /*On fail goto*//*Label 359*/ GIMT_Encode4(5014), // Rule ID 180 //
5278 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule135Enabled),
5279 // Combiner Rule #135: ptr_add_with_zero; wip_match_opcode 'G_PTR_ADD'
5280 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner82),
5281 // Label 359: @5014
5282 GIM_Try, /*On fail goto*//*Label 360*/ GIMT_Encode4(5025), // Rule ID 253 //
5283 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5284 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_PTR_ADD'
5285 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5286 // Label 360: @5025
5287 GIM_Try, /*On fail goto*//*Label 361*/ GIMT_Encode4(5048), // Rule ID 92 //
5288 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
5289 // MIs[0] dst
5290 // No operand predicates
5291 // MIs[0] lhs
5292 // No operand predicates
5293 // MIs[0] Operand 2
5294 GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
5295 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5296 // Combiner Rule #69: right_identity_zero @ [__right_identity_zero_match_0[7]]
5297 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5298 GIR_EraseRootFromParent_Done,
5299 // Label 361: @5048
5300 GIM_Reject,
5301 // Label 81: @5049
5302 GIM_Try, /*On fail goto*//*Label 362*/ GIMT_Encode4(5060), // Rule ID 264 //
5303 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5304 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SMIN'
5305 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5306 // Label 362: @5060
5307 GIM_Try, /*On fail goto*//*Label 363*/ GIMT_Encode4(5071), // Rule ID 286 //
5308 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
5309 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMIN'
5310 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
5311 // Label 363: @5071
5312 GIM_Reject,
5313 // Label 82: @5072
5314 GIM_Try, /*On fail goto*//*Label 364*/ GIMT_Encode4(5083), // Rule ID 265 //
5315 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5316 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_SMAX'
5317 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5318 // Label 364: @5083
5319 GIM_Try, /*On fail goto*//*Label 365*/ GIMT_Encode4(5094), // Rule ID 287 //
5320 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
5321 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_SMAX'
5322 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
5323 // Label 365: @5094
5324 GIM_Reject,
5325 // Label 83: @5095
5326 GIM_Try, /*On fail goto*//*Label 366*/ GIMT_Encode4(5106), // Rule ID 266 //
5327 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5328 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UMIN'
5329 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5330 // Label 366: @5106
5331 GIM_Try, /*On fail goto*//*Label 367*/ GIMT_Encode4(5117), // Rule ID 288 //
5332 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
5333 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMIN'
5334 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
5335 // Label 367: @5117
5336 GIM_Reject,
5337 // Label 84: @5118
5338 GIM_Try, /*On fail goto*//*Label 368*/ GIMT_Encode4(5129), // Rule ID 267 //
5339 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule172Enabled),
5340 // Combiner Rule #172: fold_binop_into_select; wip_match_opcode 'G_UMAX'
5341 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner114),
5342 // Label 368: @5129
5343 GIM_Try, /*On fail goto*//*Label 369*/ GIMT_Encode4(5140), // Rule ID 289 //
5344 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule177Enabled),
5345 // Combiner Rule #177: commute_int_constant_to_rhs; wip_match_opcode 'G_UMAX'
5346 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner119),
5347 // Label 369: @5140
5348 GIM_Reject,
5349 // Label 85: @5141
5350 GIM_Try, /*On fail goto*//*Label 370*/ GIMT_Encode4(5152), // Rule ID 71 //
5351 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled),
5352 // Combiner Rule #61: unary_undef_to_zero; wip_match_opcode 'G_ABS'
5353 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner23),
5354 // Label 370: @5152
5355 GIM_Reject,
5356 // Label 86: @5153
5357 GIM_Try, /*On fail goto*//*Label 371*/ GIMT_Encode4(5164), // Rule ID 149 //
5358 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule112Enabled),
5359 // Combiner Rule #112: opt_brcond_by_inverting_cond; wip_match_opcode 'G_BR'
5360 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner64),
5361 // Label 371: @5164
5362 GIM_Reject,
5363 // Label 87: @5165
5364 GIM_Try, /*On fail goto*//*Label 372*/ GIMT_Encode4(5176), // Rule ID 20 //
5365 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
5366 // Combiner Rule #18: insert_vector_elt_oob; wip_match_opcode 'G_INSERT_VECTOR_ELT'
5367 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
5368 // Label 372: @5176
5369 GIM_Try, /*On fail goto*//*Label 373*/ GIMT_Encode4(5187), // Rule ID 52 //
5370 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule50Enabled),
5371 // Combiner Rule #50: combine_insert_vec_elts_build_vector; wip_match_opcode 'G_INSERT_VECTOR_ELT'
5372 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
5373 // Label 373: @5187
5374 GIM_Try, /*On fail goto*//*Label 374*/ GIMT_Encode4(5198), // Rule ID 82 //
5375 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
5376 // Combiner Rule #67: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_INSERT_VECTOR_ELT'
5377 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner30),
5378 // Label 374: @5198
5379 GIM_Try, /*On fail goto*//*Label 375*/ GIMT_Encode4(5237), // Rule ID 45 //
5380 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled),
5381 // MIs[0] root
5382 // No operand predicates
5383 // MIs[0] src
5384 // No operand predicates
5385 // MIs[0] elt
5386 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
5387 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_EXTRACT_VECTOR_ELT),
5388 // MIs[1] src
5389 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/1, /*OtherMI*/0, /*OtherOpIdx*/1,
5390 // MIs[1] idx
5391 // No operand predicates
5392 // MIs[0] idx
5393 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/3, /*OtherMI*/1, /*OtherOpIdx*/2,
5394 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5395 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5396 // Combiner Rule #43: insert_vector_element_extract_vector_element
5397 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5398 GIR_EraseRootFromParent_Done,
5399 // Label 375: @5237
5400 GIM_Try, /*On fail goto*//*Label 376*/ GIMT_Encode4(5270), // Rule ID 18 //
5401 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
5402 // MIs[0] root
5403 // No operand predicates
5404 // MIs[0] src
5405 // No operand predicates
5406 // MIs[0] elt
5407 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
5408 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
5409 // MIs[0] idx
5410 // No operand predicates
5411 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
5412 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5413 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5414 // Combiner Rule #16: insert_vector_element_elt_undef
5415 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
5416 GIR_EraseRootFromParent_Done,
5417 // Label 376: @5270
5418 GIM_Try, /*On fail goto*//*Label 377*/ GIMT_Encode4(5294), // Rule ID 17 //
5419 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
5420 // MIs[0] root
5421 // No operand predicates
5422 // MIs[0] src
5423 // No operand predicates
5424 // MIs[0] elt
5425 // No operand predicates
5426 // MIs[0] idx
5427 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/3, // MIs[1]
5428 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
5429 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5430 // Combiner Rule #15: insert_vector_element_idx_undef
5431 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
5432 GIR_RootToRootCopy, /*OpIdx*/0, // root
5433 GIR_EraseRootFromParent_Done,
5434 // Label 377: @5294
5435 GIM_Reject,
5436 // Label 88: @5295
5437 GIM_Try, /*On fail goto*//*Label 378*/ GIMT_Encode4(5306), // Rule ID 19 //
5438 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
5439 // Combiner Rule #17: match_extract_of_element; wip_match_opcode 'G_EXTRACT_VECTOR_ELT'
5440 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
5441 // Label 378: @5306
5442 GIM_Try, /*On fail goto*//*Label 379*/ GIMT_Encode4(5317), // Rule ID 53 //
5443 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule51Enabled),
5444 // Combiner Rule #51: extract_vec_elt_build_vec; wip_match_opcode 'G_EXTRACT_VECTOR_ELT'
5445 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner15),
5446 // Label 379: @5317
5447 GIM_Try, /*On fail goto*//*Label 380*/ GIMT_Encode4(5328), // Rule ID 59 //
5448 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule55Enabled),
5449 // Combiner Rule #55: combine_extracted_vector_load; wip_match_opcode 'G_EXTRACT_VECTOR_ELT'
5450 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner19),
5451 // Label 380: @5328
5452 GIM_Try, /*On fail goto*//*Label 381*/ GIMT_Encode4(5339), // Rule ID 83 //
5453 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
5454 // Combiner Rule #67: insert_extract_vec_elt_out_of_bounds; wip_match_opcode 'G_EXTRACT_VECTOR_ELT'
5455 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner30),
5456 // Label 381: @5339
5457 GIM_Try, /*On fail goto*//*Label 382*/ GIMT_Encode4(5363), // Rule ID 36 //
5458 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
5459 // MIs[0] root
5460 // No operand predicates
5461 // MIs[0] src
5462 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5463 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5464 GIM_CheckNumOperands, /*MI*/1, /*Expected*/17,
5465 // MIs[1] x
5466 // No operand predicates
5467 // MIs[1] y
5468 // No operand predicates
5469 // MIs[1] z
5470 // No operand predicates
5471 // MIs[1] a
5472 // No operand predicates
5473 // MIs[1] b
5474 // No operand predicates
5475 // MIs[1] c
5476 // No operand predicates
5477 // MIs[1] d
5478 // No operand predicates
5479 // MIs[1] e
5480 // No operand predicates
5481 // MIs[1] f
5482 // No operand predicates
5483 // MIs[1] g
5484 // No operand predicates
5485 // MIs[1] h
5486 // No operand predicates
5487 // MIs[1] i
5488 // No operand predicates
5489 // MIs[1] j
5490 // No operand predicates
5491 // MIs[1] k
5492 // No operand predicates
5493 // MIs[1] l
5494 // No operand predicates
5495 // MIs[1] m
5496 // No operand predicates
5497 // MIs[0] idx
5498 // No operand predicates
5499 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5500 // Combiner Rule #34: extract_vector_element_build_vector16
5501 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5502 // Label 382: @5363
5503 GIM_Try, /*On fail goto*//*Label 383*/ GIMT_Encode4(5387), // Rule ID 35 //
5504 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled),
5505 // MIs[0] root
5506 // No operand predicates
5507 // MIs[0] src
5508 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5509 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5510 GIM_CheckNumOperands, /*MI*/1, /*Expected*/16,
5511 // MIs[1] x
5512 // No operand predicates
5513 // MIs[1] y
5514 // No operand predicates
5515 // MIs[1] z
5516 // No operand predicates
5517 // MIs[1] a
5518 // No operand predicates
5519 // MIs[1] b
5520 // No operand predicates
5521 // MIs[1] c
5522 // No operand predicates
5523 // MIs[1] d
5524 // No operand predicates
5525 // MIs[1] e
5526 // No operand predicates
5527 // MIs[1] f
5528 // No operand predicates
5529 // MIs[1] g
5530 // No operand predicates
5531 // MIs[1] h
5532 // No operand predicates
5533 // MIs[1] i
5534 // No operand predicates
5535 // MIs[1] j
5536 // No operand predicates
5537 // MIs[1] k
5538 // No operand predicates
5539 // MIs[1] l
5540 // No operand predicates
5541 // MIs[0] idx
5542 // No operand predicates
5543 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5544 // Combiner Rule #33: extract_vector_element_build_vector15
5545 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5546 // Label 383: @5387
5547 GIM_Try, /*On fail goto*//*Label 384*/ GIMT_Encode4(5411), // Rule ID 34 //
5548 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
5549 // MIs[0] root
5550 // No operand predicates
5551 // MIs[0] src
5552 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5553 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5554 GIM_CheckNumOperands, /*MI*/1, /*Expected*/15,
5555 // MIs[1] x
5556 // No operand predicates
5557 // MIs[1] y
5558 // No operand predicates
5559 // MIs[1] z
5560 // No operand predicates
5561 // MIs[1] a
5562 // No operand predicates
5563 // MIs[1] b
5564 // No operand predicates
5565 // MIs[1] c
5566 // No operand predicates
5567 // MIs[1] d
5568 // No operand predicates
5569 // MIs[1] e
5570 // No operand predicates
5571 // MIs[1] f
5572 // No operand predicates
5573 // MIs[1] g
5574 // No operand predicates
5575 // MIs[1] h
5576 // No operand predicates
5577 // MIs[1] i
5578 // No operand predicates
5579 // MIs[1] j
5580 // No operand predicates
5581 // MIs[1] k
5582 // No operand predicates
5583 // MIs[0] idx
5584 // No operand predicates
5585 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5586 // Combiner Rule #32: extract_vector_element_build_vector14
5587 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5588 // Label 384: @5411
5589 GIM_Try, /*On fail goto*//*Label 385*/ GIMT_Encode4(5435), // Rule ID 33 //
5590 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled),
5591 // MIs[0] root
5592 // No operand predicates
5593 // MIs[0] src
5594 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5595 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5596 GIM_CheckNumOperands, /*MI*/1, /*Expected*/14,
5597 // MIs[1] x
5598 // No operand predicates
5599 // MIs[1] y
5600 // No operand predicates
5601 // MIs[1] z
5602 // No operand predicates
5603 // MIs[1] a
5604 // No operand predicates
5605 // MIs[1] b
5606 // No operand predicates
5607 // MIs[1] c
5608 // No operand predicates
5609 // MIs[1] d
5610 // No operand predicates
5611 // MIs[1] e
5612 // No operand predicates
5613 // MIs[1] f
5614 // No operand predicates
5615 // MIs[1] g
5616 // No operand predicates
5617 // MIs[1] h
5618 // No operand predicates
5619 // MIs[1] i
5620 // No operand predicates
5621 // MIs[1] j
5622 // No operand predicates
5623 // MIs[0] idx
5624 // No operand predicates
5625 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5626 // Combiner Rule #31: extract_vector_element_build_vector13
5627 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5628 // Label 385: @5435
5629 GIM_Try, /*On fail goto*//*Label 386*/ GIMT_Encode4(5459), // Rule ID 32 //
5630 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
5631 // MIs[0] root
5632 // No operand predicates
5633 // MIs[0] src
5634 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5635 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5636 GIM_CheckNumOperands, /*MI*/1, /*Expected*/13,
5637 // MIs[1] x
5638 // No operand predicates
5639 // MIs[1] y
5640 // No operand predicates
5641 // MIs[1] z
5642 // No operand predicates
5643 // MIs[1] a
5644 // No operand predicates
5645 // MIs[1] b
5646 // No operand predicates
5647 // MIs[1] c
5648 // No operand predicates
5649 // MIs[1] d
5650 // No operand predicates
5651 // MIs[1] e
5652 // No operand predicates
5653 // MIs[1] f
5654 // No operand predicates
5655 // MIs[1] g
5656 // No operand predicates
5657 // MIs[1] h
5658 // No operand predicates
5659 // MIs[1] i
5660 // No operand predicates
5661 // MIs[0] idx
5662 // No operand predicates
5663 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5664 // Combiner Rule #30: extract_vector_element_build_vector12
5665 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5666 // Label 386: @5459
5667 GIM_Try, /*On fail goto*//*Label 387*/ GIMT_Encode4(5483), // Rule ID 31 //
5668 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
5669 // MIs[0] root
5670 // No operand predicates
5671 // MIs[0] src
5672 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5673 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5674 GIM_CheckNumOperands, /*MI*/1, /*Expected*/12,
5675 // MIs[1] x
5676 // No operand predicates
5677 // MIs[1] y
5678 // No operand predicates
5679 // MIs[1] z
5680 // No operand predicates
5681 // MIs[1] a
5682 // No operand predicates
5683 // MIs[1] b
5684 // No operand predicates
5685 // MIs[1] c
5686 // No operand predicates
5687 // MIs[1] d
5688 // No operand predicates
5689 // MIs[1] e
5690 // No operand predicates
5691 // MIs[1] f
5692 // No operand predicates
5693 // MIs[1] g
5694 // No operand predicates
5695 // MIs[1] h
5696 // No operand predicates
5697 // MIs[0] idx
5698 // No operand predicates
5699 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5700 // Combiner Rule #29: extract_vector_element_build_vector11
5701 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5702 // Label 387: @5483
5703 GIM_Try, /*On fail goto*//*Label 388*/ GIMT_Encode4(5507), // Rule ID 30 //
5704 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
5705 // MIs[0] root
5706 // No operand predicates
5707 // MIs[0] src
5708 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5709 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5710 GIM_CheckNumOperands, /*MI*/1, /*Expected*/11,
5711 // MIs[1] x
5712 // No operand predicates
5713 // MIs[1] y
5714 // No operand predicates
5715 // MIs[1] z
5716 // No operand predicates
5717 // MIs[1] a
5718 // No operand predicates
5719 // MIs[1] b
5720 // No operand predicates
5721 // MIs[1] c
5722 // No operand predicates
5723 // MIs[1] d
5724 // No operand predicates
5725 // MIs[1] e
5726 // No operand predicates
5727 // MIs[1] f
5728 // No operand predicates
5729 // MIs[1] g
5730 // No operand predicates
5731 // MIs[0] idx
5732 // No operand predicates
5733 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5734 // Combiner Rule #28: extract_vector_element_build_vector10
5735 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5736 // Label 388: @5507
5737 GIM_Try, /*On fail goto*//*Label 389*/ GIMT_Encode4(5531), // Rule ID 29 //
5738 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
5739 // MIs[0] root
5740 // No operand predicates
5741 // MIs[0] src
5742 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5743 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5744 GIM_CheckNumOperands, /*MI*/1, /*Expected*/10,
5745 // MIs[1] x
5746 // No operand predicates
5747 // MIs[1] y
5748 // No operand predicates
5749 // MIs[1] z
5750 // No operand predicates
5751 // MIs[1] a
5752 // No operand predicates
5753 // MIs[1] b
5754 // No operand predicates
5755 // MIs[1] c
5756 // No operand predicates
5757 // MIs[1] d
5758 // No operand predicates
5759 // MIs[1] e
5760 // No operand predicates
5761 // MIs[1] f
5762 // No operand predicates
5763 // MIs[0] idx
5764 // No operand predicates
5765 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5766 // Combiner Rule #27: extract_vector_element_build_vector9
5767 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5768 // Label 389: @5531
5769 GIM_Try, /*On fail goto*//*Label 390*/ GIMT_Encode4(5555), // Rule ID 28 //
5770 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
5771 // MIs[0] root
5772 // No operand predicates
5773 // MIs[0] src
5774 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5775 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5776 GIM_CheckNumOperands, /*MI*/1, /*Expected*/9,
5777 // MIs[1] x
5778 // No operand predicates
5779 // MIs[1] y
5780 // No operand predicates
5781 // MIs[1] z
5782 // No operand predicates
5783 // MIs[1] a
5784 // No operand predicates
5785 // MIs[1] b
5786 // No operand predicates
5787 // MIs[1] c
5788 // No operand predicates
5789 // MIs[1] d
5790 // No operand predicates
5791 // MIs[1] e
5792 // No operand predicates
5793 // MIs[0] idx
5794 // No operand predicates
5795 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5796 // Combiner Rule #26: extract_vector_element_build_vector8
5797 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5798 // Label 390: @5555
5799 GIM_Try, /*On fail goto*//*Label 391*/ GIMT_Encode4(5579), // Rule ID 43 //
5800 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule41Enabled),
5801 // MIs[0] root
5802 // No operand predicates
5803 // MIs[0] src
5804 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5805 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC),
5806 GIM_CheckNumOperands, /*MI*/1, /*Expected*/9,
5807 // MIs[1] x
5808 // No operand predicates
5809 // MIs[1] y
5810 // No operand predicates
5811 // MIs[1] z
5812 // No operand predicates
5813 // MIs[1] a
5814 // No operand predicates
5815 // MIs[1] b
5816 // No operand predicates
5817 // MIs[1] c
5818 // No operand predicates
5819 // MIs[1] d
5820 // No operand predicates
5821 // MIs[1] e
5822 // No operand predicates
5823 // MIs[0] idx
5824 // No operand predicates
5825 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5826 // Combiner Rule #41: extract_vector_element_build_vector_trunc8
5827 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
5828 // Label 391: @5579
5829 GIM_Try, /*On fail goto*//*Label 392*/ GIMT_Encode4(5603), // Rule ID 27 //
5830 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled),
5831 // MIs[0] root
5832 // No operand predicates
5833 // MIs[0] src
5834 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5835 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5836 GIM_CheckNumOperands, /*MI*/1, /*Expected*/8,
5837 // MIs[1] x
5838 // No operand predicates
5839 // MIs[1] y
5840 // No operand predicates
5841 // MIs[1] z
5842 // No operand predicates
5843 // MIs[1] a
5844 // No operand predicates
5845 // MIs[1] b
5846 // No operand predicates
5847 // MIs[1] c
5848 // No operand predicates
5849 // MIs[1] d
5850 // No operand predicates
5851 // MIs[0] idx
5852 // No operand predicates
5853 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5854 // Combiner Rule #25: extract_vector_element_build_vector7
5855 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5856 // Label 392: @5603
5857 GIM_Try, /*On fail goto*//*Label 393*/ GIMT_Encode4(5627), // Rule ID 42 //
5858 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule40Enabled),
5859 // MIs[0] root
5860 // No operand predicates
5861 // MIs[0] src
5862 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5863 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC),
5864 GIM_CheckNumOperands, /*MI*/1, /*Expected*/8,
5865 // MIs[1] x
5866 // No operand predicates
5867 // MIs[1] y
5868 // No operand predicates
5869 // MIs[1] z
5870 // No operand predicates
5871 // MIs[1] a
5872 // No operand predicates
5873 // MIs[1] b
5874 // No operand predicates
5875 // MIs[1] c
5876 // No operand predicates
5877 // MIs[1] d
5878 // No operand predicates
5879 // MIs[0] idx
5880 // No operand predicates
5881 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5882 // Combiner Rule #40: extract_vector_element_build_vector_trunc7
5883 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
5884 // Label 393: @5627
5885 GIM_Try, /*On fail goto*//*Label 394*/ GIMT_Encode4(5651), // Rule ID 41 //
5886 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule39Enabled),
5887 // MIs[0] root
5888 // No operand predicates
5889 // MIs[0] src
5890 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5891 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC),
5892 GIM_CheckNumOperands, /*MI*/1, /*Expected*/7,
5893 // MIs[1] x
5894 // No operand predicates
5895 // MIs[1] y
5896 // No operand predicates
5897 // MIs[1] z
5898 // No operand predicates
5899 // MIs[1] a
5900 // No operand predicates
5901 // MIs[1] b
5902 // No operand predicates
5903 // MIs[1] c
5904 // No operand predicates
5905 // MIs[0] idx
5906 // No operand predicates
5907 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5908 // Combiner Rule #39: extract_vector_element_build_vector_trunc6
5909 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
5910 // Label 394: @5651
5911 GIM_Try, /*On fail goto*//*Label 395*/ GIMT_Encode4(5675), // Rule ID 26 //
5912 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
5913 // MIs[0] root
5914 // No operand predicates
5915 // MIs[0] src
5916 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5917 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5918 GIM_CheckNumOperands, /*MI*/1, /*Expected*/6,
5919 // MIs[1] x
5920 // No operand predicates
5921 // MIs[1] y
5922 // No operand predicates
5923 // MIs[1] z
5924 // No operand predicates
5925 // MIs[1] a
5926 // No operand predicates
5927 // MIs[1] b
5928 // No operand predicates
5929 // MIs[0] idx
5930 // No operand predicates
5931 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5932 // Combiner Rule #24: extract_vector_element_build_vector5
5933 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5934 // Label 395: @5675
5935 GIM_Try, /*On fail goto*//*Label 396*/ GIMT_Encode4(5699), // Rule ID 40 //
5936 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule38Enabled),
5937 // MIs[0] root
5938 // No operand predicates
5939 // MIs[0] src
5940 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5941 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC),
5942 GIM_CheckNumOperands, /*MI*/1, /*Expected*/6,
5943 // MIs[1] x
5944 // No operand predicates
5945 // MIs[1] y
5946 // No operand predicates
5947 // MIs[1] z
5948 // No operand predicates
5949 // MIs[1] a
5950 // No operand predicates
5951 // MIs[1] b
5952 // No operand predicates
5953 // MIs[0] idx
5954 // No operand predicates
5955 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5956 // Combiner Rule #38: extract_vector_element_build_vector_trunc5
5957 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
5958 // Label 396: @5699
5959 GIM_Try, /*On fail goto*//*Label 397*/ GIMT_Encode4(5723), // Rule ID 25 //
5960 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
5961 // MIs[0] root
5962 // No operand predicates
5963 // MIs[0] src
5964 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5965 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
5966 GIM_CheckNumOperands, /*MI*/1, /*Expected*/5,
5967 // MIs[1] x
5968 // No operand predicates
5969 // MIs[1] y
5970 // No operand predicates
5971 // MIs[1] z
5972 // No operand predicates
5973 // MIs[1] a
5974 // No operand predicates
5975 // MIs[0] idx
5976 // No operand predicates
5977 GIM_CheckIsSafeToFold, /*NumInsns*/1,
5978 // Combiner Rule #23: extract_vector_element_build_vector4
5979 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
5980 // Label 397: @5723
5981 GIM_Try, /*On fail goto*//*Label 398*/ GIMT_Encode4(5747), // Rule ID 39 //
5982 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled),
5983 // MIs[0] root
5984 // No operand predicates
5985 // MIs[0] src
5986 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
5987 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC),
5988 GIM_CheckNumOperands, /*MI*/1, /*Expected*/5,
5989 // MIs[1] x
5990 // No operand predicates
5991 // MIs[1] y
5992 // No operand predicates
5993 // MIs[1] z
5994 // No operand predicates
5995 // MIs[1] a
5996 // No operand predicates
5997 // MIs[0] idx
5998 // No operand predicates
5999 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6000 // Combiner Rule #37: extract_vector_element_build_vector_trunc4
6001 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
6002 // Label 398: @5747
6003 GIM_Try, /*On fail goto*//*Label 399*/ GIMT_Encode4(5771), // Rule ID 24 //
6004 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
6005 // MIs[0] root
6006 // No operand predicates
6007 // MIs[0] src
6008 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6009 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
6010 GIM_CheckNumOperands, /*MI*/1, /*Expected*/4,
6011 // MIs[1] x
6012 // No operand predicates
6013 // MIs[1] y
6014 // No operand predicates
6015 // MIs[1] z
6016 // No operand predicates
6017 // MIs[0] idx
6018 // No operand predicates
6019 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6020 // Combiner Rule #22: extract_vector_element_build_vector3
6021 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
6022 // Label 399: @5771
6023 GIM_Try, /*On fail goto*//*Label 400*/ GIMT_Encode4(5795), // Rule ID 38 //
6024 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled),
6025 // MIs[0] root
6026 // No operand predicates
6027 // MIs[0] src
6028 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6029 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC),
6030 GIM_CheckNumOperands, /*MI*/1, /*Expected*/4,
6031 // MIs[1] x
6032 // No operand predicates
6033 // MIs[1] y
6034 // No operand predicates
6035 // MIs[1] z
6036 // No operand predicates
6037 // MIs[0] idx
6038 // No operand predicates
6039 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6040 // Combiner Rule #36: extract_vector_element_build_vector_trunc3
6041 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
6042 // Label 400: @5795
6043 GIM_Try, /*On fail goto*//*Label 401*/ GIMT_Encode4(5829), // Rule ID 21 //
6044 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
6045 // MIs[0] root
6046 // No operand predicates
6047 // MIs[0] src
6048 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6049 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INSERT_VECTOR_ELT),
6050 // MIs[1] x
6051 // No operand predicates
6052 // MIs[1] value
6053 // No operand predicates
6054 // MIs[1] idx
6055 // No operand predicates
6056 // MIs[0] idx
6057 GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/3,
6058 GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/2,
6059 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6060 // Combiner Rule #19: extract_vector_element_not_const
6061 GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/2,
6062 GIR_EraseRootFromParent_Done,
6063 // Label 401: @5829
6064 GIM_Try, /*On fail goto*//*Label 402*/ GIMT_Encode4(5850), // Rule ID 22 //
6065 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
6066 // MIs[0] root
6067 // No operand predicates
6068 // MIs[0] src
6069 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6070 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INSERT_VECTOR_ELT),
6071 // MIs[1] x
6072 // No operand predicates
6073 // MIs[1] value
6074 // No operand predicates
6075 // MIs[1] idx2
6076 // No operand predicates
6077 // MIs[0] idx1
6078 // No operand predicates
6079 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6080 // Combiner Rule #20: extract_vector_element_different_indices
6081 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
6082 // Label 402: @5850
6083 GIM_Try, /*On fail goto*//*Label 403*/ GIMT_Encode4(5871), // Rule ID 44 //
6084 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule42Enabled),
6085 // MIs[0] root
6086 // No operand predicates
6087 // MIs[0] src
6088 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6089 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SHUFFLE_VECTOR),
6090 // MIs[1] src1
6091 // No operand predicates
6092 // MIs[1] src2
6093 // No operand predicates
6094 // MIs[1] mask
6095 // No operand predicates
6096 // MIs[0] idx
6097 // No operand predicates
6098 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6099 // Combiner Rule #42: extract_vector_element_shuffle_vector
6100 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
6101 // Label 403: @5871
6102 GIM_Try, /*On fail goto*//*Label 404*/ GIMT_Encode4(5895), // Rule ID 23 //
6103 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
6104 // MIs[0] root
6105 // No operand predicates
6106 // MIs[0] src
6107 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6108 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR),
6109 GIM_CheckNumOperands, /*MI*/1, /*Expected*/3,
6110 // MIs[1] x
6111 // No operand predicates
6112 // MIs[1] y
6113 // No operand predicates
6114 // MIs[0] idx
6115 // No operand predicates
6116 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6117 // Combiner Rule #21: extract_vector_element_build_vector2
6118 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
6119 // Label 404: @5895
6120 GIM_Try, /*On fail goto*//*Label 405*/ GIMT_Encode4(5919), // Rule ID 37 //
6121 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled),
6122 // MIs[0] root
6123 // No operand predicates
6124 // MIs[0] src
6125 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6126 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BUILD_VECTOR_TRUNC),
6127 GIM_CheckNumOperands, /*MI*/1, /*Expected*/3,
6128 // MIs[1] x
6129 // No operand predicates
6130 // MIs[1] y
6131 // No operand predicates
6132 // MIs[0] idx
6133 // No operand predicates
6134 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6135 // Combiner Rule #35: extract_vector_element_build_vector_trunc2
6136 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
6137 // Label 405: @5919
6138 GIM_Try, /*On fail goto*//*Label 406*/ GIMT_Encode4(5943), // Rule ID 15 //
6139 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
6140 // MIs[0] root
6141 // No operand predicates
6142 // MIs[0] vector
6143 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6144 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
6145 // MIs[0] idx
6146 // No operand predicates
6147 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6148 // Combiner Rule #13: match_extract_of_element_undef_vector
6149 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
6150 GIR_RootToRootCopy, /*OpIdx*/0, // root
6151 GIR_EraseRootFromParent_Done,
6152 // Label 406: @5943
6153 GIM_Try, /*On fail goto*//*Label 407*/ GIMT_Encode4(5967), // Rule ID 16 //
6154 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
6155 // MIs[0] root
6156 // No operand predicates
6157 // MIs[0] vector
6158 // No operand predicates
6159 // MIs[0] idx
6160 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
6161 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
6162 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6163 // Combiner Rule #14: match_extract_of_element_undef_index
6164 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
6165 GIR_RootToRootCopy, /*OpIdx*/0, // root
6166 GIR_EraseRootFromParent_Done,
6167 // Label 407: @5967
6168 GIM_Reject,
6169 // Label 89: @5968
6170 GIM_Try, /*On fail goto*//*Label 408*/ GIMT_Encode4(5979), // Rule ID 78 //
6171 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule63Enabled),
6172 // Combiner Rule #63: propagate_undef_all_ops; wip_match_opcode 'G_SHUFFLE_VECTOR'
6173 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner26),
6174 // Label 408: @5979
6175 GIM_Try, /*On fail goto*//*Label 409*/ GIMT_Encode4(5990), // Rule ID 79 //
6176 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
6177 // Combiner Rule #64: propagate_undef_shuffle_mask; wip_match_opcode 'G_SHUFFLE_VECTOR'
6178 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner27),
6179 // Label 409: @5990
6180 GIM_Try, /*On fail goto*//*Label 410*/ GIMT_Encode4(6001), // Rule ID 320 //
6181 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule188Enabled),
6182 // Combiner Rule #188: combine_shuffle_concat; wip_match_opcode 'G_SHUFFLE_VECTOR'
6183 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner128),
6184 // Label 410: @6001
6185 GIM_Reject,
6186 // Label 90: @6002
6187 GIM_Try, /*On fail goto*//*Label 411*/ GIMT_Encode4(6046), // Rule ID 204 //
6188 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule146Enabled),
6189 // MIs[0] d
6190 // No operand predicates
6191 // MIs[0] src
6192 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6193 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_LSHR),
6194 // MIs[1] rev
6195 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2]
6196 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_BITREVERSE),
6197 // MIs[2] val
6198 // No operand predicates
6199 // MIs[1] amt
6200 // No operand predicates
6201 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6),
6202 GIM_CheckIsSafeToFold, /*NumInsns*/2,
6203 // Combiner Rule #146: bitreverse_lshr
6204 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SHL),
6205 GIR_RootToRootCopy, /*OpIdx*/0, // d
6206 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // val
6207 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // amt
6208 GIR_EraseRootFromParent_Done,
6209 // Label 411: @6046
6210 GIM_Try, /*On fail goto*//*Label 412*/ GIMT_Encode4(6090), // Rule ID 203 //
6211 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule145Enabled),
6212 // MIs[0] d
6213 // No operand predicates
6214 // MIs[0] src
6215 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6216 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SHL),
6217 // MIs[1] rev
6218 GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2]
6219 GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_BITREVERSE),
6220 // MIs[2] val
6221 // No operand predicates
6222 // MIs[1] amt
6223 // No operand predicates
6224 GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner5),
6225 GIM_CheckIsSafeToFold, /*NumInsns*/2,
6226 // Combiner Rule #145: bitreverse_shl
6227 GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_LSHR),
6228 GIR_RootToRootCopy, /*OpIdx*/0, // d
6229 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/2, /*OpIdx*/1, // val
6230 GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // amt
6231 GIR_EraseRootFromParent_Done,
6232 // Label 412: @6090
6233 GIM_Reject,
6234 // Label 91: @6091
6235 GIM_Try, /*On fail goto*//*Label 413*/ GIMT_Encode4(6112), // Rule ID 159 //
6236 GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule122Enabled),
6237 // MIs[0] dst
6238 // No operand predicates
6239 // MIs[0] src0
6240 GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
6241 GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
6242 // MIs[1] cst
6243 // No operand predicates
6244 GIM_CheckIsSafeToFold, /*NumInsns*/1,
6245 // Combiner Rule #122: constant_fold_fsqrt
6246 GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner72),
6247 // Label 413: @6112
6248 GIM_Reject,
6249 // Label 92: @6113
6250 GIM_Reject,
6251 }; // Size: 6114 bytes
6252 return MatchTable0;
6253}
6254#undef GIMT_Encode2
6255#undef GIMT_Encode4
6256#undef GIMT_Encode8
6257
6258#endif // ifdef GET_GICOMBINER_IMPL
6259
6260#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
6261AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
6262AvailableFunctionFeatures()
6263#endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
6264#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
6265, State(0),
6266ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
6267#endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
6268
6269