1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* X86PreLegalizerCombinerImpl Combiner Match Table *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_GICOMBINER_DEPS
10
11#include "llvm/ADT/SparseBitVector.h"
12namespace llvm {
13
14extern cl::OptionCategory GICombinerOptionCategory;
15
16} // namespace llvm
17
18#endif // GET_GICOMBINER_DEPS
19
20#ifdef GET_GICOMBINER_TYPES
21
22struct X86PreLegalizerCombinerImplRuleConfig {
23 SparseBitVector<> DisabledRules;
24
25 bool isRuleEnabled(unsigned RuleID) const;
26 bool parseCommandLineOption();
27 bool setRuleEnabled(StringRef RuleIdentifier);
28 bool setRuleDisabled(StringRef RuleIdentifier);
29};
30
31static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) {
32 uint64_t I;
33 // getAtInteger(...) returns false on success
34 bool Parsed = !RuleIdentifier.getAsInteger(0, I);
35 if (Parsed)
36 return I;
37
38#ifndef NDEBUG
39 switch (RuleIdentifier.size()) {
40 default: break;
41 case 9: // 1 string to match.
42 if (memcmp(RuleIdentifier.data()+0, "copy_prop", 9) != 0)
43 break;
44 return 72; // "copy_prop"
45 case 10: // 3 strings to match.
46 switch (RuleIdentifier[0]) {
47 default: break;
48 case 'm': // 1 string to match.
49 if (memcmp(RuleIdentifier.data()+1, "ul_to_shl", 9) != 0)
50 break;
51 return 73; // "mul_to_shl"
52 case 'p': // 1 string to match.
53 if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p", 9) != 0)
54 break;
55 return 7; // "p2i_to_i2p"
56 case 's': // 1 string to match.
57 if (memcmp(RuleIdentifier.data()+1, "ub_to_add", 9) != 0)
58 break;
59 return 74; // "sub_to_add"
60 }
61 break;
62 case 11: // 1 string to match.
63 if (memcmp(RuleIdentifier.data()+0, "add_sub_reg", 11) != 0)
64 break;
65 return 15; // "add_sub_reg"
66 case 13: // 1 string to match.
67 if (memcmp(RuleIdentifier.data()+0, "same_val_zero", 13) != 0)
68 break;
69 return 4; // "same_val_zero"
70 case 14: // 4 strings to match.
71 switch (RuleIdentifier[0]) {
72 default: break;
73 case 'b': // 1 string to match.
74 if (memcmp(RuleIdentifier.data()+1, "inop_same_val", 13) != 0)
75 break;
76 return 3; // "binop_same_val"
77 case 'f': // 1 string to match.
78 if (memcmp(RuleIdentifier.data()+1, "neg_fneg_fold", 13) != 0)
79 break;
80 return 12; // "fneg_fneg_fold"
81 case 'm': // 1 string to match.
82 if (memcmp(RuleIdentifier.data()+1, "ul_by_neg_one", 13) != 0)
83 break;
84 return 76; // "mul_by_neg_one"
85 case 'r': // 1 string to match.
86 if (memcmp(RuleIdentifier.data()+1, "eassoc_ptradd", 13) != 0)
87 break;
88 return 26; // "reassoc_ptradd"
89 }
90 break;
91 case 15: // 7 strings to match.
92 switch (RuleIdentifier[0]) {
93 default: break;
94 case 'i': // 2 strings to match.
95 switch (RuleIdentifier[1]) {
96 default: break;
97 case '2': // 1 string to match.
98 if (memcmp(RuleIdentifier.data()+2, "p_to_p2i_zext", 13) != 0)
99 break;
100 return 9; // "i2p_to_p2i_zext"
101 case 'd': // 1 string to match.
102 if (memcmp(RuleIdentifier.data()+2, "empotent_prop", 13) != 0)
103 break;
104 return 77; // "idempotent_prop"
105 }
106 break;
107 case 'm': // 4 strings to match.
108 if (memcmp(RuleIdentifier.data()+1, "ulo_by_", 7) != 0)
109 break;
110 switch (RuleIdentifier[8]) {
111 default: break;
112 case '0': // 2 strings to match.
113 if (RuleIdentifier[9] != '_')
114 break;
115 switch (RuleIdentifier[10]) {
116 default: break;
117 case 's': // 1 string to match.
118 if (memcmp(RuleIdentifier.data()+11, "mulo", 4) != 0)
119 break;
120 return 48; // "mulo_by_0_smulo"
121 case 'u': // 1 string to match.
122 if (memcmp(RuleIdentifier.data()+11, "mulo", 4) != 0)
123 break;
124 return 47; // "mulo_by_0_umulo"
125 }
126 break;
127 case '2': // 2 strings to match.
128 if (RuleIdentifier[9] != '_')
129 break;
130 switch (RuleIdentifier[10]) {
131 default: break;
132 case 's': // 1 string to match.
133 if (memcmp(RuleIdentifier.data()+11, "mulo", 4) != 0)
134 break;
135 return 46; // "mulo_by_2_smulo"
136 case 'u': // 1 string to match.
137 if (memcmp(RuleIdentifier.data()+11, "mulo", 4) != 0)
138 break;
139 return 45; // "mulo_by_2_umulo"
140 }
141 break;
142 }
143 break;
144 case 'o': // 1 string to match.
145 if (memcmp(RuleIdentifier.data()+1, "verlapping_and", 14) != 0)
146 break;
147 return 44; // "overlapping_and"
148 }
149 break;
150 case 16: // 2 strings to match.
151 switch (RuleIdentifier[0]) {
152 default: break;
153 case 'i': // 1 string to match.
154 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i_trunc", 15) != 0)
155 break;
156 return 10; // "i2p_to_p2i_trunc"
157 case 'u': // 1 string to match.
158 if (memcmp(RuleIdentifier.data()+1, "ndef_to_fp_zero", 15) != 0)
159 break;
160 return 58; // "undef_to_fp_zero"
161 }
162 break;
163 case 17: // 4 strings to match.
164 switch (RuleIdentifier[0]) {
165 default: break;
166 case 'a': // 2 strings to match.
167 switch (RuleIdentifier[1]) {
168 default: break;
169 case 'd': // 1 string to match.
170 if (memcmp(RuleIdentifier.data()+2, "d_p2i_to_ptradd", 15) != 0)
171 break;
172 return 75; // "add_p2i_to_ptradd"
173 case 'n': // 1 string to match.
174 if (memcmp(RuleIdentifier.data()+2, "yext_trunc_fold", 15) != 0)
175 break;
176 return 11; // "anyext_trunc_fold"
177 }
178 break;
179 case 'e': // 1 string to match.
180 if (memcmp(RuleIdentifier.data()+1, "rase_undef_store", 16) != 0)
181 break;
182 return 69; // "erase_undef_store"
183 case 'u': // 1 string to match.
184 if (memcmp(RuleIdentifier.data()+1, "ndef_to_int_zero", 16) != 0)
185 break;
186 return 59; // "undef_to_int_zero"
187 }
188 break;
189 case 18: // 11 strings to match.
190 switch (RuleIdentifier[0]) {
191 default: break;
192 case 'a': // 4 strings to match.
193 if (memcmp(RuleIdentifier.data()+1, "dde_to_addo_", 12) != 0)
194 break;
195 switch (RuleIdentifier[13]) {
196 default: break;
197 case 's': // 2 strings to match.
198 switch (RuleIdentifier[14]) {
199 default: break;
200 case 'a': // 1 string to match.
201 if (memcmp(RuleIdentifier.data()+15, "dde", 3) != 0)
202 break;
203 return 50; // "adde_to_addo_sadde"
204 case 's': // 1 string to match.
205 if (memcmp(RuleIdentifier.data()+15, "ube", 3) != 0)
206 break;
207 return 52; // "adde_to_addo_ssube"
208 }
209 break;
210 case 'u': // 2 strings to match.
211 switch (RuleIdentifier[14]) {
212 default: break;
213 case 'a': // 1 string to match.
214 if (memcmp(RuleIdentifier.data()+15, "dde", 3) != 0)
215 break;
216 return 49; // "adde_to_addo_uadde"
217 case 's': // 1 string to match.
218 if (memcmp(RuleIdentifier.data()+15, "ube", 3) != 0)
219 break;
220 return 51; // "adde_to_addo_usube"
221 }
222 break;
223 }
224 break;
225 case 'b': // 1 string to match.
226 if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero", 17) != 0)
227 break;
228 return 5; // "binop_left_to_zero"
229 case 'c': // 2 strings to match.
230 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_f", 14) != 0)
231 break;
232 switch (RuleIdentifier[15]) {
233 default: break;
234 case 'a': // 1 string to match.
235 if (memcmp(RuleIdentifier.data()+16, "bs", 2) != 0)
236 break;
237 return 29; // "constant_fold_fabs"
238 case 'n': // 1 string to match.
239 if (memcmp(RuleIdentifier.data()+16, "eg", 2) != 0)
240 break;
241 return 28; // "constant_fold_fneg"
242 }
243 break;
244 case 'e': // 1 string to match.
245 if (memcmp(RuleIdentifier.data()+1, "xpand_const_fpowi", 17) != 0)
246 break;
247 return 57; // "expand_const_fpowi"
248 case 'f': // 1 string to match.
249 if (memcmp(RuleIdentifier.data()+1, "ptrunc_fpext_fold", 17) != 0)
250 break;
251 return 22; // "fptrunc_fpext_fold"
252 case 'm': // 2 strings to match.
253 if (memcmp(RuleIdentifier.data()+1, "inmax_nan_num_", 14) != 0)
254 break;
255 switch (RuleIdentifier[15]) {
256 default: break;
257 case 'l': // 1 string to match.
258 if (memcmp(RuleIdentifier.data()+16, "hs", 2) != 0)
259 break;
260 return 53; // "minmax_nan_num_lhs"
261 case 'r': // 1 string to match.
262 if (memcmp(RuleIdentifier.data()+16, "hs", 2) != 0)
263 break;
264 return 54; // "minmax_nan_num_rhs"
265 }
266 break;
267 }
268 break;
269 case 19: // 13 strings to match.
270 switch (RuleIdentifier[0]) {
271 default: break;
272 case 'b': // 1 string to match.
273 if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero", 18) != 0)
274 break;
275 return 6; // "binop_right_to_zero"
276 case 'c': // 6 strings to match.
277 if (memcmp(RuleIdentifier.data()+1, "onst", 4) != 0)
278 break;
279 switch (RuleIdentifier[5]) {
280 default: break;
281 case '_': // 1 string to match.
282 if (memcmp(RuleIdentifier.data()+6, "ptradd_to_i2p", 13) != 0)
283 break;
284 return 43; // "const_ptradd_to_i2p"
285 case 'a': // 5 strings to match.
286 if (memcmp(RuleIdentifier.data()+6, "nt_fold_f", 9) != 0)
287 break;
288 switch (RuleIdentifier[15]) {
289 default: break;
290 case 'c': // 1 string to match.
291 if (memcmp(RuleIdentifier.data()+16, "eil", 3) != 0)
292 break;
293 return 34; // "constant_fold_fceil"
294 case 'l': // 1 string to match.
295 if (memcmp(RuleIdentifier.data()+16, "og2", 3) != 0)
296 break;
297 return 31; // "constant_fold_flog2"
298 case 'p': // 1 string to match.
299 if (memcmp(RuleIdentifier.data()+16, "ext", 3) != 0)
300 break;
301 return 33; // "constant_fold_fpext"
302 case 'r': // 1 string to match.
303 if (memcmp(RuleIdentifier.data()+16, "int", 3) != 0)
304 break;
305 return 39; // "constant_fold_frint"
306 case 's': // 1 string to match.
307 if (memcmp(RuleIdentifier.data()+16, "qrt", 3) != 0)
308 break;
309 return 30; // "constant_fold_fsqrt"
310 }
311 break;
312 }
313 break;
314 case 'm': // 2 strings to match.
315 if (memcmp(RuleIdentifier.data()+1, "inmax_nan_ieee_", 15) != 0)
316 break;
317 switch (RuleIdentifier[16]) {
318 default: break;
319 case 'l': // 1 string to match.
320 if (memcmp(RuleIdentifier.data()+17, "hs", 2) != 0)
321 break;
322 return 55; // "minmax_nan_ieee_lhs"
323 case 'r': // 1 string to match.
324 if (memcmp(RuleIdentifier.data()+17, "hs", 2) != 0)
325 break;
326 return 56; // "minmax_nan_ieee_rhs"
327 }
328 break;
329 case 'r': // 2 strings to match.
330 switch (RuleIdentifier[1]) {
331 default: break;
332 case 'e': // 1 string to match.
333 if (memcmp(RuleIdentifier.data()+2, "assoc_comm_binops", 17) != 0)
334 break;
335 return 27; // "reassoc_comm_binops"
336 case 'i': // 1 string to match.
337 if (memcmp(RuleIdentifier.data()+2, "ght_identity_zero", 17) != 0)
338 break;
339 return 2; // "right_identity_zero"
340 }
341 break;
342 case 's': // 1 string to match.
343 if (memcmp(RuleIdentifier.data()+1, "implify_add_to_sub", 18) != 0)
344 break;
345 return 78; // "simplify_add_to_sub"
346 case 'u': // 1 string to match.
347 if (memcmp(RuleIdentifier.data()+1, "nary_undef_to_zero", 18) != 0)
348 break;
349 return 63; // "unary_undef_to_zero"
350 }
351 break;
352 case 20: // 4 strings to match.
353 switch (RuleIdentifier[0]) {
354 default: break;
355 case 'b': // 1 string to match.
356 if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_fold", 19) != 0)
357 break;
358 return 20; // "bitcast_bitcast_fold"
359 case 'c': // 1 string to match.
360 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_ffloor", 19) != 0)
361 break;
362 return 35; // "constant_fold_ffloor"
363 case 'i': // 1 string to match.
364 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i_same_size", 19) != 0)
365 break;
366 return 8; // "i2p_to_p2i_same_size"
367 case 'u': // 1 string to match.
368 if (memcmp(RuleIdentifier.data()+1, "nary_undef_to_undef", 19) != 0)
369 break;
370 return 64; // "unary_undef_to_undef"
371 }
372 break;
373 case 21: // 4 strings to match.
374 switch (RuleIdentifier[0]) {
375 default: break;
376 case 'c': // 1 string to match.
377 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fptrunc", 20) != 0)
378 break;
379 return 32; // "constant_fold_fptrunc"
380 case 'r': // 1 string to match.
381 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_fp", 20) != 0)
382 break;
383 return 14; // "right_identity_one_fp"
384 case 's': // 1 string to match.
385 if (memcmp(RuleIdentifier.data()+1, "elect_same_val_equiv", 20) != 0)
386 break;
387 return 1; // "select_same_val_equiv"
388 case 'u': // 1 string to match.
389 if (memcmp(RuleIdentifier.data()+1, "ndef_to_negative_one", 20) != 0)
390 break;
391 return 60; // "undef_to_negative_one"
392 }
393 break;
394 case 22: // 3 strings to match.
395 switch (RuleIdentifier[0]) {
396 default: break;
397 case 'p': // 1 string to match.
398 if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_any_op", 21) != 0)
399 break;
400 return 65; // "propagate_undef_any_op"
401 case 'r': // 1 string to match.
402 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_int", 21) != 0)
403 break;
404 return 13; // "right_identity_one_int"
405 case 't': // 1 string to match.
406 if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold", 21) != 0)
407 break;
408 return 18; // "trunc_buildvector_fold"
409 }
410 break;
411 case 23: // 3 strings to match.
412 switch (RuleIdentifier[0]) {
413 default: break;
414 case 'i': // 2 strings to match.
415 if (memcmp(RuleIdentifier.data()+1, "tof_const_zero_fold_", 20) != 0)
416 break;
417 switch (RuleIdentifier[21]) {
418 default: break;
419 case 's': // 1 string to match.
420 if (RuleIdentifier[22] != 'i')
421 break;
422 return 41; // "itof_const_zero_fold_si"
423 case 'u': // 1 string to match.
424 if (RuleIdentifier[22] != 'i')
425 break;
426 return 42; // "itof_const_zero_fold_ui"
427 }
428 break;
429 case 's': // 1 string to match.
430 if (memcmp(RuleIdentifier.data()+1, "elect_same_val_trivial", 22) != 0)
431 break;
432 return 0; // "select_same_val_trivial"
433 }
434 break;
435 case 24: // 2 strings to match.
436 switch (RuleIdentifier[0]) {
437 default: break;
438 case 'b': // 1 string to match.
439 if (memcmp(RuleIdentifier.data()+1, "inop_left_undef_to_zero", 23) != 0)
440 break;
441 return 61; // "binop_left_undef_to_zero"
442 case 'c': // 1 string to match.
443 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fnearbyint", 23) != 0)
444 break;
445 return 40; // "constant_fold_fnearbyint"
446 }
447 break;
448 case 25: // 1 string to match.
449 if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_one_fp", 25) != 0)
450 break;
451 return 25; // "right_identity_neg_one_fp"
452 case 26: // 3 strings to match.
453 switch (RuleIdentifier[0]) {
454 default: break;
455 case 'b': // 2 strings to match.
456 if (RuleIdentifier[1] != 'i')
457 break;
458 switch (RuleIdentifier[2]) {
459 default: break;
460 case 'n': // 1 string to match.
461 if (memcmp(RuleIdentifier.data()+3, "op_right_undef_to_undef", 23) != 0)
462 break;
463 return 62; // "binop_right_undef_to_undef"
464 case 't': // 1 string to match.
465 if (memcmp(RuleIdentifier.data()+3, "cast_bitcast_to_bitcast", 23) != 0)
466 break;
467 return 21; // "bitcast_bitcast_to_bitcast"
468 }
469 break;
470 case 'r': // 1 string to match.
471 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp", 25) != 0)
472 break;
473 return 23; // "right_identity_neg_zero_fp"
474 }
475 break;
476 case 27: // 1 string to match.
477 if (memcmp(RuleIdentifier.data()+0, "trunc_lshr_buildvector_fold", 27) != 0)
478 break;
479 return 19; // "trunc_lshr_buildvector_fold"
480 case 28: // 3 strings to match.
481 switch (RuleIdentifier[0]) {
482 default: break;
483 case 'b': // 1 string to match.
484 if (memcmp(RuleIdentifier.data()+1, "uildvector_identity_fold_bv", 27) != 0)
485 break;
486 return 16; // "buildvector_identity_fold_bv"
487 case 'i': // 1 string to match.
488 if (memcmp(RuleIdentifier.data()+1, "nsert_vec_elt_out_of_bounds", 27) != 0)
489 break;
490 return 70; // "insert_vec_elt_out_of_bounds"
491 case 'p': // 1 string to match.
492 if (memcmp(RuleIdentifier.data()+1, "ropagate_undef_shuffle_mask", 27) != 0)
493 break;
494 return 68; // "propagate_undef_shuffle_mask"
495 }
496 break;
497 case 29: // 4 strings to match.
498 switch (RuleIdentifier[0]) {
499 default: break;
500 case 'b': // 1 string to match.
501 if (memcmp(RuleIdentifier.data()+1, "uildvector_identity_fold_bvt", 28) != 0)
502 break;
503 return 17; // "buildvector_identity_fold_bvt"
504 case 'c': // 2 strings to match.
505 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_intrinsic_", 23) != 0)
506 break;
507 switch (RuleIdentifier[24]) {
508 default: break;
509 case 'r': // 1 string to match.
510 if (memcmp(RuleIdentifier.data()+25, "ound", 4) != 0)
511 break;
512 return 37; // "constant_fold_intrinsic_round"
513 case 't': // 1 string to match.
514 if (memcmp(RuleIdentifier.data()+25, "runc", 4) != 0)
515 break;
516 return 36; // "constant_fold_intrinsic_trunc"
517 }
518 break;
519 case 'e': // 1 string to match.
520 if (memcmp(RuleIdentifier.data()+1, "xtract_vec_elt_out_of_bounds", 28) != 0)
521 break;
522 return 71; // "extract_vec_elt_out_of_bounds"
523 }
524 break;
525 case 30: // 1 string to match.
526 if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_zero_fp_nsz", 30) != 0)
527 break;
528 return 24; // "right_identity_neg_zero_fp_nsz"
529 case 33: // 1 string to match.
530 if (memcmp(RuleIdentifier.data()+0, "constant_fold_intrinsic_roundeven", 33) != 0)
531 break;
532 return 38; // "constant_fold_intrinsic_roundeven"
533 case 36: // 1 string to match.
534 if (memcmp(RuleIdentifier.data()+0, "propagate_undef_all_ops_build_vector", 36) != 0)
535 break;
536 return 67; // "propagate_undef_all_ops_build_vector"
537 case 38: // 1 string to match.
538 if (memcmp(RuleIdentifier.data()+0, "propagate_undef_all_ops_shuffle_vector", 38) != 0)
539 break;
540 return 66; // "propagate_undef_all_ops_shuffle_vector"
541 }
542#endif // ifndef NDEBUG
543
544 return std::nullopt;
545}
546static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
547 std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
548 if (!RangePair.second.empty()) {
549 const auto First = getRuleIdxForIdentifier(RangePair.first);
550 const auto Last = getRuleIdxForIdentifier(RangePair.second);
551 if (!First || !Last)
552 return std::nullopt;
553 if (First >= Last)
554 report_fatal_error("Beginning of range should be before end of range");
555 return {{*First, *Last + 1}};
556 }
557 if (RangePair.first == "*") {
558 return {{0, 79}};
559 }
560 const auto I = getRuleIdxForIdentifier(RangePair.first);
561 if (!I)
562 return std::nullopt;
563 return {{*I, *I + 1}};
564}
565
566bool X86PreLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
567 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
568 if (!MaybeRange)
569 return false;
570 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
571 DisabledRules.reset(I);
572 return true;
573}
574
575bool X86PreLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
576 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
577 if (!MaybeRange)
578 return false;
579 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
580 DisabledRules.set(I);
581 return true;
582}
583
584static std::vector<std::string> X86PreLegalizerCombinerOption;
585static cl::list<std::string> X86PreLegalizerCombinerDisableOption(
586 "x86prelegalizercombiner-disable-rule",
587 cl::desc("Disable one or more combiner rules temporarily in the X86PreLegalizerCombiner pass"),
588 cl::CommaSeparated,
589 cl::Hidden,
590 cl::cat(GICombinerOptionCategory),
591 cl::callback([](const std::string &Str) {
592 X86PreLegalizerCombinerOption.push_back(Str);
593 }));
594static cl::list<std::string> X86PreLegalizerCombinerOnlyEnableOption(
595 "x86prelegalizercombiner-only-enable-rule",
596 cl::desc("Disable all rules in the X86PreLegalizerCombiner pass then re-enable the specified ones"),
597 cl::Hidden,
598 cl::cat(GICombinerOptionCategory),
599 cl::callback([](const std::string &CommaSeparatedArg) {
600 StringRef Str = CommaSeparatedArg;
601 X86PreLegalizerCombinerOption.push_back("*");
602 do {
603 auto X = Str.split(",");
604 X86PreLegalizerCombinerOption.push_back(("!" + X.first).str());
605 Str = X.second;
606 } while (!Str.empty());
607 }));
608
609
610bool X86PreLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
611 return !DisabledRules.test(RuleID);
612}
613bool X86PreLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
614 for (StringRef Identifier : X86PreLegalizerCombinerOption) {
615 bool Enabled = Identifier.consume_front("!");
616 if (Enabled && !setRuleEnabled(Identifier))
617 return false;
618 if (!Enabled && !setRuleDisabled(Identifier))
619 return false;
620 }
621 return true;
622}
623
624
625#endif // GET_GICOMBINER_TYPES
626
627#ifdef GET_GICOMBINER_TYPES
628
629const unsigned MAX_SUBTARGET_PREDICATES = 0;
630using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
631
632#endif // GET_GICOMBINER_TYPES
633
634#ifdef GET_GICOMBINER_CLASS_MEMBERS
635
636 bool canMatchOpcode(unsigned Opc) const override;
637 uint32_t getRootFlagsToDrop() const override;
638
639#endif // GET_GICOMBINER_CLASS_MEMBERS
640
641#ifdef GET_GICOMBINER_CLASS_MEMBERS
642
643PredicateBitset AvailableModuleFeatures;
644mutable PredicateBitset AvailableFunctionFeatures;
645PredicateBitset getAvailableFeatures() const {
646 return AvailableModuleFeatures | AvailableFunctionFeatures;
647}
648PredicateBitset
649computeAvailableModuleFeatures(const X86Subtarget *Subtarget) const;
650PredicateBitset
651computeAvailableFunctionFeatures(const X86Subtarget *Subtarget,
652 const MachineFunction *MF) const;
653void setupGeneratedPerFunctionState(MachineFunction &MF) override;
654
655#endif // GET_GICOMBINER_CLASS_MEMBERS
656
657#ifdef GET_GICOMBINER_CLASS_MEMBERS
658
659 mutable MatcherState State;
660 typedef ComplexRendererFns(X86PreLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
661 typedef void(X86PreLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
662 const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
663 static X86PreLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
664 static X86PreLegalizerCombinerImpl::CustomRendererFn CustomRenderers[];
665 bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
666 bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
667 bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
668 const uint8_t *getMatchTable() const override;
669 LLT getLLTForHwMode(unsigned Index) const override;
670 bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
671 bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override;
672 bool testSimplePredicate(unsigned PredicateID) const override;
673 bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
674
675#endif // GET_GICOMBINER_CLASS_MEMBERS
676
677#ifdef GET_GICOMBINER_IMPL
678
679// LLT Objects.
680enum {
681 GILLT_s1,
682};
683const static size_t NumTypeObjects = 1;
684const static LLT TypeObjects[] = {
685 LLT::scalar(1),
686};
687
688// Bits for subtarget features that participate in instruction matching.
689enum SubtargetFeatureBits : uint8_t {
690};
691
692PredicateBitset X86PreLegalizerCombinerImpl::
693computeAvailableModuleFeatures(const X86Subtarget *Subtarget) const {
694 PredicateBitset Features{};
695 return Features;
696}
697
698void X86PreLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
699 AvailableFunctionFeatures = computeAvailableFunctionFeatures((const X86Subtarget *)&MF.getSubtarget(), &MF);
700}
701PredicateBitset X86PreLegalizerCombinerImpl::
702computeAvailableFunctionFeatures(const X86Subtarget *Subtarget, const MachineFunction *MF) const {
703 PredicateBitset Features{};
704 return Features;
705}
706
707// Feature bitsets.
708enum {
709 GIFBS_Invalid,
710};
711constexpr static PredicateBitset FeatureBitsets[] {
712 {}, // GIFBS_Invalid
713};
714
715// ComplexPattern predicates.
716enum {
717 GICP_Invalid,
718};
719// See constructor for table contents
720
721X86PreLegalizerCombinerImpl::ComplexMatcherMemFn
722X86PreLegalizerCombinerImpl::ComplexPredicateFns[] = {
723 nullptr, // GICP_Invalid
724};
725
726enum {
727 GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1,
728 GICXXPred_MI_Predicate_GICombiner1,
729 GICXXPred_MI_Predicate_GICombiner2,
730 GICXXPred_MI_Predicate_GICombiner3,
731 GICXXPred_MI_Predicate_GICombiner4,
732 GICXXPred_MI_Predicate_GICombiner5,
733 GICXXPred_MI_Predicate_GICombiner6,
734 GICXXPred_MI_Predicate_GICombiner7,
735 GICXXPred_MI_Predicate_GICombiner8,
736 GICXXPred_MI_Predicate_GICombiner9,
737 GICXXPred_MI_Predicate_GICombiner10,
738 GICXXPred_MI_Predicate_GICombiner11,
739 GICXXPred_MI_Predicate_GICombiner12,
740 GICXXPred_MI_Predicate_GICombiner13,
741 GICXXPred_MI_Predicate_GICombiner14,
742 GICXXPred_MI_Predicate_GICombiner15,
743 GICXXPred_MI_Predicate_GICombiner16,
744 GICXXPred_MI_Predicate_GICombiner17,
745 GICXXPred_MI_Predicate_GICombiner18,
746 GICXXPred_MI_Predicate_GICombiner19,
747};
748bool X86PreLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
749 switch (PredicateID) {
750 case GICXXPred_MI_Predicate_GICombiner0: {
751 return Helper.matchSelectSameVal(*State.MIs[0]);
752 }
753 case GICXXPred_MI_Predicate_GICombiner1: {
754 return Helper.matchConstantOp(State.MIs[0]->getOperand(1), 0);
755 }
756 case GICXXPred_MI_Predicate_GICombiner2: {
757 return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());
758 }
759 case GICXXPred_MI_Predicate_GICombiner3: {
760 return MRI.getType(State.MIs[0]->getOperand(0).getReg()).getSizeInBits() ==
761 MRI.getType(State.MIs[1]->getOperand(1).getReg()).getSizeInBits();
762 }
763 case GICXXPred_MI_Predicate_GICombiner4: {
764 return MRI.getType(State.MIs[0]->getOperand(0).getReg()).getSizeInBits() >
765 MRI.getType(State.MIs[1]->getOperand(1).getReg()).getSizeInBits();
766 }
767 case GICXXPred_MI_Predicate_GICombiner5: {
768 return MRI.getType(State.MIs[0]->getOperand(0).getReg()).getSizeInBits() <
769 MRI.getType(State.MIs[1]->getOperand(1).getReg()).getSizeInBits();
770 }
771 case GICXXPred_MI_Predicate_GICombiner6: {
772 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0);
773 }
774 case GICXXPred_MI_Predicate_GICombiner7: {
775 return MRI.getType(State.MIs[1]->getOperand(1).getReg()) != MRI.getType(State.MIs[0]->getOperand(0).getReg());
776 }
777 case GICXXPred_MI_Predicate_GICombiner8: {
778 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0);
779 }
780 case GICXXPred_MI_Predicate_GICombiner9: {
781 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 0.0);
782 }
783 case GICXXPred_MI_Predicate_GICombiner10: {
784 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0);
785 }
786 case GICXXPred_MI_Predicate_GICombiner11: {
787 return Helper.matchConstantOp(State.MIs[0]->getOperand(3), 2);
788 }
789 case GICXXPred_MI_Predicate_GICombiner12: {
790 return Helper.matchConstantOp(State.MIs[0]->getOperand(4), 0);
791 }
792 case GICXXPred_MI_Predicate_GICombiner13: {
793 return Helper.isConstantNaN(State.MIs[0]->getOperand(1).getReg());
794 }
795 case GICXXPred_MI_Predicate_GICombiner14: {
796 return Helper.isConstantNaN(State.MIs[0]->getOperand(2).getReg()) &&
797 !Helper.isConstantNaN(State.MIs[0]->getOperand(1).getReg());
798 }
799 case GICXXPred_MI_Predicate_GICombiner15: {
800 return Helper.matchAllExplicitUsesAreUndef(*State.MIs[0]);
801 }
802 case GICXXPred_MI_Predicate_GICombiner16: {
803 return Helper.matchUndefShuffleVectorMask(*State.MIs[0]);
804 }
805 case GICXXPred_MI_Predicate_GICombiner17: {
806 return cast<GStore>(State.MIs[0])->isUnordered();
807 }
808 case GICXXPred_MI_Predicate_GICombiner18: {
809 return Helper.matchInsertExtractVecEltOutOfBounds(*State.MIs[0]);
810 }
811 case GICXXPred_MI_Predicate_GICombiner19: {
812 return MRI.getType(State.MIs[1]->getOperand(1).getReg()).getScalarSizeInBits() ==
813 MRI.getType(State.MIs[0]->getOperand(0).getReg()).getScalarSizeInBits();
814 }
815 }
816 llvm_unreachable("Unknown predicate");
817 return false;
818}
819bool X86PreLegalizerCombinerImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const {
820 llvm_unreachable("Unknown predicate");
821 return false;
822}
823bool X86PreLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
824 llvm_unreachable("Unknown predicate");
825 return false;
826}
827bool X86PreLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
828 llvm_unreachable("Unknown predicate");
829 return false;
830}
831bool X86PreLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
832 llvm_unreachable("Unknown predicate");
833 return false;
834}
835enum {
836 GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
837 GICXXPred_Simple_IsRule1Enabled,
838 GICXXPred_Simple_IsRule2Enabled,
839 GICXXPred_Simple_IsRule3Enabled,
840 GICXXPred_Simple_IsRule4Enabled,
841 GICXXPred_Simple_IsRule5Enabled,
842 GICXXPred_Simple_IsRule6Enabled,
843 GICXXPred_Simple_IsRule7Enabled,
844 GICXXPred_Simple_IsRule8Enabled,
845 GICXXPred_Simple_IsRule9Enabled,
846 GICXXPred_Simple_IsRule10Enabled,
847 GICXXPred_Simple_IsRule11Enabled,
848 GICXXPred_Simple_IsRule12Enabled,
849 GICXXPred_Simple_IsRule13Enabled,
850 GICXXPred_Simple_IsRule14Enabled,
851 GICXXPred_Simple_IsRule15Enabled,
852 GICXXPred_Simple_IsRule16Enabled,
853 GICXXPred_Simple_IsRule17Enabled,
854 GICXXPred_Simple_IsRule18Enabled,
855 GICXXPred_Simple_IsRule19Enabled,
856 GICXXPred_Simple_IsRule20Enabled,
857 GICXXPred_Simple_IsRule21Enabled,
858 GICXXPred_Simple_IsRule22Enabled,
859 GICXXPred_Simple_IsRule23Enabled,
860 GICXXPred_Simple_IsRule24Enabled,
861 GICXXPred_Simple_IsRule25Enabled,
862 GICXXPred_Simple_IsRule26Enabled,
863 GICXXPred_Simple_IsRule27Enabled,
864 GICXXPred_Simple_IsRule28Enabled,
865 GICXXPred_Simple_IsRule29Enabled,
866 GICXXPred_Simple_IsRule30Enabled,
867 GICXXPred_Simple_IsRule31Enabled,
868 GICXXPred_Simple_IsRule32Enabled,
869 GICXXPred_Simple_IsRule33Enabled,
870 GICXXPred_Simple_IsRule34Enabled,
871 GICXXPred_Simple_IsRule35Enabled,
872 GICXXPred_Simple_IsRule36Enabled,
873 GICXXPred_Simple_IsRule37Enabled,
874 GICXXPred_Simple_IsRule38Enabled,
875 GICXXPred_Simple_IsRule39Enabled,
876 GICXXPred_Simple_IsRule40Enabled,
877 GICXXPred_Simple_IsRule41Enabled,
878 GICXXPred_Simple_IsRule42Enabled,
879 GICXXPred_Simple_IsRule43Enabled,
880 GICXXPred_Simple_IsRule44Enabled,
881 GICXXPred_Simple_IsRule45Enabled,
882 GICXXPred_Simple_IsRule46Enabled,
883 GICXXPred_Simple_IsRule47Enabled,
884 GICXXPred_Simple_IsRule48Enabled,
885 GICXXPred_Simple_IsRule49Enabled,
886 GICXXPred_Simple_IsRule50Enabled,
887 GICXXPred_Simple_IsRule51Enabled,
888 GICXXPred_Simple_IsRule52Enabled,
889 GICXXPred_Simple_IsRule53Enabled,
890 GICXXPred_Simple_IsRule54Enabled,
891 GICXXPred_Simple_IsRule55Enabled,
892 GICXXPred_Simple_IsRule56Enabled,
893 GICXXPred_Simple_IsRule57Enabled,
894 GICXXPred_Simple_IsRule58Enabled,
895 GICXXPred_Simple_IsRule59Enabled,
896 GICXXPred_Simple_IsRule60Enabled,
897 GICXXPred_Simple_IsRule61Enabled,
898 GICXXPred_Simple_IsRule62Enabled,
899 GICXXPred_Simple_IsRule63Enabled,
900 GICXXPred_Simple_IsRule64Enabled,
901 GICXXPred_Simple_IsRule65Enabled,
902 GICXXPred_Simple_IsRule66Enabled,
903 GICXXPred_Simple_IsRule67Enabled,
904 GICXXPred_Simple_IsRule68Enabled,
905 GICXXPred_Simple_IsRule69Enabled,
906 GICXXPred_Simple_IsRule70Enabled,
907 GICXXPred_Simple_IsRule71Enabled,
908 GICXXPred_Simple_IsRule72Enabled,
909 GICXXPred_Simple_IsRule73Enabled,
910 GICXXPred_Simple_IsRule74Enabled,
911 GICXXPred_Simple_IsRule75Enabled,
912 GICXXPred_Simple_IsRule76Enabled,
913 GICXXPred_Simple_IsRule77Enabled,
914 GICXXPred_Simple_IsRule78Enabled,
915};
916
917bool X86PreLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
918 return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
919}
920// Custom renderers.
921enum {
922 GICR_Invalid,
923};
924X86PreLegalizerCombinerImpl::CustomRendererFn
925X86PreLegalizerCombinerImpl::CustomRenderers[] = {
926 nullptr, // GICR_Invalid
927};
928
929bool X86PreLegalizerCombinerImpl::canMatchOpcode(unsigned Opc) const {
930 switch (Opc) {
931 case TargetOpcode::G_SADDE:
932 case TargetOpcode::G_SSUBE:
933 case TargetOpcode::G_UADDE:
934 case TargetOpcode::G_USUBE:
935 case TargetOpcode::G_INSERT_VECTOR_ELT:
936 case TargetOpcode::G_SELECT:
937 case TargetOpcode::G_SHUFFLE_VECTOR:
938 case TargetOpcode::G_SMULO:
939 case TargetOpcode::G_UMULO:
940 case TargetOpcode::G_FADD:
941 case TargetOpcode::G_ADD:
942 case TargetOpcode::G_ASHR:
943 case TargetOpcode::G_EXTRACT_VECTOR_ELT:
944 case TargetOpcode::G_FMAXIMUM:
945 case TargetOpcode::G_FMAXNUM:
946 case TargetOpcode::G_FMINIMUM:
947 case TargetOpcode::G_FMINNUM:
948 case TargetOpcode::G_FMUL:
949 case TargetOpcode::G_LSHR:
950 case TargetOpcode::G_MUL:
951 case TargetOpcode::G_SDIV:
952 case TargetOpcode::G_SHL:
953 case TargetOpcode::G_SREM:
954 case TargetOpcode::G_UDIV:
955 case TargetOpcode::G_UREM:
956 case TargetOpcode::G_AND:
957 case TargetOpcode::G_FPOWI:
958 case TargetOpcode::G_OR:
959 case TargetOpcode::G_PTR_ADD:
960 case TargetOpcode::G_ROTL:
961 case TargetOpcode::G_ROTR:
962 case TargetOpcode::G_SUB:
963 case TargetOpcode::G_XOR:
964 case TargetOpcode::G_BUILD_VECTOR:
965 case TargetOpcode::G_BITCAST:
966 case TargetOpcode::G_BUILD_VECTOR_TRUNC:
967 case TargetOpcode::G_FPTRUNC:
968 case TargetOpcode::G_INTTOPTR:
969 case TargetOpcode::G_PTRTOINT:
970 case TargetOpcode::G_STORE:
971 case TargetOpcode::COPY:
972 case TargetOpcode::G_ABS:
973 case TargetOpcode::G_ANYEXT:
974 case TargetOpcode::G_FABS:
975 case TargetOpcode::G_FCANONICALIZE:
976 case TargetOpcode::G_FCEIL:
977 case TargetOpcode::G_FFLOOR:
978 case TargetOpcode::G_FLOG2:
979 case TargetOpcode::G_FNEARBYINT:
980 case TargetOpcode::G_FNEG:
981 case TargetOpcode::G_FPEXT:
982 case TargetOpcode::G_FPTOSI:
983 case TargetOpcode::G_FPTOUI:
984 case TargetOpcode::G_FREEZE:
985 case TargetOpcode::G_FRINT:
986 case TargetOpcode::G_FSQRT:
987 case TargetOpcode::G_INTRINSIC_ROUND:
988 case TargetOpcode::G_INTRINSIC_ROUNDEVEN:
989 case TargetOpcode::G_INTRINSIC_TRUNC:
990 case TargetOpcode::G_SITOFP:
991 case TargetOpcode::G_TRUNC:
992 case TargetOpcode::G_UITOFP:
993 return true;
994 default:
995 return false;
996 }
997}
998
999uint32_t X86PreLegalizerCombinerImpl::getRootFlagsToDrop() const {
1000 return MachineInstr::getPoisonGeneratingFlags();
1001}
1002
1003bool X86PreLegalizerCombinerImpl::tryCombineAllImpl(MachineInstr &I) const {
1004 const PredicateBitset AvailableFeatures = getAvailableFeatures();
1005 State.MIs.clear();
1006 State.MIs.push_back(&I);
1007 if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), Helper.getTII(), MRI, Helper.getTRI(), Helper.getRBI(), AvailableFeatures, /*CoverageInfo*/ nullptr)) {
1008 return true;
1009 }
1010
1011 return false;
1012}
1013
1014enum {
1015 GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
1016 GICXXCustomAction_GICombiner1,
1017 GICXXCustomAction_GICombiner2,
1018 GICXXCustomAction_GICombiner3,
1019 GICXXCustomAction_GICombiner4,
1020 GICXXCustomAction_GICombiner5,
1021 GICXXCustomAction_GICombiner6,
1022 GICXXCustomAction_GICombiner7,
1023 GICXXCustomAction_GICombiner8,
1024 GICXXCustomAction_GICombiner9,
1025 GICXXCustomAction_GICombiner10,
1026 GICXXCustomAction_GICombiner11,
1027 GICXXCustomAction_GICombiner12,
1028 GICXXCustomAction_GICombiner13,
1029 GICXXCustomAction_GICombiner14,
1030 GICXXCustomAction_GICombiner15,
1031 GICXXCustomAction_GICombiner16,
1032};
1033bool X86PreLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
1034 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
1035 switch(ApplyID) {
1036 case GICXXCustomAction_GICombiner0:{
1037 Register GIMatchData_matchinfo;
1038 // Match Patterns
1039 if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) {
1040 return false;
1041 }
1042 // Apply Patterns
1043 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1044 return true;
1045 }
1046 case GICXXCustomAction_GICombiner1:{
1047 Register GIMatchData_matchinfo;
1048 // Match Patterns
1049 if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
1050 return false;
1051 }
1052 // Apply Patterns
1053 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1054 return true;
1055 }
1056 case GICXXCustomAction_GICombiner2:{
1057 Register GIMatchData_matchinfo;
1058 // Match Patterns
1059 if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
1060 return false;
1061 }
1062 // Apply Patterns
1063 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1064 return true;
1065 }
1066 case GICXXCustomAction_GICombiner3:{
1067 Register GIMatchData_matchinfo;
1068 // Match Patterns
1069 if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
1070 return false;
1071 }
1072 // Apply Patterns
1073 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
1074 return true;
1075 }
1076 case GICXXCustomAction_GICombiner4:{
1077 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1078 // Match Patterns
1079 if(![&](){return Helper.matchReassocPtrAdd(*State.MIs[0], GIMatchData_matchinfo);}()) {
1080 return false;
1081 }
1082 // Apply Patterns
1083 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
1084 return true;
1085 }
1086 case GICXXCustomAction_GICombiner5:{
1087 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1088 // Match Patterns
1089 if(![&](){return Helper.matchReassocCommBinOp(*State.MIs[0], GIMatchData_matchinfo);}()) {
1090 return false;
1091 }
1092 // Apply Patterns
1093 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1094 return true;
1095 }
1096 case GICXXCustomAction_GICombiner6:{
1097 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1098 // Match Patterns
1099 if(![&](){return Helper.matchConstantFoldFPUnary(*State.MIs[0], GIMatchData_matchinfo);}()) {
1100 return false;
1101 }
1102 // Apply Patterns
1103 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1104 return true;
1105 }
1106 case GICXXCustomAction_GICombiner7:{
1107 // Apply Patterns
1108 Helper.replaceInstWithFConstant(*State.MIs[0]->getOperand(0).getParent(), 0.0);
1109 return true;
1110 }
1111 case GICXXCustomAction_GICombiner8:{
1112 APInt GIMatchData_info;
1113 // Match Patterns
1114 if(![&](){LLT DstTy = MRI.getType(State.MIs[0]->getOperand(0).getReg());
1115 APInt NewCst = State.MIs[2]->getOperand(1).getCImm()->getValue().zextOrTrunc(
1116 DstTy.getSizeInBits());
1117 NewCst += State.MIs[3]->getOperand(1).getCImm()->getValue().sextOrTrunc(
1118 DstTy.getSizeInBits());
1119 GIMatchData_info = NewCst;
1120 return true;}()) {
1121 return false;
1122 }
1123 // Apply Patterns
1124 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
1125 Helper.getBuilder().buildConstant(State.MIs[0]->getOperand(0), GIMatchData_info);
1126 State.MIs[0]->eraseFromParent();
1127 return true;
1128 }
1129 case GICXXCustomAction_GICombiner9:{
1130 std::function<void(MachineIRBuilder &)> GIMatchData_info;
1131 // Match Patterns
1132 if(![&](){return Helper.matchOverlappingAnd(*State.MIs[0], GIMatchData_info);}()) {
1133 return false;
1134 }
1135 // Apply Patterns
1136 Helper.applyBuildFn(*State.MIs[0], GIMatchData_info);
1137 return true;
1138 }
1139 case GICXXCustomAction_GICombiner10:{
1140 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1141 // Match Patterns
1142 if(![&](){return Helper.matchMulOBy0(*State.MIs[0], GIMatchData_matchinfo);}()) {
1143 return false;
1144 }
1145 // Apply Patterns
1146 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1147 return true;
1148 }
1149 case GICXXCustomAction_GICombiner11:{
1150 // Match Patterns
1151 if(![&](){return Helper.matchFPowIExpansion(*State.MIs[0], State.MIs[1]->getOperand(1).getCImm()->getSExtValue());}()) {
1152 return false;
1153 }
1154 // Apply Patterns
1155 Helper.applyExpandFPowI(*State.MIs[0], State.MIs[1]->getOperand(1).getCImm()->getSExtValue());
1156 return true;
1157 }
1158 case GICXXCustomAction_GICombiner12:{
1159 // Apply Patterns
1160 Helper.replaceInstWithConstant(*State.MIs[0]->getOperand(0).getParent(), 0);
1161 return true;
1162 }
1163 case GICXXCustomAction_GICombiner13:{
1164 // Apply Patterns
1165 Helper.replaceInstWithConstant(*State.MIs[0]->getOperand(0).getParent(), -1);
1166 return true;
1167 }
1168 case GICXXCustomAction_GICombiner14:{
1169 // Match Patterns
1170 if(![&](){return Helper.matchCombineCopy(*State.MIs[0]);}()) {
1171 return false;
1172 }
1173 // Apply Patterns
1174 Helper.applyCombineCopy(*State.MIs[0]);
1175 return true;
1176 }
1177 case GICXXCustomAction_GICombiner15:{
1178 unsigned GIMatchData_matchinfo;
1179 // Match Patterns
1180 if(![&](){return Helper.matchCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);}()) {
1181 return false;
1182 }
1183 // Apply Patterns
1184 Helper.applyCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);
1185 return true;
1186 }
1187 case GICXXCustomAction_GICombiner16:{
1188 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1189 // Match Patterns
1190 if(![&](){return Helper.matchCombineSubToAdd(*State.MIs[0], GIMatchData_matchinfo);}()) {
1191 return false;
1192 }
1193 // Apply Patterns
1194 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
1195 return true;
1196 }
1197 }
1198 llvm_unreachable("Unknown Apply Action");
1199}
1200#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
1201#define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8)
1202#define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24)
1203#define GIMT_Encode8(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24), uint8_t(uint64_t(Val) >> 32), uint8_t(uint64_t(Val) >> 40), uint8_t(uint64_t(Val) >> 48), uint8_t(uint64_t(Val) >> 56)
1204#else
1205#define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val)
1206#define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
1207#define GIMT_Encode8(Val) uint8_t(uint64_t(Val) >> 56), uint8_t(uint64_t(Val) >> 48), uint8_t(uint64_t(Val) >> 40), uint8_t(uint64_t(Val) >> 32), uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
1208#endif
1209const uint8_t *X86PreLegalizerCombinerImpl::getMatchTable() const {
1210 constexpr static uint8_t MatchTable0[] = {
1211 /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(21), GIMT_Encode2(288), /*)*//*default:*//*Label 62*/ GIMT_Encode4(4018),
1212 /* 10 */ /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(1078), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1213 /* 150 */ /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(1090),
1214 /* 154 */ /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(1449),
1215 /* 158 */ /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(1581),
1216 /* 162 */ /*TargetOpcode::G_SDIV*//*Label 4*/ GIMT_Encode4(1744),
1217 /* 166 */ /*TargetOpcode::G_UDIV*//*Label 5*/ GIMT_Encode4(1768),
1218 /* 170 */ /*TargetOpcode::G_SREM*//*Label 6*/ GIMT_Encode4(1813),
1219 /* 174 */ /*TargetOpcode::G_UREM*//*Label 7*/ GIMT_Encode4(1837), GIMT_Encode4(0), GIMT_Encode4(0),
1220 /* 186 */ /*TargetOpcode::G_AND*//*Label 8*/ GIMT_Encode4(1882),
1221 /* 190 */ /*TargetOpcode::G_OR*//*Label 9*/ GIMT_Encode4(1960),
1222 /* 194 */ /*TargetOpcode::G_XOR*//*Label 10*/ GIMT_Encode4(2050), 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),
1223 /* 262 */ /*TargetOpcode::G_BUILD_VECTOR*//*Label 11*/ GIMT_Encode4(2161),
1224 /* 266 */ /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 12*/ GIMT_Encode4(2200), GIMT_Encode4(0),
1225 /* 274 */ /*TargetOpcode::G_PTRTOINT*//*Label 13*/ GIMT_Encode4(2215),
1226 /* 278 */ /*TargetOpcode::G_INTTOPTR*//*Label 14*/ GIMT_Encode4(2336),
1227 /* 282 */ /*TargetOpcode::G_BITCAST*//*Label 15*/ GIMT_Encode4(2394),
1228 /* 286 */ /*TargetOpcode::G_FREEZE*//*Label 16*/ GIMT_Encode4(2484), GIMT_Encode4(0), GIMT_Encode4(0),
1229 /* 298 */ /*TargetOpcode::G_INTRINSIC_TRUNC*//*Label 17*/ GIMT_Encode4(2514),
1230 /* 302 */ /*TargetOpcode::G_INTRINSIC_ROUND*//*Label 18*/ GIMT_Encode4(2526), GIMT_Encode4(0), GIMT_Encode4(0),
1231 /* 314 */ /*TargetOpcode::G_INTRINSIC_ROUNDEVEN*//*Label 19*/ GIMT_Encode4(2538), 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),
1232 /* 354 */ /*TargetOpcode::G_STORE*//*Label 20*/ GIMT_Encode4(2550), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1233 /* 502 */ /*TargetOpcode::G_ANYEXT*//*Label 21*/ GIMT_Encode4(2574),
1234 /* 506 */ /*TargetOpcode::G_TRUNC*//*Label 22*/ GIMT_Encode4(2610), 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),
1235 /* 550 */ /*TargetOpcode::G_SHL*//*Label 23*/ GIMT_Encode4(2657),
1236 /* 554 */ /*TargetOpcode::G_LSHR*//*Label 24*/ GIMT_Encode4(2749),
1237 /* 558 */ /*TargetOpcode::G_ASHR*//*Label 25*/ GIMT_Encode4(2820), GIMT_Encode4(0), GIMT_Encode4(0),
1238 /* 570 */ /*TargetOpcode::G_ROTR*//*Label 26*/ GIMT_Encode4(2891),
1239 /* 574 */ /*TargetOpcode::G_ROTL*//*Label 27*/ GIMT_Encode4(2915), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1240 /* 594 */ /*TargetOpcode::G_SELECT*//*Label 28*/ GIMT_Encode4(2939), GIMT_Encode4(0),
1241 /* 602 */ /*TargetOpcode::G_UADDE*//*Label 29*/ GIMT_Encode4(2987), GIMT_Encode4(0),
1242 /* 610 */ /*TargetOpcode::G_USUBE*//*Label 30*/ GIMT_Encode4(3015), GIMT_Encode4(0),
1243 /* 618 */ /*TargetOpcode::G_SADDE*//*Label 31*/ GIMT_Encode4(3043), GIMT_Encode4(0),
1244 /* 626 */ /*TargetOpcode::G_SSUBE*//*Label 32*/ GIMT_Encode4(3071),
1245 /* 630 */ /*TargetOpcode::G_UMULO*//*Label 33*/ GIMT_Encode4(3099),
1246 /* 634 */ /*TargetOpcode::G_SMULO*//*Label 34*/ GIMT_Encode4(3138), 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),
1247 /* 702 */ /*TargetOpcode::G_FADD*//*Label 35*/ GIMT_Encode4(3177), GIMT_Encode4(0),
1248 /* 710 */ /*TargetOpcode::G_FMUL*//*Label 36*/ GIMT_Encode4(3230), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1249 /* 738 */ /*TargetOpcode::G_FPOWI*//*Label 37*/ GIMT_Encode4(3274), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1250 /* 758 */ /*TargetOpcode::G_FLOG2*//*Label 38*/ GIMT_Encode4(3296), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1251 /* 774 */ /*TargetOpcode::G_FNEG*//*Label 39*/ GIMT_Encode4(3308),
1252 /* 778 */ /*TargetOpcode::G_FPEXT*//*Label 40*/ GIMT_Encode4(3349),
1253 /* 782 */ /*TargetOpcode::G_FPTRUNC*//*Label 41*/ GIMT_Encode4(3361),
1254 /* 786 */ /*TargetOpcode::G_FPTOSI*//*Label 42*/ GIMT_Encode4(3406),
1255 /* 790 */ /*TargetOpcode::G_FPTOUI*//*Label 43*/ GIMT_Encode4(3431),
1256 /* 794 */ /*TargetOpcode::G_SITOFP*//*Label 44*/ GIMT_Encode4(3456),
1257 /* 798 */ /*TargetOpcode::G_UITOFP*//*Label 45*/ GIMT_Encode4(3493), GIMT_Encode4(0), GIMT_Encode4(0),
1258 /* 810 */ /*TargetOpcode::G_FABS*//*Label 46*/ GIMT_Encode4(3530), GIMT_Encode4(0), GIMT_Encode4(0),
1259 /* 822 */ /*TargetOpcode::G_FCANONICALIZE*//*Label 47*/ GIMT_Encode4(3571),
1260 /* 826 */ /*TargetOpcode::G_FMINNUM*//*Label 48*/ GIMT_Encode4(3601),
1261 /* 830 */ /*TargetOpcode::G_FMAXNUM*//*Label 49*/ GIMT_Encode4(3648), GIMT_Encode4(0), GIMT_Encode4(0),
1262 /* 842 */ /*TargetOpcode::G_FMINIMUM*//*Label 50*/ GIMT_Encode4(3695),
1263 /* 846 */ /*TargetOpcode::G_FMAXIMUM*//*Label 51*/ GIMT_Encode4(3742), 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),
1264 /* 890 */ /*TargetOpcode::G_PTR_ADD*//*Label 52*/ GIMT_Encode4(3789), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1265 /* 914 */ /*TargetOpcode::G_ABS*//*Label 53*/ GIMT_Encode4(3861), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1266 /* 946 */ /*TargetOpcode::G_INSERT_VECTOR_ELT*//*Label 54*/ GIMT_Encode4(3883),
1267 /* 950 */ /*TargetOpcode::G_EXTRACT_VECTOR_ELT*//*Label 55*/ GIMT_Encode4(3902),
1268 /* 954 */ /*TargetOpcode::G_SHUFFLE_VECTOR*//*Label 56*/ GIMT_Encode4(3921), 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),
1269 /* 1014 */ /*TargetOpcode::G_FCEIL*//*Label 57*/ GIMT_Encode4(3958), 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),
1270 /* 1062 */ /*TargetOpcode::G_FSQRT*//*Label 58*/ GIMT_Encode4(3970),
1271 /* 1066 */ /*TargetOpcode::G_FFLOOR*//*Label 59*/ GIMT_Encode4(3982),
1272 /* 1070 */ /*TargetOpcode::G_FRINT*//*Label 60*/ GIMT_Encode4(3994),
1273 /* 1074 */ /*TargetOpcode::G_FNEARBYINT*//*Label 61*/ GIMT_Encode4(4006),
1274 /* 1078 */ // Label 0: @1078
1275 /* 1078 */ GIM_Try, /*On fail goto*//*Label 63*/ GIMT_Encode4(1089), // Rule ID 115 //
1276 /* 1083 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule72Enabled),
1277 /* 1086 */ // MIs[0] d
1278 /* 1086 */ // No operand predicates
1279 /* 1086 */ // MIs[0] s
1280 /* 1086 */ // No operand predicates
1281 /* 1086 */ // Combiner Rule #72: copy_prop
1282 /* 1086 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1283 /* 1089 */ // Label 63: @1089
1284 /* 1089 */ GIM_Reject,
1285 /* 1090 */ // Label 1: @1090
1286 /* 1090 */ GIM_Try, /*On fail goto*//*Label 64*/ GIMT_Encode4(1145), // Rule ID 118 //
1287 /* 1095 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule75Enabled),
1288 /* 1098 */ // MIs[0] dst
1289 /* 1098 */ // No operand predicates
1290 /* 1098 */ // MIs[0] __add_p2i_to_ptradd_match_0.x
1291 /* 1098 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1292 /* 1102 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_PTRTOINT),
1293 /* 1106 */ // MIs[1] ptr
1294 /* 1106 */ GIM_RecordRegType, /*MI*/1, /*Op*/1, /*TempTypeIdx*/255,
1295 /* 1110 */ // MIs[0] other
1296 /* 1110 */ // No operand predicates
1297 /* 1110 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner19),
1298 /* 1114 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1299 /* 1116 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1300 /* 1119 */ // Combiner Rule #75: add_p2i_to_ptradd @ [__add_p2i_to_ptradd_match_0[0]]
1301 /* 1119 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_PTR_ADD),
1302 /* 1122 */ GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(static_cast<uint16_t>(RegState::Define)),
1303 /* 1127 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1304 /* 1131 */ GIR_RootToRootCopy, /*OpIdx*/2, // other
1305 /* 1133 */ GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_PTRTOINT),
1306 /* 1137 */ GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // dst
1307 /* 1141 */ GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0,
1308 /* 1144 */ GIR_EraseRootFromParent_Done,
1309 /* 1145 */ // Label 64: @1145
1310 /* 1145 */ GIM_Try, /*On fail goto*//*Label 65*/ GIMT_Encode4(1200), // Rule ID 119 //
1311 /* 1150 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule75Enabled),
1312 /* 1153 */ // MIs[0] dst
1313 /* 1153 */ // No operand predicates
1314 /* 1153 */ // MIs[0] other
1315 /* 1153 */ // No operand predicates
1316 /* 1153 */ // MIs[0] __add_p2i_to_ptradd_match_0.x
1317 /* 1153 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1318 /* 1157 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_PTRTOINT),
1319 /* 1161 */ // MIs[1] ptr
1320 /* 1161 */ GIM_RecordRegType, /*MI*/1, /*Op*/1, /*TempTypeIdx*/255,
1321 /* 1165 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner19),
1322 /* 1169 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1323 /* 1171 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1324 /* 1174 */ // Combiner Rule #75: add_p2i_to_ptradd @ [__add_p2i_to_ptradd_match_0[1]]
1325 /* 1174 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_PTR_ADD),
1326 /* 1177 */ GIR_AddTempRegister, /*InsnID*/0, /*TempRegID*/0, /*TempRegFlags*/GIMT_Encode2(static_cast<uint16_t>(RegState::Define)),
1327 /* 1182 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1328 /* 1186 */ GIR_RootToRootCopy, /*OpIdx*/1, // other
1329 /* 1188 */ GIR_BuildMI, /*InsnID*/1, /*Opcode*/GIMT_Encode2(TargetOpcode::G_PTRTOINT),
1330 /* 1192 */ GIR_Copy, /*NewInsnID*/1, /*OldInsnID*/0, /*OpIdx*/0, // dst
1331 /* 1196 */ GIR_AddSimpleTempRegister, /*InsnID*/1, /*TempRegID*/0,
1332 /* 1199 */ GIR_EraseRootFromParent_Done,
1333 /* 1200 */ // Label 65: @1200
1334 /* 1200 */ GIM_Try, /*On fail goto*//*Label 66*/ GIMT_Encode4(1249), // Rule ID 124 //
1335 /* 1205 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule78Enabled),
1336 /* 1208 */ // MIs[0] dst
1337 /* 1208 */ // No operand predicates
1338 /* 1208 */ // MIs[0] __simplify_add_to_sub_match_0.neg
1339 /* 1208 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1340 /* 1212 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
1341 /* 1216 */ // MIs[1] __simplify_add_to_sub_match_0.zero
1342 /* 1216 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2]
1343 /* 1220 */ GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1344 /* 1224 */ // MIs[2] Operand 1
1345 /* 1224 */ GIM_CheckLiteralInt, /*MI*/2, /*Op*/1, GIMT_Encode8(0),
1346 /* 1235 */ // MIs[1] newrhs
1347 /* 1235 */ // No operand predicates
1348 /* 1235 */ // MIs[0] newlhs
1349 /* 1235 */ // No operand predicates
1350 /* 1235 */ GIM_CheckIsSafeToFold, /*NumInsns*/2,
1351 /* 1237 */ // Combiner Rule #78: simplify_add_to_sub @ [__simplify_add_to_sub_match_0[0]]
1352 /* 1237 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
1353 /* 1240 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1354 /* 1242 */ GIR_RootToRootCopy, /*OpIdx*/2, // newlhs
1355 /* 1244 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // newrhs
1356 /* 1248 */ GIR_EraseRootFromParent_Done,
1357 /* 1249 */ // Label 66: @1249
1358 /* 1249 */ GIM_Try, /*On fail goto*//*Label 67*/ GIMT_Encode4(1283), // Rule ID 34 //
1359 /* 1254 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
1360 /* 1257 */ // MIs[0] dst
1361 /* 1257 */ // No operand predicates
1362 /* 1257 */ // MIs[0] __add_sub_reg_match_0.tmp
1363 /* 1257 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1364 /* 1261 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
1365 /* 1265 */ // MIs[1] src
1366 /* 1265 */ // No operand predicates
1367 /* 1265 */ // MIs[1] __add_sub_reg_match_0.x
1368 /* 1265 */ // No operand predicates
1369 /* 1265 */ // MIs[0] __add_sub_reg_match_0.x
1370 /* 1265 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
1371 /* 1270 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1372 /* 1275 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1373 /* 1277 */ // Combiner Rule #15: add_sub_reg @ [__add_sub_reg_match_0[1]]
1374 /* 1277 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1375 /* 1282 */ GIR_EraseRootFromParent_Done,
1376 /* 1283 */ // Label 67: @1283
1377 /* 1283 */ GIM_Try, /*On fail goto*//*Label 68*/ GIMT_Encode4(1307), // Rule ID 103 //
1378 /* 1288 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
1379 /* 1291 */ // MIs[0] dst
1380 /* 1291 */ // No operand predicates
1381 /* 1291 */ // MIs[0] __propagate_undef_any_op_match_0.x
1382 /* 1291 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1383 /* 1295 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1384 /* 1299 */ // MIs[0] __propagate_undef_any_op_match_0.y
1385 /* 1299 */ // No operand predicates
1386 /* 1299 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1387 /* 1301 */ // Combiner Rule #65: propagate_undef_any_op @ [__propagate_undef_any_op_match_0[0]]
1388 /* 1301 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1389 /* 1304 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1390 /* 1306 */ GIR_EraseRootFromParent_Done,
1391 /* 1307 */ // Label 68: @1307
1392 /* 1307 */ GIM_Try, /*On fail goto*//*Label 69*/ GIMT_Encode4(1356), // Rule ID 125 //
1393 /* 1312 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule78Enabled),
1394 /* 1315 */ // MIs[0] dst
1395 /* 1315 */ // No operand predicates
1396 /* 1315 */ // MIs[0] newlhs
1397 /* 1315 */ // No operand predicates
1398 /* 1315 */ // MIs[0] __simplify_add_to_sub_match_0.neg
1399 /* 1315 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1400 /* 1319 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
1401 /* 1323 */ // MIs[1] __simplify_add_to_sub_match_0.zero
1402 /* 1323 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2]
1403 /* 1327 */ GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1404 /* 1331 */ // MIs[2] Operand 1
1405 /* 1331 */ GIM_CheckLiteralInt, /*MI*/2, /*Op*/1, GIMT_Encode8(0),
1406 /* 1342 */ // MIs[1] newrhs
1407 /* 1342 */ // No operand predicates
1408 /* 1342 */ GIM_CheckIsSafeToFold, /*NumInsns*/2,
1409 /* 1344 */ // Combiner Rule #78: simplify_add_to_sub @ [__simplify_add_to_sub_match_0[1]]
1410 /* 1344 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
1411 /* 1347 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1412 /* 1349 */ GIR_RootToRootCopy, /*OpIdx*/1, // newlhs
1413 /* 1351 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // newrhs
1414 /* 1355 */ GIR_EraseRootFromParent_Done,
1415 /* 1356 */ // Label 69: @1356
1416 /* 1356 */ GIM_Try, /*On fail goto*//*Label 70*/ GIMT_Encode4(1390), // Rule ID 33 //
1417 /* 1361 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
1418 /* 1364 */ // MIs[0] dst
1419 /* 1364 */ // No operand predicates
1420 /* 1364 */ // MIs[0] __add_sub_reg_match_0.x
1421 /* 1364 */ // No operand predicates
1422 /* 1364 */ // MIs[0] __add_sub_reg_match_0.tmp
1423 /* 1364 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1424 /* 1368 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
1425 /* 1372 */ // MIs[1] src
1426 /* 1372 */ // No operand predicates
1427 /* 1372 */ // MIs[1] __add_sub_reg_match_0.x
1428 /* 1372 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1429 /* 1377 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1430 /* 1382 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1431 /* 1384 */ // Combiner Rule #15: add_sub_reg @ [__add_sub_reg_match_0[0]]
1432 /* 1384 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1433 /* 1389 */ GIR_EraseRootFromParent_Done,
1434 /* 1390 */ // Label 70: @1390
1435 /* 1390 */ GIM_Try, /*On fail goto*//*Label 71*/ GIMT_Encode4(1414), // Rule ID 106 //
1436 /* 1395 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
1437 /* 1398 */ // MIs[0] dst
1438 /* 1398 */ // No operand predicates
1439 /* 1398 */ // MIs[0] __propagate_undef_any_op_match_0.x
1440 /* 1398 */ // No operand predicates
1441 /* 1398 */ // MIs[0] __propagate_undef_any_op_match_0.y
1442 /* 1398 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1443 /* 1402 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1444 /* 1406 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1445 /* 1408 */ // Combiner Rule #65: propagate_undef_any_op @ [__propagate_undef_any_op_match_0[3]]
1446 /* 1408 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1447 /* 1411 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1448 /* 1413 */ GIR_EraseRootFromParent_Done,
1449 /* 1414 */ // Label 71: @1414
1450 /* 1414 */ GIM_Try, /*On fail goto*//*Label 72*/ GIMT_Encode4(1437), // Rule ID 3 //
1451 /* 1419 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1452 /* 1422 */ // MIs[0] dst
1453 /* 1422 */ // No operand predicates
1454 /* 1422 */ // MIs[0] lhs
1455 /* 1422 */ // No operand predicates
1456 /* 1422 */ // MIs[0] Operand 2
1457 /* 1422 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1458 /* 1426 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1459 /* 1431 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[1]]
1460 /* 1431 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1461 /* 1436 */ GIR_EraseRootFromParent_Done,
1462 /* 1437 */ // Label 72: @1437
1463 /* 1437 */ GIM_Try, /*On fail goto*//*Label 73*/ GIMT_Encode4(1448), // Rule ID 46 //
1464 /* 1442 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1465 /* 1445 */ // MIs[0] root
1466 /* 1445 */ // No operand predicates
1467 /* 1445 */ // MIs[0] src1
1468 /* 1445 */ // No operand predicates
1469 /* 1445 */ // MIs[0] src2
1470 /* 1445 */ // No operand predicates
1471 /* 1445 */ // Combiner Rule #27: reassoc_comm_binops
1472 /* 1445 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
1473 /* 1448 */ // Label 73: @1448
1474 /* 1448 */ GIM_Reject,
1475 /* 1449 */ // Label 2: @1449
1476 /* 1449 */ GIM_Try, /*On fail goto*//*Label 74*/ GIMT_Encode4(1473), // Rule ID 104 //
1477 /* 1454 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
1478 /* 1457 */ // MIs[0] dst
1479 /* 1457 */ // No operand predicates
1480 /* 1457 */ // MIs[0] __propagate_undef_any_op_match_0.x
1481 /* 1457 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1482 /* 1461 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1483 /* 1465 */ // MIs[0] __propagate_undef_any_op_match_0.y
1484 /* 1465 */ // No operand predicates
1485 /* 1465 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1486 /* 1467 */ // Combiner Rule #65: propagate_undef_any_op @ [__propagate_undef_any_op_match_0[1]]
1487 /* 1467 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1488 /* 1470 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1489 /* 1472 */ GIR_EraseRootFromParent_Done,
1490 /* 1473 */ // Label 74: @1473
1491 /* 1473 */ GIM_Try, /*On fail goto*//*Label 75*/ GIMT_Encode4(1512), // Rule ID 14 //
1492 /* 1478 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
1493 /* 1481 */ // MIs[0] dst
1494 /* 1481 */ // No operand predicates
1495 /* 1481 */ // MIs[0] x
1496 /* 1481 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
1497 /* 1485 */ // MIs[0] x
1498 /* 1485 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1499 /* 1490 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1500 /* 1493 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1501 /* 1503 */ // Combiner Rule #4: same_val_zero @ [__same_val_zero_match_0[0]]
1502 /* 1503 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1503 /* 1506 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1504 /* 1508 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1505 /* 1511 */ GIR_EraseRootFromParent_Done,
1506 /* 1512 */ // Label 75: @1512
1507 /* 1512 */ GIM_Try, /*On fail goto*//*Label 76*/ GIMT_Encode4(1536), // Rule ID 107 //
1508 /* 1517 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
1509 /* 1520 */ // MIs[0] dst
1510 /* 1520 */ // No operand predicates
1511 /* 1520 */ // MIs[0] __propagate_undef_any_op_match_0.x
1512 /* 1520 */ // No operand predicates
1513 /* 1520 */ // MIs[0] __propagate_undef_any_op_match_0.y
1514 /* 1520 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1515 /* 1524 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1516 /* 1528 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1517 /* 1530 */ // Combiner Rule #65: propagate_undef_any_op @ [__propagate_undef_any_op_match_0[4]]
1518 /* 1530 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1519 /* 1533 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1520 /* 1535 */ GIR_EraseRootFromParent_Done,
1521 /* 1536 */ // Label 76: @1536
1522 /* 1536 */ GIM_Try, /*On fail goto*//*Label 77*/ GIMT_Encode4(1559), // Rule ID 2 //
1523 /* 1541 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1524 /* 1544 */ // MIs[0] dst
1525 /* 1544 */ // No operand predicates
1526 /* 1544 */ // MIs[0] lhs
1527 /* 1544 */ // No operand predicates
1528 /* 1544 */ // MIs[0] Operand 2
1529 /* 1544 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1530 /* 1548 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1531 /* 1553 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[0]]
1532 /* 1553 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1533 /* 1558 */ GIR_EraseRootFromParent_Done,
1534 /* 1559 */ // Label 77: @1559
1535 /* 1559 */ GIM_Try, /*On fail goto*//*Label 78*/ GIMT_Encode4(1580), // Rule ID 117 //
1536 /* 1564 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule74Enabled),
1537 /* 1567 */ // MIs[0] d
1538 /* 1567 */ // No operand predicates
1539 /* 1567 */ // MIs[0] op1
1540 /* 1567 */ // No operand predicates
1541 /* 1567 */ // MIs[0] c
1542 /* 1567 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1543 /* 1571 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1544 /* 1575 */ // MIs[1] imm
1545 /* 1575 */ // No operand predicates
1546 /* 1575 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1547 /* 1577 */ // Combiner Rule #74: sub_to_add
1548 /* 1577 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner16),
1549 /* 1580 */ // Label 78: @1580
1550 /* 1580 */ GIM_Reject,
1551 /* 1581 */ // Label 3: @1581
1552 /* 1581 */ GIM_Try, /*On fail goto*//*Label 79*/ GIMT_Encode4(1604), // Rule ID 23 //
1553 /* 1586 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1554 /* 1589 */ // MIs[0] dst
1555 /* 1589 */ // No operand predicates
1556 /* 1589 */ // MIs[0] zero
1557 /* 1589 */ // No operand predicates
1558 /* 1589 */ // MIs[0] rhs
1559 /* 1589 */ // No operand predicates
1560 /* 1589 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1561 /* 1593 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1562 /* 1598 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[7]]
1563 /* 1598 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1564 /* 1603 */ GIR_EraseRootFromParent_Done,
1565 /* 1604 */ // Label 79: @1604
1566 /* 1604 */ GIM_Try, /*On fail goto*//*Label 80*/ GIMT_Encode4(1644), // Rule ID 120 //
1567 /* 1609 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule76Enabled),
1568 /* 1612 */ // MIs[0] dst
1569 /* 1612 */ GIM_RecordRegType, /*MI*/0, /*Op*/0, /*TempTypeIdx*/255,
1570 /* 1616 */ // MIs[0] x
1571 /* 1616 */ // No operand predicates
1572 /* 1616 */ // MIs[0] Operand 2
1573 /* 1616 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 255,
1574 /* 1620 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1575 /* 1623 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1576 /* 1633 */ // Combiner Rule #76: mul_by_neg_one
1577 /* 1633 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB),
1578 /* 1636 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1579 /* 1638 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1580 /* 1641 */ GIR_RootToRootCopy, /*OpIdx*/1, // x
1581 /* 1643 */ GIR_EraseRootFromParent_Done,
1582 /* 1644 */ // Label 80: @1644
1583 /* 1644 */ GIM_Try, /*On fail goto*//*Label 81*/ GIMT_Encode4(1665), // Rule ID 84 //
1584 /* 1649 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
1585 /* 1652 */ // MIs[0] dst
1586 /* 1652 */ // No operand predicates
1587 /* 1652 */ // MIs[0] __undef_to_int_zero_match_0.x
1588 /* 1652 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1589 /* 1656 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1590 /* 1660 */ // MIs[0] __undef_to_int_zero_match_0.y
1591 /* 1660 */ // No operand predicates
1592 /* 1660 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1593 /* 1662 */ // Combiner Rule #59: undef_to_int_zero @ [__undef_to_int_zero_match_0[1]]
1594 /* 1662 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1595 /* 1665 */ // Label 81: @1665
1596 /* 1665 */ GIM_Try, /*On fail goto*//*Label 82*/ GIMT_Encode4(1686), // Rule ID 86 //
1597 /* 1670 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
1598 /* 1673 */ // MIs[0] dst
1599 /* 1673 */ // No operand predicates
1600 /* 1673 */ // MIs[0] __undef_to_int_zero_match_0.x
1601 /* 1673 */ // No operand predicates
1602 /* 1673 */ // MIs[0] __undef_to_int_zero_match_0.y
1603 /* 1673 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1604 /* 1677 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1605 /* 1681 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1606 /* 1683 */ // Combiner Rule #59: undef_to_int_zero @ [__undef_to_int_zero_match_0[3]]
1607 /* 1683 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1608 /* 1686 */ // Label 82: @1686
1609 /* 1686 */ GIM_Try, /*On fail goto*//*Label 83*/ GIMT_Encode4(1709), // Rule ID 24 //
1610 /* 1691 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1611 /* 1694 */ // MIs[0] dst
1612 /* 1694 */ // No operand predicates
1613 /* 1694 */ // MIs[0] lhs
1614 /* 1694 */ // No operand predicates
1615 /* 1694 */ // MIs[0] zero
1616 /* 1694 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1617 /* 1698 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1618 /* 1703 */ // Combiner Rule #6: binop_right_to_zero
1619 /* 1703 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1620 /* 1708 */ GIR_EraseRootFromParent_Done,
1621 /* 1709 */ // Label 83: @1709
1622 /* 1709 */ GIM_Try, /*On fail goto*//*Label 84*/ GIMT_Encode4(1732), // Rule ID 31 //
1623 /* 1714 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
1624 /* 1717 */ // MIs[0] dst
1625 /* 1717 */ // No operand predicates
1626 /* 1717 */ // MIs[0] x
1627 /* 1717 */ // No operand predicates
1628 /* 1717 */ // MIs[0] Operand 2
1629 /* 1717 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1,
1630 /* 1721 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1631 /* 1726 */ // Combiner Rule #13: right_identity_one_int
1632 /* 1726 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1633 /* 1731 */ GIR_EraseRootFromParent_Done,
1634 /* 1732 */ // Label 84: @1732
1635 /* 1732 */ GIM_Try, /*On fail goto*//*Label 85*/ GIMT_Encode4(1743), // Rule ID 116 //
1636 /* 1737 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule73Enabled),
1637 /* 1740 */ // MIs[0] d
1638 /* 1740 */ // No operand predicates
1639 /* 1740 */ // MIs[0] op1
1640 /* 1740 */ // No operand predicates
1641 /* 1740 */ // MIs[0] op2
1642 /* 1740 */ // No operand predicates
1643 /* 1740 */ // Combiner Rule #73: mul_to_shl
1644 /* 1740 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner15),
1645 /* 1743 */ // Label 85: @1743
1646 /* 1743 */ GIM_Reject,
1647 /* 1744 */ // Label 4: @1744
1648 /* 1744 */ GIM_Try, /*On fail goto*//*Label 86*/ GIMT_Encode4(1767), // Rule ID 19 //
1649 /* 1749 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1650 /* 1752 */ // MIs[0] dst
1651 /* 1752 */ // No operand predicates
1652 /* 1752 */ // MIs[0] zero
1653 /* 1752 */ // No operand predicates
1654 /* 1752 */ // MIs[0] rhs
1655 /* 1752 */ // No operand predicates
1656 /* 1752 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1657 /* 1756 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1658 /* 1761 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[3]]
1659 /* 1761 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1660 /* 1766 */ GIR_EraseRootFromParent_Done,
1661 /* 1767 */ // Label 86: @1767
1662 /* 1767 */ GIM_Reject,
1663 /* 1768 */ // Label 5: @1768
1664 /* 1768 */ GIM_Try, /*On fail goto*//*Label 87*/ GIMT_Encode4(1791), // Rule ID 20 //
1665 /* 1773 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1666 /* 1776 */ // MIs[0] dst
1667 /* 1776 */ // No operand predicates
1668 /* 1776 */ // MIs[0] zero
1669 /* 1776 */ // No operand predicates
1670 /* 1776 */ // MIs[0] rhs
1671 /* 1776 */ // No operand predicates
1672 /* 1776 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1673 /* 1780 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1674 /* 1785 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[4]]
1675 /* 1785 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1676 /* 1790 */ GIR_EraseRootFromParent_Done,
1677 /* 1791 */ // Label 87: @1791
1678 /* 1791 */ GIM_Try, /*On fail goto*//*Label 88*/ GIMT_Encode4(1812), // Rule ID 90 //
1679 /* 1796 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled),
1680 /* 1799 */ // MIs[0] dst
1681 /* 1799 */ // No operand predicates
1682 /* 1799 */ // MIs[0] __binop_left_undef_to_zero_match_0.x
1683 /* 1799 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1684 /* 1803 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1685 /* 1807 */ // MIs[0] __binop_left_undef_to_zero_match_0.y
1686 /* 1807 */ // No operand predicates
1687 /* 1807 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1688 /* 1809 */ // Combiner Rule #61: binop_left_undef_to_zero @ [__binop_left_undef_to_zero_match_0[1]]
1689 /* 1809 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1690 /* 1812 */ // Label 88: @1812
1691 /* 1812 */ GIM_Reject,
1692 /* 1813 */ // Label 6: @1813
1693 /* 1813 */ GIM_Try, /*On fail goto*//*Label 89*/ GIMT_Encode4(1836), // Rule ID 21 //
1694 /* 1818 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1695 /* 1821 */ // MIs[0] dst
1696 /* 1821 */ // No operand predicates
1697 /* 1821 */ // MIs[0] zero
1698 /* 1821 */ // No operand predicates
1699 /* 1821 */ // MIs[0] rhs
1700 /* 1821 */ // No operand predicates
1701 /* 1821 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1702 /* 1825 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1703 /* 1830 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[5]]
1704 /* 1830 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1705 /* 1835 */ GIR_EraseRootFromParent_Done,
1706 /* 1836 */ // Label 89: @1836
1707 /* 1836 */ GIM_Reject,
1708 /* 1837 */ // Label 7: @1837
1709 /* 1837 */ GIM_Try, /*On fail goto*//*Label 90*/ GIMT_Encode4(1860), // Rule ID 22 //
1710 /* 1842 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1711 /* 1845 */ // MIs[0] dst
1712 /* 1845 */ // No operand predicates
1713 /* 1845 */ // MIs[0] zero
1714 /* 1845 */ // No operand predicates
1715 /* 1845 */ // MIs[0] rhs
1716 /* 1845 */ // No operand predicates
1717 /* 1845 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1718 /* 1849 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1719 /* 1854 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[6]]
1720 /* 1854 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1721 /* 1859 */ GIR_EraseRootFromParent_Done,
1722 /* 1860 */ // Label 90: @1860
1723 /* 1860 */ GIM_Try, /*On fail goto*//*Label 91*/ GIMT_Encode4(1881), // Rule ID 91 //
1724 /* 1865 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled),
1725 /* 1868 */ // MIs[0] dst
1726 /* 1868 */ // No operand predicates
1727 /* 1868 */ // MIs[0] __binop_left_undef_to_zero_match_0.x
1728 /* 1868 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1729 /* 1872 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1730 /* 1876 */ // MIs[0] __binop_left_undef_to_zero_match_0.y
1731 /* 1876 */ // No operand predicates
1732 /* 1876 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1733 /* 1878 */ // Combiner Rule #61: binop_left_undef_to_zero @ [__binop_left_undef_to_zero_match_0[2]]
1734 /* 1878 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1735 /* 1881 */ // Label 91: @1881
1736 /* 1881 */ GIM_Reject,
1737 /* 1882 */ // Label 8: @1882
1738 /* 1882 */ GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(1903), // Rule ID 83 //
1739 /* 1887 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
1740 /* 1890 */ // MIs[0] dst
1741 /* 1890 */ // No operand predicates
1742 /* 1890 */ // MIs[0] __undef_to_int_zero_match_0.x
1743 /* 1890 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1744 /* 1894 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1745 /* 1898 */ // MIs[0] __undef_to_int_zero_match_0.y
1746 /* 1898 */ // No operand predicates
1747 /* 1898 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1748 /* 1900 */ // Combiner Rule #59: undef_to_int_zero @ [__undef_to_int_zero_match_0[0]]
1749 /* 1900 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1750 /* 1903 */ // Label 92: @1903
1751 /* 1903 */ GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(1927), // Rule ID 12 //
1752 /* 1908 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
1753 /* 1911 */ // MIs[0] dst
1754 /* 1911 */ // No operand predicates
1755 /* 1911 */ // MIs[0] src
1756 /* 1911 */ // No operand predicates
1757 /* 1911 */ // MIs[0] src
1758 /* 1911 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1759 /* 1916 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1760 /* 1921 */ // Combiner Rule #3: binop_same_val @ [__binop_same_val_match_0[0]]
1761 /* 1921 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1762 /* 1926 */ GIR_EraseRootFromParent_Done,
1763 /* 1927 */ // Label 93: @1927
1764 /* 1927 */ GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(1948), // Rule ID 85 //
1765 /* 1932 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
1766 /* 1935 */ // MIs[0] dst
1767 /* 1935 */ // No operand predicates
1768 /* 1935 */ // MIs[0] __undef_to_int_zero_match_0.x
1769 /* 1935 */ // No operand predicates
1770 /* 1935 */ // MIs[0] __undef_to_int_zero_match_0.y
1771 /* 1935 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1772 /* 1939 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1773 /* 1943 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1774 /* 1945 */ // Combiner Rule #59: undef_to_int_zero @ [__undef_to_int_zero_match_0[2]]
1775 /* 1945 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1776 /* 1948 */ // Label 94: @1948
1777 /* 1948 */ GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(1959), // Rule ID 63 //
1778 /* 1953 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled),
1779 /* 1956 */ // MIs[0] dst
1780 /* 1956 */ // No operand predicates
1781 /* 1956 */ // MIs[0] x
1782 /* 1956 */ // No operand predicates
1783 /* 1956 */ // MIs[0] y
1784 /* 1956 */ // No operand predicates
1785 /* 1956 */ // Combiner Rule #44: overlapping_and
1786 /* 1956 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
1787 /* 1959 */ // Label 95: @1959
1788 /* 1959 */ GIM_Reject,
1789 /* 1960 */ // Label 9: @1960
1790 /* 1960 */ GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(1981), // Rule ID 87 //
1791 /* 1965 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled),
1792 /* 1968 */ // MIs[0] dst
1793 /* 1968 */ // No operand predicates
1794 /* 1968 */ // MIs[0] __undef_to_negative_one_match_0.x
1795 /* 1968 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1796 /* 1972 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1797 /* 1976 */ // MIs[0] __undef_to_negative_one_match_0.y
1798 /* 1976 */ // No operand predicates
1799 /* 1976 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1800 /* 1978 */ // Combiner Rule #60: undef_to_negative_one @ [__undef_to_negative_one_match_0[0]]
1801 /* 1978 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1802 /* 1981 */ // Label 96: @1981
1803 /* 1981 */ GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(2005), // Rule ID 13 //
1804 /* 1986 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
1805 /* 1989 */ // MIs[0] dst
1806 /* 1989 */ // No operand predicates
1807 /* 1989 */ // MIs[0] src
1808 /* 1989 */ // No operand predicates
1809 /* 1989 */ // MIs[0] src
1810 /* 1989 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1811 /* 1994 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1812 /* 1999 */ // Combiner Rule #3: binop_same_val @ [__binop_same_val_match_0[1]]
1813 /* 1999 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1814 /* 2004 */ GIR_EraseRootFromParent_Done,
1815 /* 2005 */ // Label 97: @2005
1816 /* 2005 */ GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(2026), // Rule ID 88 //
1817 /* 2010 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled),
1818 /* 2013 */ // MIs[0] dst
1819 /* 2013 */ // No operand predicates
1820 /* 2013 */ // MIs[0] __undef_to_negative_one_match_0.x
1821 /* 2013 */ // No operand predicates
1822 /* 2013 */ // MIs[0] __undef_to_negative_one_match_0.y
1823 /* 2013 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1824 /* 2017 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1825 /* 2021 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1826 /* 2023 */ // Combiner Rule #60: undef_to_negative_one @ [__undef_to_negative_one_match_0[1]]
1827 /* 2023 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1828 /* 2026 */ // Label 98: @2026
1829 /* 2026 */ GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(2049), // Rule ID 4 //
1830 /* 2031 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1831 /* 2034 */ // MIs[0] dst
1832 /* 2034 */ // No operand predicates
1833 /* 2034 */ // MIs[0] lhs
1834 /* 2034 */ // No operand predicates
1835 /* 2034 */ // MIs[0] Operand 2
1836 /* 2034 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1837 /* 2038 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1838 /* 2043 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[2]]
1839 /* 2043 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1840 /* 2048 */ GIR_EraseRootFromParent_Done,
1841 /* 2049 */ // Label 99: @2049
1842 /* 2049 */ GIM_Reject,
1843 /* 2050 */ // Label 10: @2050
1844 /* 2050 */ GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(2074), // Rule ID 105 //
1845 /* 2055 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
1846 /* 2058 */ // MIs[0] dst
1847 /* 2058 */ // No operand predicates
1848 /* 2058 */ // MIs[0] __propagate_undef_any_op_match_0.x
1849 /* 2058 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1850 /* 2062 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1851 /* 2066 */ // MIs[0] __propagate_undef_any_op_match_0.y
1852 /* 2066 */ // No operand predicates
1853 /* 2066 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1854 /* 2068 */ // Combiner Rule #65: propagate_undef_any_op @ [__propagate_undef_any_op_match_0[2]]
1855 /* 2068 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1856 /* 2071 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1857 /* 2073 */ GIR_EraseRootFromParent_Done,
1858 /* 2074 */ // Label 100: @2074
1859 /* 2074 */ GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(2113), // Rule ID 15 //
1860 /* 2079 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
1861 /* 2082 */ // MIs[0] dst
1862 /* 2082 */ // No operand predicates
1863 /* 2082 */ // MIs[0] x
1864 /* 2082 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
1865 /* 2086 */ // MIs[0] x
1866 /* 2086 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1867 /* 2091 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1868 /* 2094 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1869 /* 2104 */ // Combiner Rule #4: same_val_zero @ [__same_val_zero_match_0[1]]
1870 /* 2104 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1871 /* 2107 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1872 /* 2109 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1873 /* 2112 */ GIR_EraseRootFromParent_Done,
1874 /* 2113 */ // Label 101: @2113
1875 /* 2113 */ GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(2137), // Rule ID 108 //
1876 /* 2118 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule65Enabled),
1877 /* 2121 */ // MIs[0] dst
1878 /* 2121 */ // No operand predicates
1879 /* 2121 */ // MIs[0] __propagate_undef_any_op_match_0.x
1880 /* 2121 */ // No operand predicates
1881 /* 2121 */ // MIs[0] __propagate_undef_any_op_match_0.y
1882 /* 2121 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1883 /* 2125 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1884 /* 2129 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1885 /* 2131 */ // Combiner Rule #65: propagate_undef_any_op @ [__propagate_undef_any_op_match_0[5]]
1886 /* 2131 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1887 /* 2134 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1888 /* 2136 */ GIR_EraseRootFromParent_Done,
1889 /* 2137 */ // Label 102: @2137
1890 /* 2137 */ GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(2160), // Rule ID 5 //
1891 /* 2142 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1892 /* 2145 */ // MIs[0] dst
1893 /* 2145 */ // No operand predicates
1894 /* 2145 */ // MIs[0] lhs
1895 /* 2145 */ // No operand predicates
1896 /* 2145 */ // MIs[0] Operand 2
1897 /* 2145 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1898 /* 2149 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1899 /* 2154 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[3]]
1900 /* 2154 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1901 /* 2159 */ GIR_EraseRootFromParent_Done,
1902 /* 2160 */ // Label 103: @2160
1903 /* 2160 */ GIM_Reject,
1904 /* 2161 */ // Label 11: @2161
1905 /* 2161 */ GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(2199),
1906 /* 2166 */ GIM_CheckNumOperandsGE, /*MI*/0, /*Expected*/2,
1907 /* 2169 */ GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(2187), // Rule ID 110 //
1908 /* 2174 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule67Enabled),
1909 /* 2177 */ // MIs[0] root
1910 /* 2177 */ // No operand predicates
1911 /* 2177 */ // MIs[0] srcs
1912 /* 2177 */ // No operand predicates
1913 /* 2177 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner15),
1914 /* 2181 */ // Combiner Rule #67: propagate_undef_all_ops_build_vector
1915 /* 2181 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
1916 /* 2184 */ GIR_RootToRootCopy, /*OpIdx*/0, // root
1917 /* 2186 */ GIR_EraseRootFromParent_Done,
1918 /* 2187 */ // Label 105: @2187
1919 /* 2187 */ GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(2198), // Rule ID 35 //
1920 /* 2192 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
1921 /* 2195 */ // MIs[0] build_vector
1922 /* 2195 */ // No operand predicates
1923 /* 2195 */ // MIs[0] srcs
1924 /* 2195 */ // No operand predicates
1925 /* 2195 */ // Combiner Rule #16: buildvector_identity_fold_bv
1926 /* 2195 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1927 /* 2198 */ // Label 106: @2198
1928 /* 2198 */ GIM_Reject,
1929 /* 2199 */ // Label 104: @2199
1930 /* 2199 */ GIM_Reject,
1931 /* 2200 */ // Label 12: @2200
1932 /* 2200 */ GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(2214), // Rule ID 36 //
1933 /* 2205 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1934 /* 2208 */ GIM_CheckNumOperandsGE, /*MI*/0, /*Expected*/2,
1935 /* 2211 */ // MIs[0] build_vector
1936 /* 2211 */ // No operand predicates
1937 /* 2211 */ // MIs[0] srcs
1938 /* 2211 */ // No operand predicates
1939 /* 2211 */ // Combiner Rule #17: buildvector_identity_fold_bvt
1940 /* 2211 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1941 /* 2214 */ // Label 107: @2214
1942 /* 2214 */ GIM_Reject,
1943 /* 2215 */ // Label 13: @2215
1944 /* 2215 */ GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(2247), // Rule ID 26 //
1945 /* 2220 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1946 /* 2223 */ // MIs[0] dst
1947 /* 2223 */ // No operand predicates
1948 /* 2223 */ // MIs[0] t
1949 /* 2223 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1950 /* 2227 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1951 /* 2231 */ // MIs[1] ptr
1952 /* 2231 */ // No operand predicates
1953 /* 2231 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3),
1954 /* 2235 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1955 /* 2237 */ // Combiner Rule #8: i2p_to_p2i_same_size
1956 /* 2237 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1957 /* 2240 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1958 /* 2242 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1959 /* 2246 */ GIR_EraseRootFromParent_Done,
1960 /* 2247 */ // Label 108: @2247
1961 /* 2247 */ GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(2279), // Rule ID 27 //
1962 /* 2252 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1963 /* 2255 */ // MIs[0] dst
1964 /* 2255 */ // No operand predicates
1965 /* 2255 */ // MIs[0] t
1966 /* 2255 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1967 /* 2259 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1968 /* 2263 */ // MIs[1] ptr
1969 /* 2263 */ // No operand predicates
1970 /* 2263 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner4),
1971 /* 2267 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1972 /* 2269 */ // Combiner Rule #9: i2p_to_p2i_zext
1973 /* 2269 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ZEXT),
1974 /* 2272 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1975 /* 2274 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1976 /* 2278 */ GIR_EraseRootFromParent_Done,
1977 /* 2279 */ // Label 109: @2279
1978 /* 2279 */ GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(2311), // Rule ID 28 //
1979 /* 2284 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
1980 /* 2287 */ // MIs[0] dst
1981 /* 2287 */ // No operand predicates
1982 /* 2287 */ // MIs[0] t
1983 /* 2287 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1984 /* 2291 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1985 /* 2295 */ // MIs[1] ptr
1986 /* 2295 */ // No operand predicates
1987 /* 2295 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner5),
1988 /* 2299 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1989 /* 2301 */ // Combiner Rule #10: i2p_to_p2i_trunc
1990 /* 2301 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_TRUNC),
1991 /* 2304 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1992 /* 2306 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1993 /* 2310 */ GIR_EraseRootFromParent_Done,
1994 /* 2311 */ // Label 110: @2311
1995 /* 2311 */ GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(2335), // Rule ID 99 //
1996 /* 2316 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
1997 /* 2319 */ // MIs[0] dst
1998 /* 2319 */ // No operand predicates
1999 /* 2319 */ // MIs[0] __unary_undef_to_undef_match_0.x
2000 /* 2319 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2001 /* 2323 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2002 /* 2327 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2003 /* 2329 */ // Combiner Rule #64: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[3]]
2004 /* 2329 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2005 /* 2332 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2006 /* 2334 */ GIR_EraseRootFromParent_Done,
2007 /* 2335 */ // Label 111: @2335
2008 /* 2335 */ GIM_Reject,
2009 /* 2336 */ // Label 14: @2336
2010 /* 2336 */ GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(2369), // Rule ID 25 //
2011 /* 2341 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
2012 /* 2344 */ // MIs[0] dst
2013 /* 2344 */ // No operand predicates
2014 /* 2344 */ // MIs[0] mid
2015 /* 2344 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2016 /* 2348 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_PTRTOINT),
2017 /* 2352 */ // MIs[1] x
2018 /* 2352 */ // No operand predicates
2019 /* 2352 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
2020 /* 2356 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2021 /* 2361 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2022 /* 2363 */ // Combiner Rule #7: p2i_to_i2p
2023 /* 2363 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2024 /* 2368 */ GIR_EraseRootFromParent_Done,
2025 /* 2369 */ // Label 112: @2369
2026 /* 2369 */ GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(2393), // Rule ID 100 //
2027 /* 2374 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
2028 /* 2377 */ // MIs[0] dst
2029 /* 2377 */ // No operand predicates
2030 /* 2377 */ // MIs[0] __unary_undef_to_undef_match_0.x
2031 /* 2377 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2032 /* 2381 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2033 /* 2385 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2034 /* 2387 */ // Combiner Rule #64: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[4]]
2035 /* 2387 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2036 /* 2390 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2037 /* 2392 */ GIR_EraseRootFromParent_Done,
2038 /* 2393 */ // Label 113: @2393
2039 /* 2393 */ GIM_Reject,
2040 /* 2394 */ // Label 15: @2394
2041 /* 2394 */ GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(2427), // Rule ID 39 //
2042 /* 2399 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
2043 /* 2402 */ // MIs[0] dst
2044 /* 2402 */ // No operand predicates
2045 /* 2402 */ // MIs[0] src1
2046 /* 2402 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2047 /* 2406 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
2048 /* 2410 */ // MIs[1] src0
2049 /* 2410 */ // No operand predicates
2050 /* 2410 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
2051 /* 2414 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2052 /* 2419 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2053 /* 2421 */ // Combiner Rule #20: bitcast_bitcast_fold
2054 /* 2421 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2055 /* 2426 */ GIR_EraseRootFromParent_Done,
2056 /* 2427 */ // Label 114: @2427
2057 /* 2427 */ GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(2459), // Rule ID 40 //
2058 /* 2432 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
2059 /* 2435 */ // MIs[0] dst
2060 /* 2435 */ // No operand predicates
2061 /* 2435 */ // MIs[0] src1
2062 /* 2435 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2063 /* 2439 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
2064 /* 2443 */ // MIs[1] src0
2065 /* 2443 */ // No operand predicates
2066 /* 2443 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner7),
2067 /* 2447 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2068 /* 2449 */ // Combiner Rule #21: bitcast_bitcast_to_bitcast
2069 /* 2449 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_BITCAST),
2070 /* 2452 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2071 /* 2454 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src0
2072 /* 2458 */ GIR_EraseRootFromParent_Done,
2073 /* 2459 */ // Label 115: @2459
2074 /* 2459 */ GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(2483), // Rule ID 97 //
2075 /* 2464 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
2076 /* 2467 */ // MIs[0] dst
2077 /* 2467 */ // No operand predicates
2078 /* 2467 */ // MIs[0] __unary_undef_to_undef_match_0.x
2079 /* 2467 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2080 /* 2471 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2081 /* 2475 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2082 /* 2477 */ // Combiner Rule #64: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[1]]
2083 /* 2477 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2084 /* 2480 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2085 /* 2482 */ GIR_EraseRootFromParent_Done,
2086 /* 2483 */ // Label 116: @2483
2087 /* 2483 */ GIM_Reject,
2088 /* 2484 */ // Label 16: @2484
2089 /* 2484 */ GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(2513), // Rule ID 121 //
2090 /* 2489 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule77Enabled),
2091 /* 2492 */ // MIs[0] dst
2092 /* 2492 */ // No operand predicates
2093 /* 2492 */ // MIs[0] src
2094 /* 2492 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2095 /* 2496 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FREEZE),
2096 /* 2500 */ // MIs[1] __idempotent_prop_match_0.x
2097 /* 2500 */ // No operand predicates
2098 /* 2500 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2099 /* 2505 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2100 /* 2507 */ // Combiner Rule #77: idempotent_prop @ [__idempotent_prop_match_0[0]]
2101 /* 2507 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2102 /* 2512 */ GIR_EraseRootFromParent_Done,
2103 /* 2513 */ // Label 117: @2513
2104 /* 2513 */ GIM_Reject,
2105 /* 2514 */ // Label 17: @2514
2106 /* 2514 */ GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(2525), // Rule ID 55 //
2107 /* 2519 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled),
2108 /* 2522 */ // MIs[0] dst
2109 /* 2522 */ // No operand predicates
2110 /* 2522 */ // MIs[0] src0
2111 /* 2522 */ // No operand predicates
2112 /* 2522 */ // Combiner Rule #36: constant_fold_intrinsic_trunc
2113 /* 2522 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2114 /* 2525 */ // Label 118: @2525
2115 /* 2525 */ GIM_Reject,
2116 /* 2526 */ // Label 18: @2526
2117 /* 2526 */ GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(2537), // Rule ID 56 //
2118 /* 2531 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled),
2119 /* 2534 */ // MIs[0] dst
2120 /* 2534 */ // No operand predicates
2121 /* 2534 */ // MIs[0] src0
2122 /* 2534 */ // No operand predicates
2123 /* 2534 */ // Combiner Rule #37: constant_fold_intrinsic_round
2124 /* 2534 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2125 /* 2537 */ // Label 119: @2537
2126 /* 2537 */ GIM_Reject,
2127 /* 2538 */ // Label 19: @2538
2128 /* 2538 */ GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(2549), // Rule ID 57 //
2129 /* 2543 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule38Enabled),
2130 /* 2546 */ // MIs[0] dst
2131 /* 2546 */ // No operand predicates
2132 /* 2546 */ // MIs[0] src0
2133 /* 2546 */ // No operand predicates
2134 /* 2546 */ // Combiner Rule #38: constant_fold_intrinsic_roundeven
2135 /* 2546 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2136 /* 2549 */ // Label 120: @2549
2137 /* 2549 */ GIM_Reject,
2138 /* 2550 */ // Label 20: @2550
2139 /* 2550 */ GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(2573), // Rule ID 112 //
2140 /* 2555 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule69Enabled),
2141 /* 2558 */ // MIs[0] val
2142 /* 2558 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/0, // MIs[1]
2143 /* 2562 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2144 /* 2566 */ // MIs[0] ptr
2145 /* 2566 */ // No operand predicates
2146 /* 2566 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner17),
2147 /* 2570 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2148 /* 2572 */ // Combiner Rule #69: erase_undef_store
2149 /* 2572 */ GIR_EraseRootFromParent_Done,
2150 /* 2573 */ // Label 121: @2573
2151 /* 2573 */ GIM_Reject,
2152 /* 2574 */ // Label 21: @2574
2153 /* 2574 */ GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(2598), // Rule ID 98 //
2154 /* 2579 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
2155 /* 2582 */ // MIs[0] dst
2156 /* 2582 */ // No operand predicates
2157 /* 2582 */ // MIs[0] __unary_undef_to_undef_match_0.x
2158 /* 2582 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2159 /* 2586 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2160 /* 2590 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2161 /* 2592 */ // Combiner Rule #64: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[2]]
2162 /* 2592 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2163 /* 2595 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2164 /* 2597 */ GIR_EraseRootFromParent_Done,
2165 /* 2598 */ // Label 122: @2598
2166 /* 2598 */ GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(2609), // Rule ID 29 //
2167 /* 2603 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
2168 /* 2606 */ // MIs[0] dst
2169 /* 2606 */ // No operand predicates
2170 /* 2606 */ // MIs[0] src
2171 /* 2606 */ // No operand predicates
2172 /* 2606 */ // Combiner Rule #11: anyext_trunc_fold
2173 /* 2606 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
2174 /* 2609 */ // Label 123: @2609
2175 /* 2609 */ GIM_Reject,
2176 /* 2610 */ // Label 22: @2610
2177 /* 2610 */ GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(2634), // Rule ID 96 //
2178 /* 2615 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
2179 /* 2618 */ // MIs[0] dst
2180 /* 2618 */ // No operand predicates
2181 /* 2618 */ // MIs[0] __unary_undef_to_undef_match_0.x
2182 /* 2618 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2183 /* 2622 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2184 /* 2626 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2185 /* 2628 */ // Combiner Rule #64: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[0]]
2186 /* 2628 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2187 /* 2631 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2188 /* 2633 */ GIR_EraseRootFromParent_Done,
2189 /* 2634 */ // Label 124: @2634
2190 /* 2634 */ GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(2645), // Rule ID 37 //
2191 /* 2639 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
2192 /* 2642 */ // MIs[0] dst
2193 /* 2642 */ // No operand predicates
2194 /* 2642 */ // MIs[0] src
2195 /* 2642 */ // No operand predicates
2196 /* 2642 */ // Combiner Rule #18: trunc_buildvector_fold
2197 /* 2642 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
2198 /* 2645 */ // Label 125: @2645
2199 /* 2645 */ GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(2656), // Rule ID 38 //
2200 /* 2650 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
2201 /* 2653 */ // MIs[0] dst
2202 /* 2653 */ // No operand predicates
2203 /* 2653 */ // MIs[0] src
2204 /* 2653 */ // No operand predicates
2205 /* 2653 */ // Combiner Rule #19: trunc_lshr_buildvector_fold
2206 /* 2653 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
2207 /* 2656 */ // Label 126: @2656
2208 /* 2656 */ GIM_Reject,
2209 /* 2657 */ // Label 23: @2657
2210 /* 2657 */ GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(2680), // Rule ID 16 //
2211 /* 2662 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
2212 /* 2665 */ // MIs[0] dst
2213 /* 2665 */ // No operand predicates
2214 /* 2665 */ // MIs[0] zero
2215 /* 2665 */ // No operand predicates
2216 /* 2665 */ // MIs[0] rhs
2217 /* 2665 */ // No operand predicates
2218 /* 2665 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
2219 /* 2669 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2220 /* 2674 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[0]]
2221 /* 2674 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2222 /* 2679 */ GIR_EraseRootFromParent_Done,
2223 /* 2680 */ // Label 127: @2680
2224 /* 2680 */ GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(2701), // Rule ID 89 //
2225 /* 2685 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled),
2226 /* 2688 */ // MIs[0] dst
2227 /* 2688 */ // No operand predicates
2228 /* 2688 */ // MIs[0] __binop_left_undef_to_zero_match_0.x
2229 /* 2688 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2230 /* 2692 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2231 /* 2696 */ // MIs[0] __binop_left_undef_to_zero_match_0.y
2232 /* 2696 */ // No operand predicates
2233 /* 2696 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2234 /* 2698 */ // Combiner Rule #61: binop_left_undef_to_zero @ [__binop_left_undef_to_zero_match_0[0]]
2235 /* 2698 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
2236 /* 2701 */ // Label 128: @2701
2237 /* 2701 */ GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(2725), // Rule ID 92 //
2238 /* 2706 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
2239 /* 2709 */ // MIs[0] dst
2240 /* 2709 */ // No operand predicates
2241 /* 2709 */ // MIs[0] __binop_right_undef_to_undef_match_0.x
2242 /* 2709 */ // No operand predicates
2243 /* 2709 */ // MIs[0] __binop_right_undef_to_undef_match_0.y
2244 /* 2709 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2245 /* 2713 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2246 /* 2717 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2247 /* 2719 */ // Combiner Rule #62: binop_right_undef_to_undef @ [__binop_right_undef_to_undef_match_0[0]]
2248 /* 2719 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2249 /* 2722 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2250 /* 2724 */ GIR_EraseRootFromParent_Done,
2251 /* 2725 */ // Label 129: @2725
2252 /* 2725 */ GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(2748), // Rule ID 6 //
2253 /* 2730 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
2254 /* 2733 */ // MIs[0] dst
2255 /* 2733 */ // No operand predicates
2256 /* 2733 */ // MIs[0] lhs
2257 /* 2733 */ // No operand predicates
2258 /* 2733 */ // MIs[0] Operand 2
2259 /* 2733 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2260 /* 2737 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2261 /* 2742 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[4]]
2262 /* 2742 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2263 /* 2747 */ GIR_EraseRootFromParent_Done,
2264 /* 2748 */ // Label 130: @2748
2265 /* 2748 */ GIM_Reject,
2266 /* 2749 */ // Label 24: @2749
2267 /* 2749 */ GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(2772), // Rule ID 17 //
2268 /* 2754 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
2269 /* 2757 */ // MIs[0] dst
2270 /* 2757 */ // No operand predicates
2271 /* 2757 */ // MIs[0] zero
2272 /* 2757 */ // No operand predicates
2273 /* 2757 */ // MIs[0] rhs
2274 /* 2757 */ // No operand predicates
2275 /* 2757 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
2276 /* 2761 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2277 /* 2766 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[1]]
2278 /* 2766 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2279 /* 2771 */ GIR_EraseRootFromParent_Done,
2280 /* 2772 */ // Label 131: @2772
2281 /* 2772 */ GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(2796), // Rule ID 94 //
2282 /* 2777 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
2283 /* 2780 */ // MIs[0] dst
2284 /* 2780 */ // No operand predicates
2285 /* 2780 */ // MIs[0] __binop_right_undef_to_undef_match_0.x
2286 /* 2780 */ // No operand predicates
2287 /* 2780 */ // MIs[0] __binop_right_undef_to_undef_match_0.y
2288 /* 2780 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2289 /* 2784 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2290 /* 2788 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2291 /* 2790 */ // Combiner Rule #62: binop_right_undef_to_undef @ [__binop_right_undef_to_undef_match_0[2]]
2292 /* 2790 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2293 /* 2793 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2294 /* 2795 */ GIR_EraseRootFromParent_Done,
2295 /* 2796 */ // Label 132: @2796
2296 /* 2796 */ GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(2819), // Rule ID 8 //
2297 /* 2801 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
2298 /* 2804 */ // MIs[0] dst
2299 /* 2804 */ // No operand predicates
2300 /* 2804 */ // MIs[0] lhs
2301 /* 2804 */ // No operand predicates
2302 /* 2804 */ // MIs[0] Operand 2
2303 /* 2804 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2304 /* 2808 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2305 /* 2813 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[6]]
2306 /* 2813 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2307 /* 2818 */ GIR_EraseRootFromParent_Done,
2308 /* 2819 */ // Label 133: @2819
2309 /* 2819 */ GIM_Reject,
2310 /* 2820 */ // Label 25: @2820
2311 /* 2820 */ GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(2843), // Rule ID 18 //
2312 /* 2825 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
2313 /* 2828 */ // MIs[0] dst
2314 /* 2828 */ // No operand predicates
2315 /* 2828 */ // MIs[0] zero
2316 /* 2828 */ // No operand predicates
2317 /* 2828 */ // MIs[0] rhs
2318 /* 2828 */ // No operand predicates
2319 /* 2828 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
2320 /* 2832 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2321 /* 2837 */ // Combiner Rule #5: binop_left_to_zero @ [__binop_left_to_zero_match_0[2]]
2322 /* 2837 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2323 /* 2842 */ GIR_EraseRootFromParent_Done,
2324 /* 2843 */ // Label 134: @2843
2325 /* 2843 */ GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(2867), // Rule ID 93 //
2326 /* 2848 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule62Enabled),
2327 /* 2851 */ // MIs[0] dst
2328 /* 2851 */ // No operand predicates
2329 /* 2851 */ // MIs[0] __binop_right_undef_to_undef_match_0.x
2330 /* 2851 */ // No operand predicates
2331 /* 2851 */ // MIs[0] __binop_right_undef_to_undef_match_0.y
2332 /* 2851 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2333 /* 2855 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2334 /* 2859 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2335 /* 2861 */ // Combiner Rule #62: binop_right_undef_to_undef @ [__binop_right_undef_to_undef_match_0[1]]
2336 /* 2861 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2337 /* 2864 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2338 /* 2866 */ GIR_EraseRootFromParent_Done,
2339 /* 2867 */ // Label 135: @2867
2340 /* 2867 */ GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(2890), // Rule ID 7 //
2341 /* 2872 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
2342 /* 2875 */ // MIs[0] dst
2343 /* 2875 */ // No operand predicates
2344 /* 2875 */ // MIs[0] lhs
2345 /* 2875 */ // No operand predicates
2346 /* 2875 */ // MIs[0] Operand 2
2347 /* 2875 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2348 /* 2879 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2349 /* 2884 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[5]]
2350 /* 2884 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2351 /* 2889 */ GIR_EraseRootFromParent_Done,
2352 /* 2890 */ // Label 136: @2890
2353 /* 2890 */ GIM_Reject,
2354 /* 2891 */ // Label 26: @2891
2355 /* 2891 */ GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(2914), // Rule ID 11 //
2356 /* 2896 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
2357 /* 2899 */ // MIs[0] dst
2358 /* 2899 */ // No operand predicates
2359 /* 2899 */ // MIs[0] lhs
2360 /* 2899 */ // No operand predicates
2361 /* 2899 */ // MIs[0] Operand 2
2362 /* 2899 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2363 /* 2903 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2364 /* 2908 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[9]]
2365 /* 2908 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2366 /* 2913 */ GIR_EraseRootFromParent_Done,
2367 /* 2914 */ // Label 137: @2914
2368 /* 2914 */ GIM_Reject,
2369 /* 2915 */ // Label 27: @2915
2370 /* 2915 */ GIM_Try, /*On fail goto*//*Label 138*/ GIMT_Encode4(2938), // Rule ID 10 //
2371 /* 2920 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
2372 /* 2923 */ // MIs[0] dst
2373 /* 2923 */ // No operand predicates
2374 /* 2923 */ // MIs[0] lhs
2375 /* 2923 */ // No operand predicates
2376 /* 2923 */ // MIs[0] Operand 2
2377 /* 2923 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2378 /* 2927 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2379 /* 2932 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[8]]
2380 /* 2932 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2381 /* 2937 */ GIR_EraseRootFromParent_Done,
2382 /* 2938 */ // Label 138: @2938
2383 /* 2938 */ GIM_Reject,
2384 /* 2939 */ // Label 28: @2939
2385 /* 2939 */ GIM_Try, /*On fail goto*//*Label 139*/ GIMT_Encode4(2962), // Rule ID 1 //
2386 /* 2944 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
2387 /* 2947 */ // MIs[0] dst
2388 /* 2947 */ // No operand predicates
2389 /* 2947 */ // MIs[0] cond
2390 /* 2947 */ // No operand predicates
2391 /* 2947 */ // MIs[0] tval
2392 /* 2947 */ // No operand predicates
2393 /* 2947 */ // MIs[0] fval
2394 /* 2947 */ // No operand predicates
2395 /* 2947 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
2396 /* 2951 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2397 /* 2956 */ // Combiner Rule #1: select_same_val_equiv
2398 /* 2956 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2399 /* 2961 */ GIR_EraseRootFromParent_Done,
2400 /* 2962 */ // Label 139: @2962
2401 /* 2962 */ GIM_Try, /*On fail goto*//*Label 140*/ GIMT_Encode4(2986), // Rule ID 0 //
2402 /* 2967 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
2403 /* 2970 */ // MIs[0] dst
2404 /* 2970 */ // No operand predicates
2405 /* 2970 */ // MIs[0] cond
2406 /* 2970 */ // No operand predicates
2407 /* 2970 */ // MIs[0] x
2408 /* 2970 */ // No operand predicates
2409 /* 2970 */ // MIs[0] x
2410 /* 2970 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/3, /*OtherMI*/0, /*OtherOpIdx*/2,
2411 /* 2975 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2412 /* 2980 */ // Combiner Rule #0: select_same_val_trivial
2413 /* 2980 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2414 /* 2985 */ GIR_EraseRootFromParent_Done,
2415 /* 2986 */ // Label 140: @2986
2416 /* 2986 */ GIM_Reject,
2417 /* 2987 */ // Label 29: @2987
2418 /* 2987 */ GIM_Try, /*On fail goto*//*Label 141*/ GIMT_Encode4(3014), // Rule ID 68 //
2419 /* 2992 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule49Enabled),
2420 /* 2995 */ // MIs[0] dst
2421 /* 2995 */ // No operand predicates
2422 /* 2995 */ // MIs[0] carry_out
2423 /* 2995 */ // No operand predicates
2424 /* 2995 */ // MIs[0] x
2425 /* 2995 */ // No operand predicates
2426 /* 2995 */ // MIs[0] y
2427 /* 2995 */ // No operand predicates
2428 /* 2995 */ // MIs[0] carry_in
2429 /* 2995 */ // No operand predicates
2430 /* 2995 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2431 /* 2999 */ // Combiner Rule #49: adde_to_addo_uadde
2432 /* 2999 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UADDO),
2433 /* 3002 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2434 /* 3004 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry_out
2435 /* 3006 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2436 /* 3008 */ GIR_RootToRootCopy, /*OpIdx*/3, // y
2437 /* 3010 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2438 /* 3013 */ GIR_EraseRootFromParent_Done,
2439 /* 3014 */ // Label 141: @3014
2440 /* 3014 */ GIM_Reject,
2441 /* 3015 */ // Label 30: @3015
2442 /* 3015 */ GIM_Try, /*On fail goto*//*Label 142*/ GIMT_Encode4(3042), // Rule ID 70 //
2443 /* 3020 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule51Enabled),
2444 /* 3023 */ // MIs[0] dst
2445 /* 3023 */ // No operand predicates
2446 /* 3023 */ // MIs[0] carry_out
2447 /* 3023 */ // No operand predicates
2448 /* 3023 */ // MIs[0] x
2449 /* 3023 */ // No operand predicates
2450 /* 3023 */ // MIs[0] y
2451 /* 3023 */ // No operand predicates
2452 /* 3023 */ // MIs[0] carry_in
2453 /* 3023 */ // No operand predicates
2454 /* 3023 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2455 /* 3027 */ // Combiner Rule #51: adde_to_addo_usube
2456 /* 3027 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_USUBO),
2457 /* 3030 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2458 /* 3032 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry_out
2459 /* 3034 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2460 /* 3036 */ GIR_RootToRootCopy, /*OpIdx*/3, // y
2461 /* 3038 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2462 /* 3041 */ GIR_EraseRootFromParent_Done,
2463 /* 3042 */ // Label 142: @3042
2464 /* 3042 */ GIM_Reject,
2465 /* 3043 */ // Label 31: @3043
2466 /* 3043 */ GIM_Try, /*On fail goto*//*Label 143*/ GIMT_Encode4(3070), // Rule ID 69 //
2467 /* 3048 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule50Enabled),
2468 /* 3051 */ // MIs[0] dst
2469 /* 3051 */ // No operand predicates
2470 /* 3051 */ // MIs[0] carry_out
2471 /* 3051 */ // No operand predicates
2472 /* 3051 */ // MIs[0] x
2473 /* 3051 */ // No operand predicates
2474 /* 3051 */ // MIs[0] y
2475 /* 3051 */ // No operand predicates
2476 /* 3051 */ // MIs[0] carry_in
2477 /* 3051 */ // No operand predicates
2478 /* 3051 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2479 /* 3055 */ // Combiner Rule #50: adde_to_addo_sadde
2480 /* 3055 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SADDO),
2481 /* 3058 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2482 /* 3060 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry_out
2483 /* 3062 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2484 /* 3064 */ GIR_RootToRootCopy, /*OpIdx*/3, // y
2485 /* 3066 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2486 /* 3069 */ GIR_EraseRootFromParent_Done,
2487 /* 3070 */ // Label 143: @3070
2488 /* 3070 */ GIM_Reject,
2489 /* 3071 */ // Label 32: @3071
2490 /* 3071 */ GIM_Try, /*On fail goto*//*Label 144*/ GIMT_Encode4(3098), // Rule ID 71 //
2491 /* 3076 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule52Enabled),
2492 /* 3079 */ // MIs[0] dst
2493 /* 3079 */ // No operand predicates
2494 /* 3079 */ // MIs[0] carry_out
2495 /* 3079 */ // No operand predicates
2496 /* 3079 */ // MIs[0] x
2497 /* 3079 */ // No operand predicates
2498 /* 3079 */ // MIs[0] y
2499 /* 3079 */ // No operand predicates
2500 /* 3079 */ // MIs[0] carry_in
2501 /* 3079 */ // No operand predicates
2502 /* 3079 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2503 /* 3083 */ // Combiner Rule #52: adde_to_addo_ssube
2504 /* 3083 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SSUBO),
2505 /* 3086 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2506 /* 3088 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry_out
2507 /* 3090 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2508 /* 3092 */ GIR_RootToRootCopy, /*OpIdx*/3, // y
2509 /* 3094 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2510 /* 3097 */ GIR_EraseRootFromParent_Done,
2511 /* 3098 */ // Label 144: @3098
2512 /* 3098 */ GIM_Reject,
2513 /* 3099 */ // Label 33: @3099
2514 /* 3099 */ GIM_Try, /*On fail goto*//*Label 145*/ GIMT_Encode4(3126), // Rule ID 64 //
2515 /* 3104 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule45Enabled),
2516 /* 3107 */ // MIs[0] dst
2517 /* 3107 */ // No operand predicates
2518 /* 3107 */ // MIs[0] carry
2519 /* 3107 */ // No operand predicates
2520 /* 3107 */ // MIs[0] x
2521 /* 3107 */ // No operand predicates
2522 /* 3107 */ // MIs[0] rhs
2523 /* 3107 */ // No operand predicates
2524 /* 3107 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2525 /* 3111 */ // Combiner Rule #45: mulo_by_2_umulo
2526 /* 3111 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UADDO),
2527 /* 3114 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2528 /* 3116 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry
2529 /* 3118 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2530 /* 3120 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2531 /* 3122 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2532 /* 3125 */ GIR_EraseRootFromParent_Done,
2533 /* 3126 */ // Label 145: @3126
2534 /* 3126 */ GIM_Try, /*On fail goto*//*Label 146*/ GIMT_Encode4(3137), // Rule ID 66 //
2535 /* 3131 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule47Enabled),
2536 /* 3134 */ // MIs[0] dst
2537 /* 3134 */ // No operand predicates
2538 /* 3134 */ // MIs[0] carry
2539 /* 3134 */ // No operand predicates
2540 /* 3134 */ // MIs[0] x
2541 /* 3134 */ // No operand predicates
2542 /* 3134 */ // MIs[0] y
2543 /* 3134 */ // No operand predicates
2544 /* 3134 */ // Combiner Rule #47: mulo_by_0_umulo
2545 /* 3134 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
2546 /* 3137 */ // Label 146: @3137
2547 /* 3137 */ GIM_Reject,
2548 /* 3138 */ // Label 34: @3138
2549 /* 3138 */ GIM_Try, /*On fail goto*//*Label 147*/ GIMT_Encode4(3165), // Rule ID 65 //
2550 /* 3143 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule46Enabled),
2551 /* 3146 */ // MIs[0] dst
2552 /* 3146 */ // No operand predicates
2553 /* 3146 */ // MIs[0] carry
2554 /* 3146 */ // No operand predicates
2555 /* 3146 */ // MIs[0] x
2556 /* 3146 */ // No operand predicates
2557 /* 3146 */ // MIs[0] rhs
2558 /* 3146 */ // No operand predicates
2559 /* 3146 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2560 /* 3150 */ // Combiner Rule #46: mulo_by_2_smulo
2561 /* 3150 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SADDO),
2562 /* 3153 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2563 /* 3155 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry
2564 /* 3157 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2565 /* 3159 */ GIR_RootToRootCopy, /*OpIdx*/2, // x
2566 /* 3161 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2567 /* 3164 */ GIR_EraseRootFromParent_Done,
2568 /* 3165 */ // Label 147: @3165
2569 /* 3165 */ GIM_Try, /*On fail goto*//*Label 148*/ GIMT_Encode4(3176), // Rule ID 67 //
2570 /* 3170 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule48Enabled),
2571 /* 3173 */ // MIs[0] dst
2572 /* 3173 */ // No operand predicates
2573 /* 3173 */ // MIs[0] carry
2574 /* 3173 */ // No operand predicates
2575 /* 3173 */ // MIs[0] x
2576 /* 3173 */ // No operand predicates
2577 /* 3173 */ // MIs[0] y
2578 /* 3173 */ // No operand predicates
2579 /* 3173 */ // Combiner Rule #48: mulo_by_0_smulo
2580 /* 3173 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
2581 /* 3176 */ // Label 148: @3176
2582 /* 3176 */ GIM_Reject,
2583 /* 3177 */ // Label 35: @3177
2584 /* 3177 */ GIM_Try, /*On fail goto*//*Label 149*/ GIMT_Encode4(3206), // Rule ID 43 //
2585 /* 3182 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
2586 /* 3185 */ GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::FmNsz),
2587 /* 3191 */ // MIs[0] dst
2588 /* 3191 */ // No operand predicates
2589 /* 3191 */ // MIs[0] x
2590 /* 3191 */ // No operand predicates
2591 /* 3191 */ // MIs[0] y
2592 /* 3191 */ // No operand predicates
2593 /* 3191 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9),
2594 /* 3195 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2595 /* 3200 */ // Combiner Rule #24: right_identity_neg_zero_fp_nsz
2596 /* 3200 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2597 /* 3205 */ GIR_EraseRootFromParent_Done,
2598 /* 3206 */ // Label 149: @3206
2599 /* 3206 */ GIM_Try, /*On fail goto*//*Label 150*/ GIMT_Encode4(3229), // Rule ID 42 //
2600 /* 3211 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
2601 /* 3214 */ // MIs[0] dst
2602 /* 3214 */ // No operand predicates
2603 /* 3214 */ // MIs[0] x
2604 /* 3214 */ // No operand predicates
2605 /* 3214 */ // MIs[0] y
2606 /* 3214 */ // No operand predicates
2607 /* 3214 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner8),
2608 /* 3218 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2609 /* 3223 */ // Combiner Rule #23: right_identity_neg_zero_fp
2610 /* 3223 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2611 /* 3228 */ GIR_EraseRootFromParent_Done,
2612 /* 3229 */ // Label 150: @3229
2613 /* 3229 */ GIM_Reject,
2614 /* 3230 */ // Label 36: @3230
2615 /* 3230 */ GIM_Try, /*On fail goto*//*Label 151*/ GIMT_Encode4(3253), // Rule ID 32 //
2616 /* 3235 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
2617 /* 3238 */ // MIs[0] dst
2618 /* 3238 */ // No operand predicates
2619 /* 3238 */ // MIs[0] x
2620 /* 3238 */ // No operand predicates
2621 /* 3238 */ // MIs[0] y
2622 /* 3238 */ // No operand predicates
2623 /* 3238 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6),
2624 /* 3242 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2625 /* 3247 */ // Combiner Rule #14: right_identity_one_fp
2626 /* 3247 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2627 /* 3252 */ GIR_EraseRootFromParent_Done,
2628 /* 3253 */ // Label 151: @3253
2629 /* 3253 */ GIM_Try, /*On fail goto*//*Label 152*/ GIMT_Encode4(3273), // Rule ID 44 //
2630 /* 3258 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled),
2631 /* 3261 */ // MIs[0] dst
2632 /* 3261 */ // No operand predicates
2633 /* 3261 */ // MIs[0] x
2634 /* 3261 */ // No operand predicates
2635 /* 3261 */ // MIs[0] y
2636 /* 3261 */ // No operand predicates
2637 /* 3261 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner10),
2638 /* 3265 */ // Combiner Rule #25: right_identity_neg_one_fp
2639 /* 3265 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG),
2640 /* 3268 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2641 /* 3270 */ GIR_RootToRootCopy, /*OpIdx*/1, // x
2642 /* 3272 */ GIR_EraseRootFromParent_Done,
2643 /* 3273 */ // Label 152: @3273
2644 /* 3273 */ GIM_Reject,
2645 /* 3274 */ // Label 37: @3274
2646 /* 3274 */ GIM_Try, /*On fail goto*//*Label 153*/ GIMT_Encode4(3295), // Rule ID 80 //
2647 /* 3279 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled),
2648 /* 3282 */ // MIs[0] dst
2649 /* 3282 */ // No operand predicates
2650 /* 3282 */ // MIs[0] float
2651 /* 3282 */ // No operand predicates
2652 /* 3282 */ // MIs[0] int
2653 /* 3282 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
2654 /* 3286 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2655 /* 3290 */ // MIs[1] imm
2656 /* 3290 */ // No operand predicates
2657 /* 3290 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2658 /* 3292 */ // Combiner Rule #57: expand_const_fpowi
2659 /* 3292 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
2660 /* 3295 */ // Label 153: @3295
2661 /* 3295 */ GIM_Reject,
2662 /* 3296 */ // Label 38: @3296
2663 /* 3296 */ GIM_Try, /*On fail goto*//*Label 154*/ GIMT_Encode4(3307), // Rule ID 50 //
2664 /* 3301 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled),
2665 /* 3304 */ // MIs[0] dst
2666 /* 3304 */ // No operand predicates
2667 /* 3304 */ // MIs[0] src0
2668 /* 3304 */ // No operand predicates
2669 /* 3304 */ // Combiner Rule #31: constant_fold_flog2
2670 /* 3304 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2671 /* 3307 */ // Label 154: @3307
2672 /* 3307 */ GIM_Reject,
2673 /* 3308 */ // Label 39: @3308
2674 /* 3308 */ GIM_Try, /*On fail goto*//*Label 155*/ GIMT_Encode4(3337), // Rule ID 30 //
2675 /* 3313 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
2676 /* 3316 */ // MIs[0] dst
2677 /* 3316 */ // No operand predicates
2678 /* 3316 */ // MIs[0] t
2679 /* 3316 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2680 /* 3320 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
2681 /* 3324 */ // MIs[1] src
2682 /* 3324 */ // No operand predicates
2683 /* 3324 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2684 /* 3329 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2685 /* 3331 */ // Combiner Rule #12: fneg_fneg_fold
2686 /* 3331 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2687 /* 3336 */ GIR_EraseRootFromParent_Done,
2688 /* 3337 */ // Label 155: @3337
2689 /* 3337 */ GIM_Try, /*On fail goto*//*Label 156*/ GIMT_Encode4(3348), // Rule ID 47 //
2690 /* 3342 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
2691 /* 3345 */ // MIs[0] dst
2692 /* 3345 */ // No operand predicates
2693 /* 3345 */ // MIs[0] src0
2694 /* 3345 */ // No operand predicates
2695 /* 3345 */ // Combiner Rule #28: constant_fold_fneg
2696 /* 3345 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2697 /* 3348 */ // Label 156: @3348
2698 /* 3348 */ GIM_Reject,
2699 /* 3349 */ // Label 40: @3349
2700 /* 3349 */ GIM_Try, /*On fail goto*//*Label 157*/ GIMT_Encode4(3360), // Rule ID 52 //
2701 /* 3354 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled),
2702 /* 3357 */ // MIs[0] dst
2703 /* 3357 */ // No operand predicates
2704 /* 3357 */ // MIs[0] src0
2705 /* 3357 */ // No operand predicates
2706 /* 3357 */ // Combiner Rule #33: constant_fold_fpext
2707 /* 3357 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2708 /* 3360 */ // Label 157: @3360
2709 /* 3360 */ GIM_Reject,
2710 /* 3361 */ // Label 41: @3361
2711 /* 3361 */ GIM_Try, /*On fail goto*//*Label 158*/ GIMT_Encode4(3394), // Rule ID 41 //
2712 /* 3366 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
2713 /* 3369 */ // MIs[0] dst
2714 /* 3369 */ // No operand predicates
2715 /* 3369 */ // MIs[0] src1
2716 /* 3369 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2717 /* 3373 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT),
2718 /* 3377 */ // MIs[1] src0
2719 /* 3377 */ // No operand predicates
2720 /* 3377 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
2721 /* 3381 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2722 /* 3386 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2723 /* 3388 */ // Combiner Rule #22: fptrunc_fpext_fold
2724 /* 3388 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2725 /* 3393 */ GIR_EraseRootFromParent_Done,
2726 /* 3394 */ // Label 158: @3394
2727 /* 3394 */ GIM_Try, /*On fail goto*//*Label 159*/ GIMT_Encode4(3405), // Rule ID 51 //
2728 /* 3399 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
2729 /* 3402 */ // MIs[0] dst
2730 /* 3402 */ // No operand predicates
2731 /* 3402 */ // MIs[0] src0
2732 /* 3402 */ // No operand predicates
2733 /* 3402 */ // Combiner Rule #32: constant_fold_fptrunc
2734 /* 3402 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2735 /* 3405 */ // Label 159: @3405
2736 /* 3405 */ GIM_Reject,
2737 /* 3406 */ // Label 42: @3406
2738 /* 3406 */ GIM_Try, /*On fail goto*//*Label 160*/ GIMT_Encode4(3430), // Rule ID 101 //
2739 /* 3411 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
2740 /* 3414 */ // MIs[0] dst
2741 /* 3414 */ // No operand predicates
2742 /* 3414 */ // MIs[0] __unary_undef_to_undef_match_0.x
2743 /* 3414 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2744 /* 3418 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2745 /* 3422 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2746 /* 3424 */ // Combiner Rule #64: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[5]]
2747 /* 3424 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2748 /* 3427 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2749 /* 3429 */ GIR_EraseRootFromParent_Done,
2750 /* 3430 */ // Label 160: @3430
2751 /* 3430 */ GIM_Reject,
2752 /* 3431 */ // Label 43: @3431
2753 /* 3431 */ GIM_Try, /*On fail goto*//*Label 161*/ GIMT_Encode4(3455), // Rule ID 102 //
2754 /* 3436 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule64Enabled),
2755 /* 3439 */ // MIs[0] dst
2756 /* 3439 */ // No operand predicates
2757 /* 3439 */ // MIs[0] __unary_undef_to_undef_match_0.x
2758 /* 3439 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2759 /* 3443 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2760 /* 3447 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2761 /* 3449 */ // Combiner Rule #64: unary_undef_to_undef @ [__unary_undef_to_undef_match_0[6]]
2762 /* 3449 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2763 /* 3452 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2764 /* 3454 */ GIR_EraseRootFromParent_Done,
2765 /* 3455 */ // Label 161: @3455
2766 /* 3455 */ GIM_Reject,
2767 /* 3456 */ // Label 44: @3456
2768 /* 3456 */ GIM_Try, /*On fail goto*//*Label 162*/ GIMT_Encode4(3477), // Rule ID 82 //
2769 /* 3461 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule58Enabled),
2770 /* 3464 */ // MIs[0] dst
2771 /* 3464 */ // No operand predicates
2772 /* 3464 */ // MIs[0] __undef_to_fp_zero_match_0.x
2773 /* 3464 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2774 /* 3468 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2775 /* 3472 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2776 /* 3474 */ // Combiner Rule #58: undef_to_fp_zero @ [__undef_to_fp_zero_match_0[1]]
2777 /* 3474 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
2778 /* 3477 */ // Label 162: @3477
2779 /* 3477 */ GIM_Try, /*On fail goto*//*Label 163*/ GIMT_Encode4(3492), // Rule ID 60 //
2780 /* 3482 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule41Enabled),
2781 /* 3485 */ // MIs[0] dst
2782 /* 3485 */ // No operand predicates
2783 /* 3485 */ // MIs[0] Operand 1
2784 /* 3485 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
2785 /* 3489 */ // Combiner Rule #41: itof_const_zero_fold_si
2786 /* 3489 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
2787 /* 3492 */ // Label 163: @3492
2788 /* 3492 */ GIM_Reject,
2789 /* 3493 */ // Label 45: @3493
2790 /* 3493 */ GIM_Try, /*On fail goto*//*Label 164*/ GIMT_Encode4(3514), // Rule ID 81 //
2791 /* 3498 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule58Enabled),
2792 /* 3501 */ // MIs[0] dst
2793 /* 3501 */ // No operand predicates
2794 /* 3501 */ // MIs[0] __undef_to_fp_zero_match_0.x
2795 /* 3501 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2796 /* 3505 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
2797 /* 3509 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2798 /* 3511 */ // Combiner Rule #58: undef_to_fp_zero @ [__undef_to_fp_zero_match_0[0]]
2799 /* 3511 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
2800 /* 3514 */ // Label 164: @3514
2801 /* 3514 */ GIM_Try, /*On fail goto*//*Label 165*/ GIMT_Encode4(3529), // Rule ID 61 //
2802 /* 3519 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule42Enabled),
2803 /* 3522 */ // MIs[0] dst
2804 /* 3522 */ // No operand predicates
2805 /* 3522 */ // MIs[0] Operand 1
2806 /* 3522 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
2807 /* 3526 */ // Combiner Rule #42: itof_const_zero_fold_ui
2808 /* 3526 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
2809 /* 3529 */ // Label 165: @3529
2810 /* 3529 */ GIM_Reject,
2811 /* 3530 */ // Label 46: @3530
2812 /* 3530 */ GIM_Try, /*On fail goto*//*Label 166*/ GIMT_Encode4(3559), // Rule ID 122 //
2813 /* 3535 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule77Enabled),
2814 /* 3538 */ // MIs[0] dst
2815 /* 3538 */ // No operand predicates
2816 /* 3538 */ // MIs[0] src
2817 /* 3538 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2818 /* 3542 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FABS),
2819 /* 3546 */ // MIs[1] __idempotent_prop_match_0.x
2820 /* 3546 */ // No operand predicates
2821 /* 3546 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2822 /* 3551 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2823 /* 3553 */ // Combiner Rule #77: idempotent_prop @ [__idempotent_prop_match_0[1]]
2824 /* 3553 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2825 /* 3558 */ GIR_EraseRootFromParent_Done,
2826 /* 3559 */ // Label 166: @3559
2827 /* 3559 */ GIM_Try, /*On fail goto*//*Label 167*/ GIMT_Encode4(3570), // Rule ID 48 //
2828 /* 3564 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
2829 /* 3567 */ // MIs[0] dst
2830 /* 3567 */ // No operand predicates
2831 /* 3567 */ // MIs[0] src0
2832 /* 3567 */ // No operand predicates
2833 /* 3567 */ // Combiner Rule #29: constant_fold_fabs
2834 /* 3567 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
2835 /* 3570 */ // Label 167: @3570
2836 /* 3570 */ GIM_Reject,
2837 /* 3571 */ // Label 47: @3571
2838 /* 3571 */ GIM_Try, /*On fail goto*//*Label 168*/ GIMT_Encode4(3600), // Rule ID 123 //
2839 /* 3576 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule77Enabled),
2840 /* 3579 */ // MIs[0] dst
2841 /* 3579 */ // No operand predicates
2842 /* 3579 */ // MIs[0] src
2843 /* 3579 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2844 /* 3583 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCANONICALIZE),
2845 /* 3587 */ // MIs[1] __idempotent_prop_match_0.x
2846 /* 3587 */ // No operand predicates
2847 /* 3587 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2848 /* 3592 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2849 /* 3594 */ // Combiner Rule #77: idempotent_prop @ [__idempotent_prop_match_0[2]]
2850 /* 3594 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2851 /* 3599 */ GIR_EraseRootFromParent_Done,
2852 /* 3600 */ // Label 168: @3600
2853 /* 3600 */ GIM_Reject,
2854 /* 3601 */ // Label 48: @3601
2855 /* 3601 */ GIM_Try, /*On fail goto*//*Label 169*/ GIMT_Encode4(3624), // Rule ID 72 //
2856 /* 3606 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled),
2857 /* 3609 */ // MIs[0] dst
2858 /* 3609 */ // No operand predicates
2859 /* 3609 */ // MIs[0] lhs
2860 /* 3609 */ // No operand predicates
2861 /* 3609 */ // MIs[0] rhs
2862 /* 3609 */ // No operand predicates
2863 /* 3609 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner13),
2864 /* 3613 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2865 /* 3618 */ // Combiner Rule #53: minmax_nan_num_lhs @ [__minmax_nan_num_lhs_match_0[0]]
2866 /* 3618 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2867 /* 3623 */ GIR_EraseRootFromParent_Done,
2868 /* 3624 */ // Label 169: @3624
2869 /* 3624 */ GIM_Try, /*On fail goto*//*Label 170*/ GIMT_Encode4(3647), // Rule ID 74 //
2870 /* 3629 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule54Enabled),
2871 /* 3632 */ // MIs[0] dst
2872 /* 3632 */ // No operand predicates
2873 /* 3632 */ // MIs[0] lhs
2874 /* 3632 */ // No operand predicates
2875 /* 3632 */ // MIs[0] rhs
2876 /* 3632 */ // No operand predicates
2877 /* 3632 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner14),
2878 /* 3636 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2879 /* 3641 */ // Combiner Rule #54: minmax_nan_num_rhs @ [__minmax_nan_num_rhs_match_0[0]]
2880 /* 3641 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2881 /* 3646 */ GIR_EraseRootFromParent_Done,
2882 /* 3647 */ // Label 170: @3647
2883 /* 3647 */ GIM_Reject,
2884 /* 3648 */ // Label 49: @3648
2885 /* 3648 */ GIM_Try, /*On fail goto*//*Label 171*/ GIMT_Encode4(3671), // Rule ID 73 //
2886 /* 3653 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled),
2887 /* 3656 */ // MIs[0] dst
2888 /* 3656 */ // No operand predicates
2889 /* 3656 */ // MIs[0] lhs
2890 /* 3656 */ // No operand predicates
2891 /* 3656 */ // MIs[0] rhs
2892 /* 3656 */ // No operand predicates
2893 /* 3656 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner13),
2894 /* 3660 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2895 /* 3665 */ // Combiner Rule #53: minmax_nan_num_lhs @ [__minmax_nan_num_lhs_match_0[1]]
2896 /* 3665 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2897 /* 3670 */ GIR_EraseRootFromParent_Done,
2898 /* 3671 */ // Label 171: @3671
2899 /* 3671 */ GIM_Try, /*On fail goto*//*Label 172*/ GIMT_Encode4(3694), // Rule ID 75 //
2900 /* 3676 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule54Enabled),
2901 /* 3679 */ // MIs[0] dst
2902 /* 3679 */ // No operand predicates
2903 /* 3679 */ // MIs[0] lhs
2904 /* 3679 */ // No operand predicates
2905 /* 3679 */ // MIs[0] rhs
2906 /* 3679 */ // No operand predicates
2907 /* 3679 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner14),
2908 /* 3683 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2909 /* 3688 */ // Combiner Rule #54: minmax_nan_num_rhs @ [__minmax_nan_num_rhs_match_0[1]]
2910 /* 3688 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2911 /* 3693 */ GIR_EraseRootFromParent_Done,
2912 /* 3694 */ // Label 172: @3694
2913 /* 3694 */ GIM_Reject,
2914 /* 3695 */ // Label 50: @3695
2915 /* 3695 */ GIM_Try, /*On fail goto*//*Label 173*/ GIMT_Encode4(3718), // Rule ID 76 //
2916 /* 3700 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule55Enabled),
2917 /* 3703 */ // MIs[0] dst
2918 /* 3703 */ // No operand predicates
2919 /* 3703 */ // MIs[0] lhs
2920 /* 3703 */ // No operand predicates
2921 /* 3703 */ // MIs[0] rhs
2922 /* 3703 */ // No operand predicates
2923 /* 3703 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner13),
2924 /* 3707 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2925 /* 3712 */ // Combiner Rule #55: minmax_nan_ieee_lhs @ [__minmax_nan_ieee_lhs_match_0[0]]
2926 /* 3712 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2927 /* 3717 */ GIR_EraseRootFromParent_Done,
2928 /* 3718 */ // Label 173: @3718
2929 /* 3718 */ GIM_Try, /*On fail goto*//*Label 174*/ GIMT_Encode4(3741), // Rule ID 78 //
2930 /* 3723 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled),
2931 /* 3726 */ // MIs[0] dst
2932 /* 3726 */ // No operand predicates
2933 /* 3726 */ // MIs[0] lhs
2934 /* 3726 */ // No operand predicates
2935 /* 3726 */ // MIs[0] rhs
2936 /* 3726 */ // No operand predicates
2937 /* 3726 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner14),
2938 /* 3730 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2939 /* 3735 */ // Combiner Rule #56: minmax_nan_ieee_rhs @ [__minmax_nan_ieee_rhs_match_0[0]]
2940 /* 3735 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2941 /* 3740 */ GIR_EraseRootFromParent_Done,
2942 /* 3741 */ // Label 174: @3741
2943 /* 3741 */ GIM_Reject,
2944 /* 3742 */ // Label 51: @3742
2945 /* 3742 */ GIM_Try, /*On fail goto*//*Label 175*/ GIMT_Encode4(3765), // Rule ID 77 //
2946 /* 3747 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule55Enabled),
2947 /* 3750 */ // MIs[0] dst
2948 /* 3750 */ // No operand predicates
2949 /* 3750 */ // MIs[0] lhs
2950 /* 3750 */ // No operand predicates
2951 /* 3750 */ // MIs[0] rhs
2952 /* 3750 */ // No operand predicates
2953 /* 3750 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner13),
2954 /* 3754 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2955 /* 3759 */ // Combiner Rule #55: minmax_nan_ieee_lhs @ [__minmax_nan_ieee_lhs_match_0[1]]
2956 /* 3759 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2957 /* 3764 */ GIR_EraseRootFromParent_Done,
2958 /* 3765 */ // Label 175: @3765
2959 /* 3765 */ GIM_Try, /*On fail goto*//*Label 176*/ GIMT_Encode4(3788), // Rule ID 79 //
2960 /* 3770 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled),
2961 /* 3773 */ // MIs[0] dst
2962 /* 3773 */ // No operand predicates
2963 /* 3773 */ // MIs[0] lhs
2964 /* 3773 */ // No operand predicates
2965 /* 3773 */ // MIs[0] rhs
2966 /* 3773 */ // No operand predicates
2967 /* 3773 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner14),
2968 /* 3777 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2969 /* 3782 */ // Combiner Rule #56: minmax_nan_ieee_rhs @ [__minmax_nan_ieee_rhs_match_0[1]]
2970 /* 3782 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
2971 /* 3787 */ GIR_EraseRootFromParent_Done,
2972 /* 3788 */ // Label 176: @3788
2973 /* 3788 */ GIM_Reject,
2974 /* 3789 */ // Label 52: @3789
2975 /* 3789 */ GIM_Try, /*On fail goto*//*Label 177*/ GIMT_Encode4(3826), // Rule ID 62 //
2976 /* 3794 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled),
2977 /* 3797 */ // MIs[0] dst
2978 /* 3797 */ // No operand predicates
2979 /* 3797 */ // MIs[0] base
2980 /* 3797 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2981 /* 3801 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
2982 /* 3805 */ // MIs[1] c1reg
2983 /* 3805 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/2, /*MI*/1, /*OpIdx*/1, // MIs[2]
2984 /* 3809 */ GIM_CheckOpcode, /*MI*/2, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2985 /* 3813 */ // MIs[2] c1imm
2986 /* 3813 */ // No operand predicates
2987 /* 3813 */ // MIs[0] c2reg
2988 /* 3813 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/3, /*MI*/0, /*OpIdx*/2, // MIs[3]
2989 /* 3817 */ GIM_CheckOpcode, /*MI*/3, GIMT_Encode2(TargetOpcode::G_CONSTANT),
2990 /* 3821 */ // MIs[3] c2imm
2991 /* 3821 */ // No operand predicates
2992 /* 3821 */ GIM_CheckIsSafeToFold, /*NumInsns*/3,
2993 /* 3823 */ // Combiner Rule #43: const_ptradd_to_i2p
2994 /* 3823 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
2995 /* 3826 */ // Label 177: @3826
2996 /* 3826 */ GIM_Try, /*On fail goto*//*Label 178*/ GIMT_Encode4(3849), // Rule ID 9 //
2997 /* 3831 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
2998 /* 3834 */ // MIs[0] dst
2999 /* 3834 */ // No operand predicates
3000 /* 3834 */ // MIs[0] lhs
3001 /* 3834 */ // No operand predicates
3002 /* 3834 */ // MIs[0] Operand 2
3003 /* 3834 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
3004 /* 3838 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3005 /* 3843 */ // Combiner Rule #2: right_identity_zero @ [__right_identity_zero_match_0[7]]
3006 /* 3843 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
3007 /* 3848 */ GIR_EraseRootFromParent_Done,
3008 /* 3849 */ // Label 178: @3849
3009 /* 3849 */ GIM_Try, /*On fail goto*//*Label 179*/ GIMT_Encode4(3860), // Rule ID 45 //
3010 /* 3854 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
3011 /* 3857 */ // MIs[0] dst
3012 /* 3857 */ // No operand predicates
3013 /* 3857 */ // MIs[0] base
3014 /* 3857 */ // No operand predicates
3015 /* 3857 */ // MIs[0] offset
3016 /* 3857 */ // No operand predicates
3017 /* 3857 */ // Combiner Rule #26: reassoc_ptradd
3018 /* 3857 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
3019 /* 3860 */ // Label 179: @3860
3020 /* 3860 */ GIM_Reject,
3021 /* 3861 */ // Label 53: @3861
3022 /* 3861 */ GIM_Try, /*On fail goto*//*Label 180*/ GIMT_Encode4(3882), // Rule ID 95 //
3023 /* 3866 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule63Enabled),
3024 /* 3869 */ // MIs[0] dst
3025 /* 3869 */ // No operand predicates
3026 /* 3869 */ // MIs[0] __unary_undef_to_zero_match_0.x
3027 /* 3869 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
3028 /* 3873 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3029 /* 3877 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
3030 /* 3879 */ // Combiner Rule #63: unary_undef_to_zero @ [__unary_undef_to_zero_match_0[0]]
3031 /* 3879 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
3032 /* 3882 */ // Label 180: @3882
3033 /* 3882 */ GIM_Reject,
3034 /* 3883 */ // Label 54: @3883
3035 /* 3883 */ GIM_Try, /*On fail goto*//*Label 181*/ GIMT_Encode4(3901), // Rule ID 113 //
3036 /* 3888 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule70Enabled),
3037 /* 3891 */ // MIs[0] root
3038 /* 3891 */ // No operand predicates
3039 /* 3891 */ // MIs[0] vec
3040 /* 3891 */ // No operand predicates
3041 /* 3891 */ // MIs[0] elt
3042 /* 3891 */ // No operand predicates
3043 /* 3891 */ // MIs[0] idx
3044 /* 3891 */ // No operand predicates
3045 /* 3891 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner18),
3046 /* 3895 */ // Combiner Rule #70: insert_vec_elt_out_of_bounds
3047 /* 3895 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3048 /* 3898 */ GIR_RootToRootCopy, /*OpIdx*/0, // root
3049 /* 3900 */ GIR_EraseRootFromParent_Done,
3050 /* 3901 */ // Label 181: @3901
3051 /* 3901 */ GIM_Reject,
3052 /* 3902 */ // Label 55: @3902
3053 /* 3902 */ GIM_Try, /*On fail goto*//*Label 182*/ GIMT_Encode4(3920), // Rule ID 114 //
3054 /* 3907 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule71Enabled),
3055 /* 3910 */ // MIs[0] root
3056 /* 3910 */ // No operand predicates
3057 /* 3910 */ // MIs[0] vec
3058 /* 3910 */ // No operand predicates
3059 /* 3910 */ // MIs[0] idx
3060 /* 3910 */ // No operand predicates
3061 /* 3910 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner18),
3062 /* 3914 */ // Combiner Rule #71: extract_vec_elt_out_of_bounds
3063 /* 3914 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3064 /* 3917 */ GIR_RootToRootCopy, /*OpIdx*/0, // root
3065 /* 3919 */ GIR_EraseRootFromParent_Done,
3066 /* 3920 */ // Label 182: @3920
3067 /* 3920 */ GIM_Reject,
3068 /* 3921 */ // Label 56: @3921
3069 /* 3921 */ GIM_Try, /*On fail goto*//*Label 183*/ GIMT_Encode4(3939), // Rule ID 109 //
3070 /* 3926 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule66Enabled),
3071 /* 3929 */ // MIs[0] root
3072 /* 3929 */ // No operand predicates
3073 /* 3929 */ // MIs[0] src1
3074 /* 3929 */ // No operand predicates
3075 /* 3929 */ // MIs[0] src2
3076 /* 3929 */ // No operand predicates
3077 /* 3929 */ // MIs[0] mask
3078 /* 3929 */ // No operand predicates
3079 /* 3929 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner15),
3080 /* 3933 */ // Combiner Rule #66: propagate_undef_all_ops_shuffle_vector
3081 /* 3933 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3082 /* 3936 */ GIR_RootToRootCopy, /*OpIdx*/0, // root
3083 /* 3938 */ GIR_EraseRootFromParent_Done,
3084 /* 3939 */ // Label 183: @3939
3085 /* 3939 */ GIM_Try, /*On fail goto*//*Label 184*/ GIMT_Encode4(3957), // Rule ID 111 //
3086 /* 3944 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule68Enabled),
3087 /* 3947 */ // MIs[0] dst
3088 /* 3947 */ // No operand predicates
3089 /* 3947 */ // MIs[0] src1
3090 /* 3947 */ // No operand predicates
3091 /* 3947 */ // MIs[0] src2
3092 /* 3947 */ // No operand predicates
3093 /* 3947 */ // MIs[0] mask
3094 /* 3947 */ // No operand predicates
3095 /* 3947 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner16),
3096 /* 3951 */ // Combiner Rule #68: propagate_undef_shuffle_mask
3097 /* 3951 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
3098 /* 3954 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
3099 /* 3956 */ GIR_EraseRootFromParent_Done,
3100 /* 3957 */ // Label 184: @3957
3101 /* 3957 */ GIM_Reject,
3102 /* 3958 */ // Label 57: @3958
3103 /* 3958 */ GIM_Try, /*On fail goto*//*Label 185*/ GIMT_Encode4(3969), // Rule ID 53 //
3104 /* 3963 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
3105 /* 3966 */ // MIs[0] dst
3106 /* 3966 */ // No operand predicates
3107 /* 3966 */ // MIs[0] src0
3108 /* 3966 */ // No operand predicates
3109 /* 3966 */ // Combiner Rule #34: constant_fold_fceil
3110 /* 3966 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
3111 /* 3969 */ // Label 185: @3969
3112 /* 3969 */ GIM_Reject,
3113 /* 3970 */ // Label 58: @3970
3114 /* 3970 */ GIM_Try, /*On fail goto*//*Label 186*/ GIMT_Encode4(3981), // Rule ID 49 //
3115 /* 3975 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
3116 /* 3978 */ // MIs[0] dst
3117 /* 3978 */ // No operand predicates
3118 /* 3978 */ // MIs[0] src0
3119 /* 3978 */ // No operand predicates
3120 /* 3978 */ // Combiner Rule #30: constant_fold_fsqrt
3121 /* 3978 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
3122 /* 3981 */ // Label 186: @3981
3123 /* 3981 */ GIM_Reject,
3124 /* 3982 */ // Label 59: @3982
3125 /* 3982 */ GIM_Try, /*On fail goto*//*Label 187*/ GIMT_Encode4(3993), // Rule ID 54 //
3126 /* 3987 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled),
3127 /* 3990 */ // MIs[0] dst
3128 /* 3990 */ // No operand predicates
3129 /* 3990 */ // MIs[0] src0
3130 /* 3990 */ // No operand predicates
3131 /* 3990 */ // Combiner Rule #35: constant_fold_ffloor
3132 /* 3990 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
3133 /* 3993 */ // Label 187: @3993
3134 /* 3993 */ GIM_Reject,
3135 /* 3994 */ // Label 60: @3994
3136 /* 3994 */ GIM_Try, /*On fail goto*//*Label 188*/ GIMT_Encode4(4005), // Rule ID 58 //
3137 /* 3999 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule39Enabled),
3138 /* 4002 */ // MIs[0] dst
3139 /* 4002 */ // No operand predicates
3140 /* 4002 */ // MIs[0] src0
3141 /* 4002 */ // No operand predicates
3142 /* 4002 */ // Combiner Rule #39: constant_fold_frint
3143 /* 4002 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
3144 /* 4005 */ // Label 188: @4005
3145 /* 4005 */ GIM_Reject,
3146 /* 4006 */ // Label 61: @4006
3147 /* 4006 */ GIM_Try, /*On fail goto*//*Label 189*/ GIMT_Encode4(4017), // Rule ID 59 //
3148 /* 4011 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule40Enabled),
3149 /* 4014 */ // MIs[0] dst
3150 /* 4014 */ // No operand predicates
3151 /* 4014 */ // MIs[0] src0
3152 /* 4014 */ // No operand predicates
3153 /* 4014 */ // Combiner Rule #40: constant_fold_fnearbyint
3154 /* 4014 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
3155 /* 4017 */ // Label 189: @4017
3156 /* 4017 */ GIM_Reject,
3157 /* 4018 */ // Label 62: @4018
3158 /* 4018 */ GIM_Reject,
3159 /* 4019 */ }; // Size: 4019 bytes
3160 return MatchTable0;
3161}
3162#undef GIMT_Encode2
3163#undef GIMT_Encode4
3164#undef GIMT_Encode8
3165
3166LLT X86PreLegalizerCombinerImpl::getLLTForHwMode(unsigned Index) const {
3167 llvm_unreachable("Unexpected index");
3168}
3169
3170
3171#endif // GET_GICOMBINER_IMPL
3172
3173#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
3174
3175AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
3176AvailableFunctionFeatures()
3177
3178#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
3179
3180#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
3181
3182, State(0),
3183ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
3184
3185#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
3186
3187