1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* RISCVPostLegalizerCombinerImpl 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 RISCVPostLegalizerCombinerImplRuleConfig {
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 10: // 2 strings to match.
42 switch (RuleIdentifier[0]) {
43 default: break;
44 case 'p': // 1 string to match.
45 if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p", 9) != 0)
46 break;
47 return 11; // "p2i_to_i2p"
48 case 's': // 1 string to match.
49 if (memcmp(RuleIdentifier.data()+1, "ub_to_add", 9) != 0)
50 break;
51 return 0; // "sub_to_add"
52 }
53 break;
54 case 11: // 1 string to match.
55 if (memcmp(RuleIdentifier.data()+0, "add_sub_reg", 11) != 0)
56 break;
57 return 19; // "add_sub_reg"
58 case 13: // 3 strings to match.
59 switch (RuleIdentifier[0]) {
60 default: break;
61 case 'l': // 1 string to match.
62 if (memcmp(RuleIdentifier.data()+1, "oad_and_mask", 12) != 0)
63 break;
64 return 2; // "load_and_mask"
65 case 'r': // 1 string to match.
66 if (memcmp(RuleIdentifier.data()+1, "edundant_and", 12) != 0)
67 break;
68 return 3; // "redundant_and"
69 case 's': // 1 string to match.
70 if (memcmp(RuleIdentifier.data()+1, "ame_val_zero", 12) != 0)
71 break;
72 return 8; // "same_val_zero"
73 }
74 break;
75 case 14: // 2 strings to match.
76 switch (RuleIdentifier[0]) {
77 default: break;
78 case 'b': // 1 string to match.
79 if (memcmp(RuleIdentifier.data()+1, "inop_same_val", 13) != 0)
80 break;
81 return 7; // "binop_same_val"
82 case 'f': // 1 string to match.
83 if (memcmp(RuleIdentifier.data()+1, "neg_fneg_fold", 13) != 0)
84 break;
85 return 16; // "fneg_fneg_fold"
86 }
87 break;
88 case 15: // 2 strings to match.
89 switch (RuleIdentifier[0]) {
90 default: break;
91 case 'e': // 1 string to match.
92 if (memcmp(RuleIdentifier.data()+1, "xtending_loads", 14) != 0)
93 break;
94 return 1; // "extending_loads"
95 case 'i': // 1 string to match.
96 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i_zext", 14) != 0)
97 break;
98 return 13; // "i2p_to_p2i_zext"
99 }
100 break;
101 case 16: // 1 string to match.
102 if (memcmp(RuleIdentifier.data()+0, "i2p_to_p2i_trunc", 16) != 0)
103 break;
104 return 14; // "i2p_to_p2i_trunc"
105 case 17: // 2 strings to match.
106 switch (RuleIdentifier[0]) {
107 default: break;
108 case 'a': // 1 string to match.
109 if (memcmp(RuleIdentifier.data()+1, "nyext_trunc_fold", 16) != 0)
110 break;
111 return 15; // "anyext_trunc_fold"
112 case 's': // 1 string to match.
113 if (memcmp(RuleIdentifier.data()+1, "hift_immed_chain", 16) != 0)
114 break;
115 return 30; // "shift_immed_chain"
116 }
117 break;
118 case 18: // 3 strings to match.
119 switch (RuleIdentifier[0]) {
120 default: break;
121 case 'b': // 1 string to match.
122 if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero", 17) != 0)
123 break;
124 return 9; // "binop_left_to_zero"
125 case 'f': // 2 strings to match.
126 switch (RuleIdentifier[1]) {
127 default: break;
128 case 'o': // 1 string to match.
129 if (memcmp(RuleIdentifier.data()+2, "ld_fp_zero_store", 16) != 0)
130 break;
131 return 61; // "fold_fp_zero_store"
132 case 'p': // 1 string to match.
133 if (memcmp(RuleIdentifier.data()+2, "trunc_fpext_fold", 16) != 0)
134 break;
135 return 26; // "fptrunc_fpext_fold"
136 }
137 break;
138 }
139 break;
140 case 19: // 3 strings to match.
141 switch (RuleIdentifier[0]) {
142 default: break;
143 case 'b': // 1 string to match.
144 if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero", 18) != 0)
145 break;
146 return 10; // "binop_right_to_zero"
147 case 'r': // 1 string to match.
148 if (memcmp(RuleIdentifier.data()+1, "ight_identity_zero", 18) != 0)
149 break;
150 return 6; // "right_identity_zero"
151 case 's': // 1 string to match.
152 if (memcmp(RuleIdentifier.data()+1, "implify_neg_minmax", 18) != 0)
153 break;
154 return 60; // "simplify_neg_minmax"
155 }
156 break;
157 case 20: // 2 strings to match.
158 switch (RuleIdentifier[0]) {
159 default: break;
160 case 'b': // 1 string to match.
161 if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_fold", 19) != 0)
162 break;
163 return 24; // "bitcast_bitcast_fold"
164 case 'i': // 1 string to match.
165 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i_same_size", 19) != 0)
166 break;
167 return 12; // "i2p_to_p2i_same_size"
168 }
169 break;
170 case 21: // 2 strings to match.
171 switch (RuleIdentifier[0]) {
172 default: break;
173 case 'r': // 1 string to match.
174 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_fp", 20) != 0)
175 break;
176 return 18; // "right_identity_one_fp"
177 case 's': // 1 string to match.
178 if (memcmp(RuleIdentifier.data()+1, "elect_same_val_equiv", 20) != 0)
179 break;
180 return 5; // "select_same_val_equiv"
181 }
182 break;
183 case 22: // 2 strings to match.
184 switch (RuleIdentifier[0]) {
185 default: break;
186 case 'r': // 1 string to match.
187 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_int", 21) != 0)
188 break;
189 return 17; // "right_identity_one_int"
190 case 't': // 1 string to match.
191 if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold", 21) != 0)
192 break;
193 return 22; // "trunc_buildvector_fold"
194 }
195 break;
196 case 23: // 1 string to match.
197 if (memcmp(RuleIdentifier.data()+0, "select_same_val_trivial", 23) != 0)
198 break;
199 return 4; // "select_same_val_trivial"
200 case 25: // 1 string to match.
201 if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_one_fp", 25) != 0)
202 break;
203 return 29; // "right_identity_neg_one_fp"
204 case 26: // 2 strings to match.
205 switch (RuleIdentifier[0]) {
206 default: break;
207 case 'b': // 1 string to match.
208 if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_to_bitcast", 25) != 0)
209 break;
210 return 25; // "bitcast_bitcast_to_bitcast"
211 case 'r': // 1 string to match.
212 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp", 25) != 0)
213 break;
214 return 27; // "right_identity_neg_zero_fp"
215 }
216 break;
217 case 27: // 1 string to match.
218 if (memcmp(RuleIdentifier.data()+0, "trunc_lshr_buildvector_fold", 27) != 0)
219 break;
220 return 23; // "trunc_lshr_buildvector_fold"
221 case 28: // 2 strings to match.
222 switch (RuleIdentifier[0]) {
223 default: break;
224 case 'G': // 1 string to match.
225 if (memcmp(RuleIdentifier.data()+1, "_OR_commute_constant_to_rhs", 27) != 0)
226 break;
227 return 34; // "G_OR_commute_constant_to_rhs"
228 case 'b': // 1 string to match.
229 if (memcmp(RuleIdentifier.data()+1, "uildvector_identity_fold_bv", 27) != 0)
230 break;
231 return 20; // "buildvector_identity_fold_bv"
232 }
233 break;
234 case 29: // 5 strings to match.
235 switch (RuleIdentifier[0]) {
236 default: break;
237 case 'G': // 4 strings to match.
238 if (RuleIdentifier[1] != '_')
239 break;
240 switch (RuleIdentifier[2]) {
241 default: break;
242 case 'A': // 2 strings to match.
243 switch (RuleIdentifier[3]) {
244 default: break;
245 case 'D': // 1 string to match.
246 if (memcmp(RuleIdentifier.data()+4, "D_commute_constant_to_rhs", 25) != 0)
247 break;
248 return 31; // "G_ADD_commute_constant_to_rhs"
249 case 'N': // 1 string to match.
250 if (memcmp(RuleIdentifier.data()+4, "D_commute_constant_to_rhs", 25) != 0)
251 break;
252 return 33; // "G_AND_commute_constant_to_rhs"
253 }
254 break;
255 case 'M': // 1 string to match.
256 if (memcmp(RuleIdentifier.data()+3, "UL_commute_constant_to_rhs", 26) != 0)
257 break;
258 return 32; // "G_MUL_commute_constant_to_rhs"
259 case 'X': // 1 string to match.
260 if (memcmp(RuleIdentifier.data()+3, "OR_commute_constant_to_rhs", 26) != 0)
261 break;
262 return 35; // "G_XOR_commute_constant_to_rhs"
263 }
264 break;
265 case 'b': // 1 string to match.
266 if (memcmp(RuleIdentifier.data()+1, "uildvector_identity_fold_bvt", 28) != 0)
267 break;
268 return 21; // "buildvector_identity_fold_bvt"
269 }
270 break;
271 case 30: // 5 strings to match.
272 switch (RuleIdentifier[0]) {
273 default: break;
274 case 'G': // 4 strings to match.
275 if (RuleIdentifier[1] != '_')
276 break;
277 switch (RuleIdentifier[2]) {
278 default: break;
279 case 'S': // 2 strings to match.
280 if (RuleIdentifier[3] != 'M')
281 break;
282 switch (RuleIdentifier[4]) {
283 default: break;
284 case 'A': // 1 string to match.
285 if (memcmp(RuleIdentifier.data()+5, "X_commute_constant_to_rhs", 25) != 0)
286 break;
287 return 37; // "G_SMAX_commute_constant_to_rhs"
288 case 'I': // 1 string to match.
289 if (memcmp(RuleIdentifier.data()+5, "N_commute_constant_to_rhs", 25) != 0)
290 break;
291 return 36; // "G_SMIN_commute_constant_to_rhs"
292 }
293 break;
294 case 'U': // 2 strings to match.
295 if (RuleIdentifier[3] != 'M')
296 break;
297 switch (RuleIdentifier[4]) {
298 default: break;
299 case 'A': // 1 string to match.
300 if (memcmp(RuleIdentifier.data()+5, "X_commute_constant_to_rhs", 25) != 0)
301 break;
302 return 39; // "G_UMAX_commute_constant_to_rhs"
303 case 'I': // 1 string to match.
304 if (memcmp(RuleIdentifier.data()+5, "N_commute_constant_to_rhs", 25) != 0)
305 break;
306 return 38; // "G_UMIN_commute_constant_to_rhs"
307 }
308 break;
309 }
310 break;
311 case 'r': // 1 string to match.
312 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp_nsz", 29) != 0)
313 break;
314 return 28; // "right_identity_neg_zero_fp_nsz"
315 }
316 break;
317 case 31: // 6 strings to match.
318 if (memcmp(RuleIdentifier.data()+0, "G_", 2) != 0)
319 break;
320 switch (RuleIdentifier[2]) {
321 default: break;
322 case 'S': // 3 strings to match.
323 switch (RuleIdentifier[3]) {
324 default: break;
325 case 'A': // 1 string to match.
326 if (memcmp(RuleIdentifier.data()+4, "DDO_commute_constant_to_rhs", 27) != 0)
327 break;
328 return 49; // "G_SADDO_commute_constant_to_rhs"
329 case 'M': // 2 strings to match.
330 if (memcmp(RuleIdentifier.data()+4, "UL", 2) != 0)
331 break;
332 switch (RuleIdentifier[6]) {
333 default: break;
334 case 'H': // 1 string to match.
335 if (memcmp(RuleIdentifier.data()+7, "_commute_constant_to_rhs", 24) != 0)
336 break;
337 return 41; // "G_SMULH_commute_constant_to_rhs"
338 case 'O': // 1 string to match.
339 if (memcmp(RuleIdentifier.data()+7, "_commute_constant_to_rhs", 24) != 0)
340 break;
341 return 51; // "G_SMULO_commute_constant_to_rhs"
342 }
343 break;
344 }
345 break;
346 case 'U': // 3 strings to match.
347 switch (RuleIdentifier[3]) {
348 default: break;
349 case 'A': // 1 string to match.
350 if (memcmp(RuleIdentifier.data()+4, "DDO_commute_constant_to_rhs", 27) != 0)
351 break;
352 return 48; // "G_UADDO_commute_constant_to_rhs"
353 case 'M': // 2 strings to match.
354 if (memcmp(RuleIdentifier.data()+4, "UL", 2) != 0)
355 break;
356 switch (RuleIdentifier[6]) {
357 default: break;
358 case 'H': // 1 string to match.
359 if (memcmp(RuleIdentifier.data()+7, "_commute_constant_to_rhs", 24) != 0)
360 break;
361 return 40; // "G_UMULH_commute_constant_to_rhs"
362 case 'O': // 1 string to match.
363 if (memcmp(RuleIdentifier.data()+7, "_commute_constant_to_rhs", 24) != 0)
364 break;
365 return 50; // "G_UMULO_commute_constant_to_rhs"
366 }
367 break;
368 }
369 break;
370 }
371 break;
372 case 33: // 6 strings to match.
373 if (memcmp(RuleIdentifier.data()+0, "G_", 2) != 0)
374 break;
375 switch (RuleIdentifier[2]) {
376 default: break;
377 case 'F': // 2 strings to match.
378 switch (RuleIdentifier[3]) {
379 default: break;
380 case 'A': // 1 string to match.
381 if (memcmp(RuleIdentifier.data()+4, "DD_commute_fp_constant_to_rhs", 29) != 0)
382 break;
383 return 52; // "G_FADD_commute_fp_constant_to_rhs"
384 case 'M': // 1 string to match.
385 if (memcmp(RuleIdentifier.data()+4, "UL_commute_fp_constant_to_rhs", 29) != 0)
386 break;
387 return 53; // "G_FMUL_commute_fp_constant_to_rhs"
388 }
389 break;
390 case 'S': // 2 strings to match.
391 switch (RuleIdentifier[3]) {
392 default: break;
393 case 'A': // 1 string to match.
394 if (memcmp(RuleIdentifier.data()+4, "DDSAT_commute_constant_to_rhs", 29) != 0)
395 break;
396 return 43; // "G_SADDSAT_commute_constant_to_rhs"
397 case 'M': // 1 string to match.
398 if (memcmp(RuleIdentifier.data()+4, "ULFIX_commute_constant_to_rhs", 29) != 0)
399 break;
400 return 44; // "G_SMULFIX_commute_constant_to_rhs"
401 }
402 break;
403 case 'U': // 2 strings to match.
404 switch (RuleIdentifier[3]) {
405 default: break;
406 case 'A': // 1 string to match.
407 if (memcmp(RuleIdentifier.data()+4, "DDSAT_commute_constant_to_rhs", 29) != 0)
408 break;
409 return 42; // "G_UADDSAT_commute_constant_to_rhs"
410 case 'M': // 1 string to match.
411 if (memcmp(RuleIdentifier.data()+4, "ULFIX_commute_constant_to_rhs", 29) != 0)
412 break;
413 return 45; // "G_UMULFIX_commute_constant_to_rhs"
414 }
415 break;
416 }
417 break;
418 case 36: // 4 strings to match.
419 if (memcmp(RuleIdentifier.data()+0, "G_", 2) != 0)
420 break;
421 switch (RuleIdentifier[2]) {
422 default: break;
423 case 'F': // 2 strings to match.
424 if (RuleIdentifier[3] != 'M')
425 break;
426 switch (RuleIdentifier[4]) {
427 default: break;
428 case 'A': // 1 string to match.
429 if (memcmp(RuleIdentifier.data()+5, "XNUM_commute_fp_constant_to_rhs", 31) != 0)
430 break;
431 return 55; // "G_FMAXNUM_commute_fp_constant_to_rhs"
432 case 'I': // 1 string to match.
433 if (memcmp(RuleIdentifier.data()+5, "NNUM_commute_fp_constant_to_rhs", 31) != 0)
434 break;
435 return 54; // "G_FMINNUM_commute_fp_constant_to_rhs"
436 }
437 break;
438 case 'S': // 1 string to match.
439 if (memcmp(RuleIdentifier.data()+3, "MULFIXSAT_commute_constant_to_rhs", 33) != 0)
440 break;
441 return 46; // "G_SMULFIXSAT_commute_constant_to_rhs"
442 case 'U': // 1 string to match.
443 if (memcmp(RuleIdentifier.data()+3, "MULFIXSAT_commute_constant_to_rhs", 33) != 0)
444 break;
445 return 47; // "G_UMULFIXSAT_commute_constant_to_rhs"
446 }
447 break;
448 case 37: // 2 strings to match.
449 if (memcmp(RuleIdentifier.data()+0, "G_FM", 4) != 0)
450 break;
451 switch (RuleIdentifier[4]) {
452 default: break;
453 case 'A': // 1 string to match.
454 if (memcmp(RuleIdentifier.data()+5, "XIMUM_commute_fp_constant_to_rhs", 32) != 0)
455 break;
456 return 59; // "G_FMAXIMUM_commute_fp_constant_to_rhs"
457 case 'I': // 1 string to match.
458 if (memcmp(RuleIdentifier.data()+5, "NIMUM_commute_fp_constant_to_rhs", 32) != 0)
459 break;
460 return 58; // "G_FMINIMUM_commute_fp_constant_to_rhs"
461 }
462 break;
463 case 41: // 2 strings to match.
464 if (memcmp(RuleIdentifier.data()+0, "G_FM", 4) != 0)
465 break;
466 switch (RuleIdentifier[4]) {
467 default: break;
468 case 'A': // 1 string to match.
469 if (memcmp(RuleIdentifier.data()+5, "XNUM_IEEE_commute_fp_constant_to_rhs", 36) != 0)
470 break;
471 return 57; // "G_FMAXNUM_IEEE_commute_fp_constant_to_rhs"
472 case 'I': // 1 string to match.
473 if (memcmp(RuleIdentifier.data()+5, "NNUM_IEEE_commute_fp_constant_to_rhs", 36) != 0)
474 break;
475 return 56; // "G_FMINNUM_IEEE_commute_fp_constant_to_rhs"
476 }
477 break;
478 }
479#endif // ifndef NDEBUG
480
481 return std::nullopt;
482}
483static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
484 std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
485 if (!RangePair.second.empty()) {
486 const auto First = getRuleIdxForIdentifier(RangePair.first);
487 const auto Last = getRuleIdxForIdentifier(RangePair.second);
488 if (!First || !Last)
489 return std::nullopt;
490 if (First >= Last)
491 report_fatal_error("Beginning of range should be before end of range");
492 return {{*First, *Last + 1}};
493 }
494 if (RangePair.first == "*") {
495 return {{0, 62}};
496 }
497 const auto I = getRuleIdxForIdentifier(RangePair.first);
498 if (!I)
499 return std::nullopt;
500 return {{*I, *I + 1}};
501}
502
503bool RISCVPostLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
504 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
505 if (!MaybeRange)
506 return false;
507 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
508 DisabledRules.reset(I);
509 return true;
510}
511
512bool RISCVPostLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
513 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
514 if (!MaybeRange)
515 return false;
516 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
517 DisabledRules.set(I);
518 return true;
519}
520
521static std::vector<std::string> RISCVPostLegalizerCombinerOption;
522static cl::list<std::string> RISCVPostLegalizerCombinerDisableOption(
523 "riscvpostlegalizercombiner-disable-rule",
524 cl::desc("Disable one or more combiner rules temporarily in the RISCVPostLegalizerCombiner pass"),
525 cl::CommaSeparated,
526 cl::Hidden,
527 cl::cat(GICombinerOptionCategory),
528 cl::callback([](const std::string &Str) {
529 RISCVPostLegalizerCombinerOption.push_back(Str);
530 }));
531static cl::list<std::string> RISCVPostLegalizerCombinerOnlyEnableOption(
532 "riscvpostlegalizercombiner-only-enable-rule",
533 cl::desc("Disable all rules in the RISCVPostLegalizerCombiner pass then re-enable the specified ones"),
534 cl::Hidden,
535 cl::cat(GICombinerOptionCategory),
536 cl::callback([](const std::string &CommaSeparatedArg) {
537 StringRef Str = CommaSeparatedArg;
538 RISCVPostLegalizerCombinerOption.push_back("*");
539 do {
540 auto X = Str.split(",");
541 RISCVPostLegalizerCombinerOption.push_back(("!" + X.first).str());
542 Str = X.second;
543 } while (!Str.empty());
544 }));
545
546
547bool RISCVPostLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
548 return !DisabledRules.test(RuleID);
549}
550bool RISCVPostLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
551 for (StringRef Identifier : RISCVPostLegalizerCombinerOption) {
552 bool Enabled = Identifier.consume_front("!");
553 if (Enabled && !setRuleEnabled(Identifier))
554 return false;
555 if (!Enabled && !setRuleDisabled(Identifier))
556 return false;
557 }
558 return true;
559}
560
561
562#endif // GET_GICOMBINER_TYPES
563
564#ifdef GET_GICOMBINER_TYPES
565
566const unsigned MAX_SUBTARGET_PREDICATES = 0;
567using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
568
569#endif // GET_GICOMBINER_TYPES
570
571#ifdef GET_GICOMBINER_CLASS_MEMBERS
572
573 bool canMatchOpcode(unsigned Opc) const override;
574 uint32_t getRootFlagsToDrop() const override;
575
576#endif // GET_GICOMBINER_CLASS_MEMBERS
577
578#ifdef GET_GICOMBINER_CLASS_MEMBERS
579
580PredicateBitset AvailableModuleFeatures;
581mutable PredicateBitset AvailableFunctionFeatures;
582PredicateBitset getAvailableFeatures() const {
583 return AvailableModuleFeatures | AvailableFunctionFeatures;
584}
585PredicateBitset
586computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const;
587PredicateBitset
588computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget,
589 const MachineFunction *MF) const;
590void setupGeneratedPerFunctionState(MachineFunction &MF) override;
591
592#endif // GET_GICOMBINER_CLASS_MEMBERS
593
594#ifdef GET_GICOMBINER_CLASS_MEMBERS
595
596 mutable MatcherState State;
597 typedef ComplexRendererFns(RISCVPostLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
598 typedef void(RISCVPostLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
599 const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
600 static RISCVPostLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
601 static RISCVPostLegalizerCombinerImpl::CustomRendererFn CustomRenderers[];
602 bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
603 bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
604 bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
605 const uint8_t *getMatchTable() const override;
606 LLT getLLTForHwMode(unsigned Index) const override;
607 bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
608 bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override;
609 bool testSimplePredicate(unsigned PredicateID) const override;
610 bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
611
612#endif // GET_GICOMBINER_CLASS_MEMBERS
613
614#ifdef GET_GICOMBINER_IMPL
615
616// LLT Objects.
617enum {
618 GILLT_s1,
619};
620const static size_t NumTypeObjects = 1;
621const static LLT TypeObjects[] = {
622 LLT::scalar(1),
623};
624
625// Bits for subtarget features that participate in instruction matching.
626enum SubtargetFeatureBits : uint8_t {
627};
628
629PredicateBitset RISCVPostLegalizerCombinerImpl::
630computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const {
631 PredicateBitset Features{};
632 return Features;
633}
634
635void RISCVPostLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
636 AvailableFunctionFeatures = computeAvailableFunctionFeatures((const RISCVSubtarget *)&MF.getSubtarget(), &MF);
637}
638PredicateBitset RISCVPostLegalizerCombinerImpl::
639computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, const MachineFunction *MF) const {
640 PredicateBitset Features{};
641 return Features;
642}
643
644// Feature bitsets.
645enum {
646 GIFBS_Invalid,
647};
648constexpr static PredicateBitset FeatureBitsets[] {
649 {}, // GIFBS_Invalid
650};
651
652// ComplexPattern predicates.
653enum {
654 GICP_Invalid,
655};
656// See constructor for table contents
657
658RISCVPostLegalizerCombinerImpl::ComplexMatcherMemFn
659RISCVPostLegalizerCombinerImpl::ComplexPredicateFns[] = {
660 nullptr, // GICP_Invalid
661};
662
663enum {
664 GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1,
665 GICXXPred_MI_Predicate_GICombiner1,
666 GICXXPred_MI_Predicate_GICombiner2,
667 GICXXPred_MI_Predicate_GICombiner3,
668 GICXXPred_MI_Predicate_GICombiner4,
669 GICXXPred_MI_Predicate_GICombiner5,
670 GICXXPred_MI_Predicate_GICombiner6,
671 GICXXPred_MI_Predicate_GICombiner7,
672 GICXXPred_MI_Predicate_GICombiner8,
673 GICXXPred_MI_Predicate_GICombiner9,
674 GICXXPred_MI_Predicate_GICombiner10,
675 GICXXPred_MI_Predicate_GICombiner11,
676 GICXXPred_MI_Predicate_GICombiner12,
677};
678bool RISCVPostLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
679 switch (PredicateID) {
680 case GICXXPred_MI_Predicate_GICombiner0: {
681 return Helper.matchSelectSameVal(*State.MIs[0]);
682 }
683 case GICXXPred_MI_Predicate_GICombiner1: {
684 return Helper.matchConstantOp(State.MIs[0]->getOperand(1), 0);
685 }
686 case GICXXPred_MI_Predicate_GICombiner2: {
687 return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());
688 }
689 case GICXXPred_MI_Predicate_GICombiner3: {
690 return MRI.getType(State.MIs[0]->getOperand(0).getReg()).getSizeInBits() ==
691 MRI.getType(State.MIs[1]->getOperand(1).getReg()).getSizeInBits();
692 }
693 case GICXXPred_MI_Predicate_GICombiner4: {
694 return MRI.getType(State.MIs[0]->getOperand(0).getReg()).getSizeInBits() >
695 MRI.getType(State.MIs[1]->getOperand(1).getReg()).getSizeInBits();
696 }
697 case GICXXPred_MI_Predicate_GICombiner5: {
698 return MRI.getType(State.MIs[0]->getOperand(0).getReg()).getSizeInBits() <
699 MRI.getType(State.MIs[1]->getOperand(1).getReg()).getSizeInBits();
700 }
701 case GICXXPred_MI_Predicate_GICombiner6: {
702 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0);
703 }
704 case GICXXPred_MI_Predicate_GICombiner7: {
705 return MRI.getType(State.MIs[1]->getOperand(1).getReg()) != MRI.getType(State.MIs[0]->getOperand(0).getReg());
706 }
707 case GICXXPred_MI_Predicate_GICombiner8: {
708 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0);
709 }
710 case GICXXPred_MI_Predicate_GICombiner9: {
711 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 0.0);
712 }
713 case GICXXPred_MI_Predicate_GICombiner10: {
714 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0);
715 }
716 case GICXXPred_MI_Predicate_GICombiner11: {
717 return Helper.matchCommuteConstantToRHS(*State.MIs[0]);
718 }
719 case GICXXPred_MI_Predicate_GICombiner12: {
720 return Helper.matchCommuteFPConstantToRHS(*State.MIs[0]);
721 }
722 }
723 llvm_unreachable("Unknown predicate");
724 return false;
725}
726bool RISCVPostLegalizerCombinerImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const {
727 llvm_unreachable("Unknown predicate");
728 return false;
729}
730bool RISCVPostLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
731 llvm_unreachable("Unknown predicate");
732 return false;
733}
734bool RISCVPostLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
735 llvm_unreachable("Unknown predicate");
736 return false;
737}
738bool RISCVPostLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
739 llvm_unreachable("Unknown predicate");
740 return false;
741}
742enum {
743 GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
744 GICXXPred_Simple_IsRule1Enabled,
745 GICXXPred_Simple_IsRule2Enabled,
746 GICXXPred_Simple_IsRule3Enabled,
747 GICXXPred_Simple_IsRule4Enabled,
748 GICXXPred_Simple_IsRule5Enabled,
749 GICXXPred_Simple_IsRule6Enabled,
750 GICXXPred_Simple_IsRule7Enabled,
751 GICXXPred_Simple_IsRule8Enabled,
752 GICXXPred_Simple_IsRule9Enabled,
753 GICXXPred_Simple_IsRule10Enabled,
754 GICXXPred_Simple_IsRule11Enabled,
755 GICXXPred_Simple_IsRule12Enabled,
756 GICXXPred_Simple_IsRule13Enabled,
757 GICXXPred_Simple_IsRule14Enabled,
758 GICXXPred_Simple_IsRule15Enabled,
759 GICXXPred_Simple_IsRule16Enabled,
760 GICXXPred_Simple_IsRule17Enabled,
761 GICXXPred_Simple_IsRule18Enabled,
762 GICXXPred_Simple_IsRule19Enabled,
763 GICXXPred_Simple_IsRule20Enabled,
764 GICXXPred_Simple_IsRule21Enabled,
765 GICXXPred_Simple_IsRule22Enabled,
766 GICXXPred_Simple_IsRule23Enabled,
767 GICXXPred_Simple_IsRule24Enabled,
768 GICXXPred_Simple_IsRule25Enabled,
769 GICXXPred_Simple_IsRule26Enabled,
770 GICXXPred_Simple_IsRule27Enabled,
771 GICXXPred_Simple_IsRule28Enabled,
772 GICXXPred_Simple_IsRule29Enabled,
773 GICXXPred_Simple_IsRule30Enabled,
774 GICXXPred_Simple_IsRule31Enabled,
775 GICXXPred_Simple_IsRule32Enabled,
776 GICXXPred_Simple_IsRule33Enabled,
777 GICXXPred_Simple_IsRule34Enabled,
778 GICXXPred_Simple_IsRule35Enabled,
779 GICXXPred_Simple_IsRule36Enabled,
780 GICXXPred_Simple_IsRule37Enabled,
781 GICXXPred_Simple_IsRule38Enabled,
782 GICXXPred_Simple_IsRule39Enabled,
783 GICXXPred_Simple_IsRule40Enabled,
784 GICXXPred_Simple_IsRule41Enabled,
785 GICXXPred_Simple_IsRule42Enabled,
786 GICXXPred_Simple_IsRule43Enabled,
787 GICXXPred_Simple_IsRule44Enabled,
788 GICXXPred_Simple_IsRule45Enabled,
789 GICXXPred_Simple_IsRule46Enabled,
790 GICXXPred_Simple_IsRule47Enabled,
791 GICXXPred_Simple_IsRule48Enabled,
792 GICXXPred_Simple_IsRule49Enabled,
793 GICXXPred_Simple_IsRule50Enabled,
794 GICXXPred_Simple_IsRule51Enabled,
795 GICXXPred_Simple_IsRule52Enabled,
796 GICXXPred_Simple_IsRule53Enabled,
797 GICXXPred_Simple_IsRule54Enabled,
798 GICXXPred_Simple_IsRule55Enabled,
799 GICXXPred_Simple_IsRule56Enabled,
800 GICXXPred_Simple_IsRule57Enabled,
801 GICXXPred_Simple_IsRule58Enabled,
802 GICXXPred_Simple_IsRule59Enabled,
803 GICXXPred_Simple_IsRule60Enabled,
804 GICXXPred_Simple_IsRule61Enabled,
805};
806
807bool RISCVPostLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
808 return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
809}
810// Custom renderers.
811enum {
812 GICR_Invalid,
813};
814RISCVPostLegalizerCombinerImpl::CustomRendererFn
815RISCVPostLegalizerCombinerImpl::CustomRenderers[] = {
816 nullptr, // GICR_Invalid
817};
818
819bool RISCVPostLegalizerCombinerImpl::canMatchOpcode(unsigned Opc) const {
820 switch (Opc) {
821 case TargetOpcode::G_SADDO:
822 case TargetOpcode::G_SELECT:
823 case TargetOpcode::G_SMULFIX:
824 case TargetOpcode::G_SMULFIXSAT:
825 case TargetOpcode::G_SMULO:
826 case TargetOpcode::G_UADDO:
827 case TargetOpcode::G_UMULFIX:
828 case TargetOpcode::G_UMULFIXSAT:
829 case TargetOpcode::G_UMULO:
830 case TargetOpcode::G_FADD:
831 case TargetOpcode::G_ADD:
832 case TargetOpcode::G_AND:
833 case TargetOpcode::G_ASHR:
834 case TargetOpcode::G_FMAXIMUM:
835 case TargetOpcode::G_FMAXNUM:
836 case TargetOpcode::G_FMAXNUM_IEEE:
837 case TargetOpcode::G_FMINIMUM:
838 case TargetOpcode::G_FMINNUM:
839 case TargetOpcode::G_FMINNUM_IEEE:
840 case TargetOpcode::G_FMUL:
841 case TargetOpcode::G_LSHR:
842 case TargetOpcode::G_MUL:
843 case TargetOpcode::G_OR:
844 case TargetOpcode::G_SADDSAT:
845 case TargetOpcode::G_SDIV:
846 case TargetOpcode::G_SHL:
847 case TargetOpcode::G_SMAX:
848 case TargetOpcode::G_SMIN:
849 case TargetOpcode::G_SMULH:
850 case TargetOpcode::G_SREM:
851 case TargetOpcode::G_UADDSAT:
852 case TargetOpcode::G_UDIV:
853 case TargetOpcode::G_UMAX:
854 case TargetOpcode::G_UMIN:
855 case TargetOpcode::G_UMULH:
856 case TargetOpcode::G_UREM:
857 case TargetOpcode::G_XOR:
858 case TargetOpcode::G_PTR_ADD:
859 case TargetOpcode::G_ROTL:
860 case TargetOpcode::G_ROTR:
861 case TargetOpcode::G_SSHLSAT:
862 case TargetOpcode::G_SUB:
863 case TargetOpcode::G_USHLSAT:
864 case TargetOpcode::G_BITCAST:
865 case TargetOpcode::G_BUILD_VECTOR:
866 case TargetOpcode::G_BUILD_VECTOR_TRUNC:
867 case TargetOpcode::G_FPTRUNC:
868 case TargetOpcode::G_INTTOPTR:
869 case TargetOpcode::G_PTRTOINT:
870 case TargetOpcode::G_ANYEXT:
871 case TargetOpcode::G_FNEG:
872 case TargetOpcode::G_LOAD:
873 case TargetOpcode::G_SEXTLOAD:
874 case TargetOpcode::G_STORE:
875 case TargetOpcode::G_TRUNC:
876 case TargetOpcode::G_ZEXTLOAD:
877 return true;
878 default:
879 return false;
880 }
881}
882
883uint32_t RISCVPostLegalizerCombinerImpl::getRootFlagsToDrop() const {
884 return MachineInstr::getPoisonGeneratingFlags();
885}
886
887bool RISCVPostLegalizerCombinerImpl::tryCombineAll(MachineInstr &I) const {
888 const PredicateBitset AvailableFeatures = getAvailableFeatures();
889 State.MIs.clear();
890 State.MIs.push_back(&I);
891 if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), Helper.getTII(), MRI, Helper.getTRI(), Helper.getRBI(), AvailableFeatures, /*CoverageInfo*/ nullptr)) {
892 return true;
893 }
894
895 return false;
896}
897
898enum {
899 GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
900 GICXXCustomAction_GICombiner1,
901 GICXXCustomAction_GICombiner2,
902 GICXXCustomAction_GICombiner3,
903 GICXXCustomAction_GICombiner4,
904 GICXXCustomAction_GICombiner5,
905 GICXXCustomAction_GICombiner6,
906 GICXXCustomAction_GICombiner7,
907 GICXXCustomAction_GICombiner8,
908 GICXXCustomAction_GICombiner9,
909 GICXXCustomAction_GICombiner10,
910};
911bool RISCVPostLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
912 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
913 switch(ApplyID) {
914 case GICXXCustomAction_GICombiner0:{
915 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
916 // Match Patterns
917 if(![&](){return Helper.matchCombineSubToAdd(*State.MIs[0], GIMatchData_matchinfo);}()) {
918 return false;
919 }
920 // Apply Patterns
921 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
922 return true;
923 }
924 case GICXXCustomAction_GICombiner1:{
925 PreferredTuple GIMatchData_matchinfo;
926 // Match Patterns
927 if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) {
928 return false;
929 }
930 // Apply Patterns
931 Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);
932 return true;
933 }
934 case GICXXCustomAction_GICombiner2:{
935 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
936 // Match Patterns
937 if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) {
938 return false;
939 }
940 // Apply Patterns
941 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
942 return true;
943 }
944 case GICXXCustomAction_GICombiner3:{
945 Register GIMatchData_matchinfo;
946 // Match Patterns
947 if(![&](){return Helper.matchRedundantAnd(*State.MIs[0], GIMatchData_matchinfo);}()) {
948 return false;
949 }
950 // Apply Patterns
951 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
952 return true;
953 }
954 case GICXXCustomAction_GICombiner4:{
955 Register GIMatchData_matchinfo;
956 // Match Patterns
957 if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) {
958 return false;
959 }
960 // Apply Patterns
961 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
962 return true;
963 }
964 case GICXXCustomAction_GICombiner5:{
965 Register GIMatchData_matchinfo;
966 // Match Patterns
967 if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
968 return false;
969 }
970 // Apply Patterns
971 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
972 return true;
973 }
974 case GICXXCustomAction_GICombiner6:{
975 Register GIMatchData_matchinfo;
976 // Match Patterns
977 if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
978 return false;
979 }
980 // Apply Patterns
981 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
982 return true;
983 }
984 case GICXXCustomAction_GICombiner7:{
985 Register GIMatchData_matchinfo;
986 // Match Patterns
987 if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
988 return false;
989 }
990 // Apply Patterns
991 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
992 return true;
993 }
994 case GICXXCustomAction_GICombiner8:{
995 RegisterImmPair GIMatchData_matchinfo;
996 // Match Patterns
997 if(![&](){return Helper.matchShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) {
998 return false;
999 }
1000 // Apply Patterns
1001 Helper.applyShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);
1002 return true;
1003 }
1004 case GICXXCustomAction_GICombiner9:{
1005 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
1006 // Match Patterns
1007 if(![&](){return Helper.matchSimplifyNegMinMax(*State.MIs[0], GIMatchData_matchinfo);}()) {
1008 return false;
1009 }
1010 // Apply Patterns
1011 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
1012 return true;
1013 }
1014 case GICXXCustomAction_GICombiner10:{
1015 Register GIMatchData_matchinfo;
1016 // Match Patterns
1017 if(![&](){return matchFoldFPZeroStore(*State.MIs[0], MRI, STI, GIMatchData_matchinfo);}()) {
1018 return false;
1019 }
1020 // Apply Patterns
1021 applyFoldFPZeroStore(*State.MIs[0], MRI, B, STI, GIMatchData_matchinfo);
1022 return true;
1023 }
1024 }
1025 llvm_unreachable("Unknown Apply Action");
1026}
1027#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
1028#define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8)
1029#define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24)
1030#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)
1031#else
1032#define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val)
1033#define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
1034#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)
1035#endif
1036const uint8_t *RISCVPostLegalizerCombinerImpl::getMatchTable() const {
1037 constexpr static uint8_t MatchTable0[] = {
1038 /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(56), GIMT_Encode2(247), /*)*//*default:*//*Label 56*/ GIMT_Encode4(2837),
1039 /* 10 */ /*TargetOpcode::G_ADD*//*Label 0*/ GIMT_Encode4(774),
1040 /* 14 */ /*TargetOpcode::G_SUB*//*Label 1*/ GIMT_Encode4(891),
1041 /* 18 */ /*TargetOpcode::G_MUL*//*Label 2*/ GIMT_Encode4(986),
1042 /* 22 */ /*TargetOpcode::G_SDIV*//*Label 3*/ GIMT_Encode4(1081),
1043 /* 26 */ /*TargetOpcode::G_UDIV*//*Label 4*/ GIMT_Encode4(1105),
1044 /* 30 */ /*TargetOpcode::G_SREM*//*Label 5*/ GIMT_Encode4(1129),
1045 /* 34 */ /*TargetOpcode::G_UREM*//*Label 6*/ GIMT_Encode4(1153), GIMT_Encode4(0), GIMT_Encode4(0),
1046 /* 46 */ /*TargetOpcode::G_AND*//*Label 7*/ GIMT_Encode4(1177),
1047 /* 50 */ /*TargetOpcode::G_OR*//*Label 8*/ GIMT_Encode4(1249),
1048 /* 54 */ /*TargetOpcode::G_XOR*//*Label 9*/ GIMT_Encode4(1322), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1049 /* 122 */ /*TargetOpcode::G_BUILD_VECTOR*//*Label 10*/ GIMT_Encode4(1410),
1050 /* 126 */ /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 11*/ GIMT_Encode4(1425), GIMT_Encode4(0),
1051 /* 134 */ /*TargetOpcode::G_PTRTOINT*//*Label 12*/ GIMT_Encode4(1440),
1052 /* 138 */ /*TargetOpcode::G_INTTOPTR*//*Label 13*/ GIMT_Encode4(1537),
1053 /* 142 */ /*TargetOpcode::G_BITCAST*//*Label 14*/ GIMT_Encode4(1571), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1054 /* 186 */ /*TargetOpcode::G_LOAD*//*Label 15*/ GIMT_Encode4(1637),
1055 /* 190 */ /*TargetOpcode::G_SEXTLOAD*//*Label 16*/ GIMT_Encode4(1649),
1056 /* 194 */ /*TargetOpcode::G_ZEXTLOAD*//*Label 17*/ GIMT_Encode4(1661), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1057 /* 214 */ /*TargetOpcode::G_STORE*//*Label 18*/ GIMT_Encode4(1673), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1058 /* 362 */ /*TargetOpcode::G_ANYEXT*//*Label 19*/ GIMT_Encode4(1685),
1059 /* 366 */ /*TargetOpcode::G_TRUNC*//*Label 20*/ GIMT_Encode4(1697), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1060 /* 410 */ /*TargetOpcode::G_SHL*//*Label 21*/ GIMT_Encode4(1720),
1061 /* 414 */ /*TargetOpcode::G_LSHR*//*Label 22*/ GIMT_Encode4(1778),
1062 /* 418 */ /*TargetOpcode::G_ASHR*//*Label 23*/ GIMT_Encode4(1836), GIMT_Encode4(0), GIMT_Encode4(0),
1063 /* 430 */ /*TargetOpcode::G_ROTR*//*Label 24*/ GIMT_Encode4(1894),
1064 /* 434 */ /*TargetOpcode::G_ROTL*//*Label 25*/ GIMT_Encode4(1918), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1065 /* 454 */ /*TargetOpcode::G_SELECT*//*Label 26*/ GIMT_Encode4(1942),
1066 /* 458 */ /*TargetOpcode::G_UADDO*//*Label 27*/ GIMT_Encode4(1990), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1067 /* 474 */ /*TargetOpcode::G_SADDO*//*Label 28*/ GIMT_Encode4(2018), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1068 /* 490 */ /*TargetOpcode::G_UMULO*//*Label 29*/ GIMT_Encode4(2046),
1069 /* 494 */ /*TargetOpcode::G_SMULO*//*Label 30*/ GIMT_Encode4(2074),
1070 /* 498 */ /*TargetOpcode::G_UMULH*//*Label 31*/ GIMT_Encode4(2102),
1071 /* 502 */ /*TargetOpcode::G_SMULH*//*Label 32*/ GIMT_Encode4(2128),
1072 /* 506 */ /*TargetOpcode::G_UADDSAT*//*Label 33*/ GIMT_Encode4(2154),
1073 /* 510 */ /*TargetOpcode::G_SADDSAT*//*Label 34*/ GIMT_Encode4(2180), GIMT_Encode4(0), GIMT_Encode4(0),
1074 /* 522 */ /*TargetOpcode::G_USHLSAT*//*Label 35*/ GIMT_Encode4(2206),
1075 /* 526 */ /*TargetOpcode::G_SSHLSAT*//*Label 36*/ GIMT_Encode4(2218),
1076 /* 530 */ /*TargetOpcode::G_SMULFIX*//*Label 37*/ GIMT_Encode4(2230),
1077 /* 534 */ /*TargetOpcode::G_UMULFIX*//*Label 38*/ GIMT_Encode4(2258),
1078 /* 538 */ /*TargetOpcode::G_SMULFIXSAT*//*Label 39*/ GIMT_Encode4(2286),
1079 /* 542 */ /*TargetOpcode::G_UMULFIXSAT*//*Label 40*/ GIMT_Encode4(2314), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1080 /* 562 */ /*TargetOpcode::G_FADD*//*Label 41*/ GIMT_Encode4(2342), GIMT_Encode4(0),
1081 /* 570 */ /*TargetOpcode::G_FMUL*//*Label 42*/ GIMT_Encode4(2420), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1082 /* 634 */ /*TargetOpcode::G_FNEG*//*Label 43*/ GIMT_Encode4(2489), GIMT_Encode4(0),
1083 /* 642 */ /*TargetOpcode::G_FPTRUNC*//*Label 44*/ GIMT_Encode4(2519), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1084 /* 686 */ /*TargetOpcode::G_FMINNUM*//*Label 45*/ GIMT_Encode4(2553),
1085 /* 690 */ /*TargetOpcode::G_FMAXNUM*//*Label 46*/ GIMT_Encode4(2579),
1086 /* 694 */ /*TargetOpcode::G_FMINNUM_IEEE*//*Label 47*/ GIMT_Encode4(2605),
1087 /* 698 */ /*TargetOpcode::G_FMAXNUM_IEEE*//*Label 48*/ GIMT_Encode4(2631),
1088 /* 702 */ /*TargetOpcode::G_FMINIMUM*//*Label 49*/ GIMT_Encode4(2657),
1089 /* 706 */ /*TargetOpcode::G_FMAXIMUM*//*Label 50*/ GIMT_Encode4(2683), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
1090 /* 750 */ /*TargetOpcode::G_PTR_ADD*//*Label 51*/ GIMT_Encode4(2709), GIMT_Encode4(0),
1091 /* 758 */ /*TargetOpcode::G_SMIN*//*Label 52*/ GIMT_Encode4(2733),
1092 /* 762 */ /*TargetOpcode::G_SMAX*//*Label 53*/ GIMT_Encode4(2759),
1093 /* 766 */ /*TargetOpcode::G_UMIN*//*Label 54*/ GIMT_Encode4(2785),
1094 /* 770 */ /*TargetOpcode::G_UMAX*//*Label 55*/ GIMT_Encode4(2811),
1095 /* 774 */ // Label 0: @774
1096 /* 774 */ GIM_Try, /*On fail goto*//*Label 57*/ GIMT_Encode4(799), // Rule ID 56 //
1097 /* 779 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled),
1098 /* 782 */ // MIs[0] dst
1099 /* 782 */ // No operand predicates
1100 /* 782 */ // MIs[0] lhs
1101 /* 782 */ // No operand predicates
1102 /* 782 */ // MIs[0] rhs
1103 /* 782 */ // No operand predicates
1104 /* 782 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1105 /* 786 */ // Combiner Rule #31: G_ADD_commute_constant_to_rhs
1106 /* 786 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ADD),
1107 /* 789 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1108 /* 791 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
1109 /* 793 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
1110 /* 795 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1111 /* 798 */ GIR_EraseRootFromParent_Done,
1112 /* 799 */ // Label 57: @799
1113 /* 799 */ GIM_Try, /*On fail goto*//*Label 58*/ GIMT_Encode4(833), // Rule ID 40 //
1114 /* 804 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
1115 /* 807 */ // MIs[0] dst
1116 /* 807 */ // No operand predicates
1117 /* 807 */ // MIs[0] __add_sub_reg_match_0.tmp
1118 /* 807 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1119 /* 811 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
1120 /* 815 */ // MIs[1] src
1121 /* 815 */ // No operand predicates
1122 /* 815 */ // MIs[1] __add_sub_reg_match_0.x
1123 /* 815 */ // No operand predicates
1124 /* 815 */ // MIs[0] __add_sub_reg_match_0.x
1125 /* 815 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
1126 /* 820 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1127 /* 825 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1128 /* 827 */ // Combiner Rule #19: add_sub_reg @ [__add_sub_reg_match_0[1]]
1129 /* 827 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1130 /* 832 */ GIR_EraseRootFromParent_Done,
1131 /* 833 */ // Label 58: @833
1132 /* 833 */ GIM_Try, /*On fail goto*//*Label 59*/ GIMT_Encode4(867), // Rule ID 39 //
1133 /* 838 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
1134 /* 841 */ // MIs[0] dst
1135 /* 841 */ // No operand predicates
1136 /* 841 */ // MIs[0] __add_sub_reg_match_0.x
1137 /* 841 */ // No operand predicates
1138 /* 841 */ // MIs[0] __add_sub_reg_match_0.tmp
1139 /* 841 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1140 /* 845 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
1141 /* 849 */ // MIs[1] src
1142 /* 849 */ // No operand predicates
1143 /* 849 */ // MIs[1] __add_sub_reg_match_0.x
1144 /* 849 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1145 /* 854 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1146 /* 859 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1147 /* 861 */ // Combiner Rule #19: add_sub_reg @ [__add_sub_reg_match_0[0]]
1148 /* 861 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1149 /* 866 */ GIR_EraseRootFromParent_Done,
1150 /* 867 */ // Label 59: @867
1151 /* 867 */ GIM_Try, /*On fail goto*//*Label 60*/ GIMT_Encode4(890), // Rule ID 9 //
1152 /* 872 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1153 /* 875 */ // MIs[0] dst
1154 /* 875 */ // No operand predicates
1155 /* 875 */ // MIs[0] lhs
1156 /* 875 */ // No operand predicates
1157 /* 875 */ // MIs[0] Operand 2
1158 /* 875 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1159 /* 879 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1160 /* 884 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[1]]
1161 /* 884 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1162 /* 889 */ GIR_EraseRootFromParent_Done,
1163 /* 890 */ // Label 60: @890
1164 /* 890 */ GIM_Reject,
1165 /* 891 */ // Label 1: @891
1166 /* 891 */ GIM_Try, /*On fail goto*//*Label 61*/ GIMT_Encode4(930), // Rule ID 20 //
1167 /* 896 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1168 /* 899 */ // MIs[0] dst
1169 /* 899 */ // No operand predicates
1170 /* 899 */ // MIs[0] x
1171 /* 899 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
1172 /* 903 */ // MIs[0] x
1173 /* 903 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1174 /* 908 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1175 /* 911 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1176 /* 921 */ // Combiner Rule #8: same_val_zero @ [__same_val_zero_match_0[0]]
1177 /* 921 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1178 /* 924 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1179 /* 926 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1180 /* 929 */ GIR_EraseRootFromParent_Done,
1181 /* 930 */ // Label 61: @930
1182 /* 930 */ GIM_Try, /*On fail goto*//*Label 62*/ GIMT_Encode4(953), // Rule ID 8 //
1183 /* 935 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1184 /* 938 */ // MIs[0] dst
1185 /* 938 */ // No operand predicates
1186 /* 938 */ // MIs[0] lhs
1187 /* 938 */ // No operand predicates
1188 /* 938 */ // MIs[0] Operand 2
1189 /* 938 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1190 /* 942 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1191 /* 947 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[0]]
1192 /* 947 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1193 /* 952 */ GIR_EraseRootFromParent_Done,
1194 /* 953 */ // Label 62: @953
1195 /* 953 */ GIM_Try, /*On fail goto*//*Label 63*/ GIMT_Encode4(974), // Rule ID 0 //
1196 /* 958 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
1197 /* 961 */ // MIs[0] d
1198 /* 961 */ // No operand predicates
1199 /* 961 */ // MIs[0] op1
1200 /* 961 */ // No operand predicates
1201 /* 961 */ // MIs[0] c
1202 /* 961 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
1203 /* 965 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1204 /* 969 */ // MIs[1] imm
1205 /* 969 */ // No operand predicates
1206 /* 969 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1207 /* 971 */ // Combiner Rule #0: sub_to_add
1208 /* 971 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
1209 /* 974 */ // Label 63: @974
1210 /* 974 */ GIM_Try, /*On fail goto*//*Label 64*/ GIMT_Encode4(985), // Rule ID 85 //
1211 /* 979 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule60Enabled),
1212 /* 982 */ // MIs[0] dst
1213 /* 982 */ // No operand predicates
1214 /* 982 */ // MIs[0] src1
1215 /* 982 */ // No operand predicates
1216 /* 982 */ // MIs[0] src2
1217 /* 982 */ // No operand predicates
1218 /* 982 */ // Combiner Rule #60: simplify_neg_minmax
1219 /* 982 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
1220 /* 985 */ // Label 64: @985
1221 /* 985 */ GIM_Reject,
1222 /* 986 */ // Label 2: @986
1223 /* 986 */ GIM_Try, /*On fail goto*//*Label 65*/ GIMT_Encode4(1009), // Rule ID 29 //
1224 /* 991 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1225 /* 994 */ // MIs[0] dst
1226 /* 994 */ // No operand predicates
1227 /* 994 */ // MIs[0] zero
1228 /* 994 */ // No operand predicates
1229 /* 994 */ // MIs[0] rhs
1230 /* 994 */ // No operand predicates
1231 /* 994 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1232 /* 998 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1233 /* 1003 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[7]]
1234 /* 1003 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1235 /* 1008 */ GIR_EraseRootFromParent_Done,
1236 /* 1009 */ // Label 65: @1009
1237 /* 1009 */ GIM_Try, /*On fail goto*//*Label 66*/ GIMT_Encode4(1034), // Rule ID 57 //
1238 /* 1014 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
1239 /* 1017 */ // MIs[0] dst
1240 /* 1017 */ // No operand predicates
1241 /* 1017 */ // MIs[0] lhs
1242 /* 1017 */ // No operand predicates
1243 /* 1017 */ // MIs[0] rhs
1244 /* 1017 */ // No operand predicates
1245 /* 1017 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1246 /* 1021 */ // Combiner Rule #32: G_MUL_commute_constant_to_rhs
1247 /* 1021 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_MUL),
1248 /* 1024 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1249 /* 1026 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
1250 /* 1028 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
1251 /* 1030 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1252 /* 1033 */ GIR_EraseRootFromParent_Done,
1253 /* 1034 */ // Label 66: @1034
1254 /* 1034 */ GIM_Try, /*On fail goto*//*Label 67*/ GIMT_Encode4(1057), // Rule ID 30 //
1255 /* 1039 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
1256 /* 1042 */ // MIs[0] dst
1257 /* 1042 */ // No operand predicates
1258 /* 1042 */ // MIs[0] lhs
1259 /* 1042 */ // No operand predicates
1260 /* 1042 */ // MIs[0] zero
1261 /* 1042 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1262 /* 1046 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1263 /* 1051 */ // Combiner Rule #10: binop_right_to_zero
1264 /* 1051 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1265 /* 1056 */ GIR_EraseRootFromParent_Done,
1266 /* 1057 */ // Label 67: @1057
1267 /* 1057 */ GIM_Try, /*On fail goto*//*Label 68*/ GIMT_Encode4(1080), // Rule ID 37 //
1268 /* 1062 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1269 /* 1065 */ // MIs[0] dst
1270 /* 1065 */ // No operand predicates
1271 /* 1065 */ // MIs[0] x
1272 /* 1065 */ // No operand predicates
1273 /* 1065 */ // MIs[0] Operand 2
1274 /* 1065 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1,
1275 /* 1069 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1276 /* 1074 */ // Combiner Rule #17: right_identity_one_int
1277 /* 1074 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1278 /* 1079 */ GIR_EraseRootFromParent_Done,
1279 /* 1080 */ // Label 68: @1080
1280 /* 1080 */ GIM_Reject,
1281 /* 1081 */ // Label 3: @1081
1282 /* 1081 */ GIM_Try, /*On fail goto*//*Label 69*/ GIMT_Encode4(1104), // Rule ID 25 //
1283 /* 1086 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1284 /* 1089 */ // MIs[0] dst
1285 /* 1089 */ // No operand predicates
1286 /* 1089 */ // MIs[0] zero
1287 /* 1089 */ // No operand predicates
1288 /* 1089 */ // MIs[0] rhs
1289 /* 1089 */ // No operand predicates
1290 /* 1089 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1291 /* 1093 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1292 /* 1098 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[3]]
1293 /* 1098 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1294 /* 1103 */ GIR_EraseRootFromParent_Done,
1295 /* 1104 */ // Label 69: @1104
1296 /* 1104 */ GIM_Reject,
1297 /* 1105 */ // Label 4: @1105
1298 /* 1105 */ GIM_Try, /*On fail goto*//*Label 70*/ GIMT_Encode4(1128), // Rule ID 26 //
1299 /* 1110 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1300 /* 1113 */ // MIs[0] dst
1301 /* 1113 */ // No operand predicates
1302 /* 1113 */ // MIs[0] zero
1303 /* 1113 */ // No operand predicates
1304 /* 1113 */ // MIs[0] rhs
1305 /* 1113 */ // No operand predicates
1306 /* 1113 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1307 /* 1117 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1308 /* 1122 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[4]]
1309 /* 1122 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1310 /* 1127 */ GIR_EraseRootFromParent_Done,
1311 /* 1128 */ // Label 70: @1128
1312 /* 1128 */ GIM_Reject,
1313 /* 1129 */ // Label 5: @1129
1314 /* 1129 */ GIM_Try, /*On fail goto*//*Label 71*/ GIMT_Encode4(1152), // Rule ID 27 //
1315 /* 1134 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1316 /* 1137 */ // MIs[0] dst
1317 /* 1137 */ // No operand predicates
1318 /* 1137 */ // MIs[0] zero
1319 /* 1137 */ // No operand predicates
1320 /* 1137 */ // MIs[0] rhs
1321 /* 1137 */ // No operand predicates
1322 /* 1137 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1323 /* 1141 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1324 /* 1146 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[5]]
1325 /* 1146 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1326 /* 1151 */ GIR_EraseRootFromParent_Done,
1327 /* 1152 */ // Label 71: @1152
1328 /* 1152 */ GIM_Reject,
1329 /* 1153 */ // Label 6: @1153
1330 /* 1153 */ GIM_Try, /*On fail goto*//*Label 72*/ GIMT_Encode4(1176), // Rule ID 28 //
1331 /* 1158 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1332 /* 1161 */ // MIs[0] dst
1333 /* 1161 */ // No operand predicates
1334 /* 1161 */ // MIs[0] zero
1335 /* 1161 */ // No operand predicates
1336 /* 1161 */ // MIs[0] rhs
1337 /* 1161 */ // No operand predicates
1338 /* 1161 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1339 /* 1165 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1340 /* 1170 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[6]]
1341 /* 1170 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1342 /* 1175 */ GIR_EraseRootFromParent_Done,
1343 /* 1176 */ // Label 72: @1176
1344 /* 1176 */ GIM_Reject,
1345 /* 1177 */ // Label 7: @1177
1346 /* 1177 */ GIM_Try, /*On fail goto*//*Label 73*/ GIMT_Encode4(1202), // Rule ID 58 //
1347 /* 1182 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled),
1348 /* 1185 */ // MIs[0] dst
1349 /* 1185 */ // No operand predicates
1350 /* 1185 */ // MIs[0] lhs
1351 /* 1185 */ // No operand predicates
1352 /* 1185 */ // MIs[0] rhs
1353 /* 1185 */ // No operand predicates
1354 /* 1185 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1355 /* 1189 */ // Combiner Rule #33: G_AND_commute_constant_to_rhs
1356 /* 1189 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_AND),
1357 /* 1192 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1358 /* 1194 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
1359 /* 1196 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
1360 /* 1198 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1361 /* 1201 */ GIR_EraseRootFromParent_Done,
1362 /* 1202 */ // Label 73: @1202
1363 /* 1202 */ GIM_Try, /*On fail goto*//*Label 74*/ GIMT_Encode4(1226), // Rule ID 18 //
1364 /* 1207 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
1365 /* 1210 */ // MIs[0] dst
1366 /* 1210 */ // No operand predicates
1367 /* 1210 */ // MIs[0] src
1368 /* 1210 */ // No operand predicates
1369 /* 1210 */ // MIs[0] src
1370 /* 1210 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1371 /* 1215 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1372 /* 1220 */ // Combiner Rule #7: binop_same_val @ [__binop_same_val_match_0[0]]
1373 /* 1220 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1374 /* 1225 */ GIR_EraseRootFromParent_Done,
1375 /* 1226 */ // Label 74: @1226
1376 /* 1226 */ GIM_Try, /*On fail goto*//*Label 75*/ GIMT_Encode4(1237), // Rule ID 4 //
1377 /* 1231 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1378 /* 1234 */ // MIs[0] dst
1379 /* 1234 */ // No operand predicates
1380 /* 1234 */ // MIs[0] src1
1381 /* 1234 */ // No operand predicates
1382 /* 1234 */ // MIs[0] src2
1383 /* 1234 */ // No operand predicates
1384 /* 1234 */ // Combiner Rule #2: load_and_mask
1385 /* 1234 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
1386 /* 1237 */ // Label 75: @1237
1387 /* 1237 */ GIM_Try, /*On fail goto*//*Label 76*/ GIMT_Encode4(1248), // Rule ID 5 //
1388 /* 1242 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
1389 /* 1245 */ // MIs[0] dst
1390 /* 1245 */ // No operand predicates
1391 /* 1245 */ // MIs[0] src1
1392 /* 1245 */ // No operand predicates
1393 /* 1245 */ // MIs[0] src2
1394 /* 1245 */ // No operand predicates
1395 /* 1245 */ // Combiner Rule #3: redundant_and
1396 /* 1245 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
1397 /* 1248 */ // Label 76: @1248
1398 /* 1248 */ GIM_Reject,
1399 /* 1249 */ // Label 8: @1249
1400 /* 1249 */ GIM_Try, /*On fail goto*//*Label 77*/ GIMT_Encode4(1274), // Rule ID 59 //
1401 /* 1254 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
1402 /* 1257 */ // MIs[0] dst
1403 /* 1257 */ // No operand predicates
1404 /* 1257 */ // MIs[0] lhs
1405 /* 1257 */ // No operand predicates
1406 /* 1257 */ // MIs[0] rhs
1407 /* 1257 */ // No operand predicates
1408 /* 1257 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1409 /* 1261 */ // Combiner Rule #34: G_OR_commute_constant_to_rhs
1410 /* 1261 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_OR),
1411 /* 1264 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1412 /* 1266 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
1413 /* 1268 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
1414 /* 1270 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1415 /* 1273 */ GIR_EraseRootFromParent_Done,
1416 /* 1274 */ // Label 77: @1274
1417 /* 1274 */ GIM_Try, /*On fail goto*//*Label 78*/ GIMT_Encode4(1298), // Rule ID 19 //
1418 /* 1279 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
1419 /* 1282 */ // MIs[0] dst
1420 /* 1282 */ // No operand predicates
1421 /* 1282 */ // MIs[0] src
1422 /* 1282 */ // No operand predicates
1423 /* 1282 */ // MIs[0] src
1424 /* 1282 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1425 /* 1287 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1426 /* 1292 */ // Combiner Rule #7: binop_same_val @ [__binop_same_val_match_0[1]]
1427 /* 1292 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1428 /* 1297 */ GIR_EraseRootFromParent_Done,
1429 /* 1298 */ // Label 78: @1298
1430 /* 1298 */ GIM_Try, /*On fail goto*//*Label 79*/ GIMT_Encode4(1321), // Rule ID 10 //
1431 /* 1303 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1432 /* 1306 */ // MIs[0] dst
1433 /* 1306 */ // No operand predicates
1434 /* 1306 */ // MIs[0] lhs
1435 /* 1306 */ // No operand predicates
1436 /* 1306 */ // MIs[0] Operand 2
1437 /* 1306 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1438 /* 1310 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1439 /* 1315 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[2]]
1440 /* 1315 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1441 /* 1320 */ GIR_EraseRootFromParent_Done,
1442 /* 1321 */ // Label 79: @1321
1443 /* 1321 */ GIM_Reject,
1444 /* 1322 */ // Label 9: @1322
1445 /* 1322 */ GIM_Try, /*On fail goto*//*Label 80*/ GIMT_Encode4(1347), // Rule ID 60 //
1446 /* 1327 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled),
1447 /* 1330 */ // MIs[0] dst
1448 /* 1330 */ // No operand predicates
1449 /* 1330 */ // MIs[0] lhs
1450 /* 1330 */ // No operand predicates
1451 /* 1330 */ // MIs[0] rhs
1452 /* 1330 */ // No operand predicates
1453 /* 1330 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1454 /* 1334 */ // Combiner Rule #35: G_XOR_commute_constant_to_rhs
1455 /* 1334 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_XOR),
1456 /* 1337 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1457 /* 1339 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
1458 /* 1341 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
1459 /* 1343 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1460 /* 1346 */ GIR_EraseRootFromParent_Done,
1461 /* 1347 */ // Label 80: @1347
1462 /* 1347 */ GIM_Try, /*On fail goto*//*Label 81*/ GIMT_Encode4(1386), // Rule ID 21 //
1463 /* 1352 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1464 /* 1355 */ // MIs[0] dst
1465 /* 1355 */ // No operand predicates
1466 /* 1355 */ // MIs[0] x
1467 /* 1355 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
1468 /* 1359 */ // MIs[0] x
1469 /* 1359 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1470 /* 1364 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1471 /* 1367 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1472 /* 1377 */ // Combiner Rule #8: same_val_zero @ [__same_val_zero_match_0[1]]
1473 /* 1377 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1474 /* 1380 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1475 /* 1382 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1476 /* 1385 */ GIR_EraseRootFromParent_Done,
1477 /* 1386 */ // Label 81: @1386
1478 /* 1386 */ GIM_Try, /*On fail goto*//*Label 82*/ GIMT_Encode4(1409), // Rule ID 11 //
1479 /* 1391 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1480 /* 1394 */ // MIs[0] dst
1481 /* 1394 */ // No operand predicates
1482 /* 1394 */ // MIs[0] lhs
1483 /* 1394 */ // No operand predicates
1484 /* 1394 */ // MIs[0] Operand 2
1485 /* 1394 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1486 /* 1398 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1487 /* 1403 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[3]]
1488 /* 1403 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1489 /* 1408 */ GIR_EraseRootFromParent_Done,
1490 /* 1409 */ // Label 82: @1409
1491 /* 1409 */ GIM_Reject,
1492 /* 1410 */ // Label 10: @1410
1493 /* 1410 */ GIM_Try, /*On fail goto*//*Label 83*/ GIMT_Encode4(1424), // Rule ID 41 //
1494 /* 1415 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1495 /* 1418 */ GIM_CheckNumOperandsGE, /*MI*/0, /*Expected*/2,
1496 /* 1421 */ // MIs[0] build_vector
1497 /* 1421 */ // No operand predicates
1498 /* 1421 */ // MIs[0] srcs
1499 /* 1421 */ // No operand predicates
1500 /* 1421 */ // Combiner Rule #20: buildvector_identity_fold_bv
1501 /* 1421 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
1502 /* 1424 */ // Label 83: @1424
1503 /* 1424 */ GIM_Reject,
1504 /* 1425 */ // Label 11: @1425
1505 /* 1425 */ GIM_Try, /*On fail goto*//*Label 84*/ GIMT_Encode4(1439), // Rule ID 42 //
1506 /* 1430 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
1507 /* 1433 */ GIM_CheckNumOperandsGE, /*MI*/0, /*Expected*/2,
1508 /* 1436 */ // MIs[0] build_vector
1509 /* 1436 */ // No operand predicates
1510 /* 1436 */ // MIs[0] srcs
1511 /* 1436 */ // No operand predicates
1512 /* 1436 */ // Combiner Rule #21: buildvector_identity_fold_bvt
1513 /* 1436 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
1514 /* 1439 */ // Label 84: @1439
1515 /* 1439 */ GIM_Reject,
1516 /* 1440 */ // Label 12: @1440
1517 /* 1440 */ GIM_Try, /*On fail goto*//*Label 85*/ GIMT_Encode4(1472), // Rule ID 32 //
1518 /* 1445 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
1519 /* 1448 */ // MIs[0] dst
1520 /* 1448 */ // No operand predicates
1521 /* 1448 */ // MIs[0] t
1522 /* 1448 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1523 /* 1452 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1524 /* 1456 */ // MIs[1] ptr
1525 /* 1456 */ // No operand predicates
1526 /* 1456 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3),
1527 /* 1460 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1528 /* 1462 */ // Combiner Rule #12: i2p_to_p2i_same_size
1529 /* 1462 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1530 /* 1465 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1531 /* 1467 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1532 /* 1471 */ GIR_EraseRootFromParent_Done,
1533 /* 1472 */ // Label 85: @1472
1534 /* 1472 */ GIM_Try, /*On fail goto*//*Label 86*/ GIMT_Encode4(1504), // Rule ID 33 //
1535 /* 1477 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
1536 /* 1480 */ // MIs[0] dst
1537 /* 1480 */ // No operand predicates
1538 /* 1480 */ // MIs[0] t
1539 /* 1480 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1540 /* 1484 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1541 /* 1488 */ // MIs[1] ptr
1542 /* 1488 */ // No operand predicates
1543 /* 1488 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner4),
1544 /* 1492 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1545 /* 1494 */ // Combiner Rule #13: i2p_to_p2i_zext
1546 /* 1494 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_ZEXT),
1547 /* 1497 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1548 /* 1499 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1549 /* 1503 */ GIR_EraseRootFromParent_Done,
1550 /* 1504 */ // Label 86: @1504
1551 /* 1504 */ GIM_Try, /*On fail goto*//*Label 87*/ GIMT_Encode4(1536), // Rule ID 34 //
1552 /* 1509 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
1553 /* 1512 */ // MIs[0] dst
1554 /* 1512 */ // No operand predicates
1555 /* 1512 */ // MIs[0] t
1556 /* 1512 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1557 /* 1516 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1558 /* 1520 */ // MIs[1] ptr
1559 /* 1520 */ // No operand predicates
1560 /* 1520 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner5),
1561 /* 1524 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1562 /* 1526 */ // Combiner Rule #14: i2p_to_p2i_trunc
1563 /* 1526 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_TRUNC),
1564 /* 1529 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1565 /* 1531 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // ptr
1566 /* 1535 */ GIR_EraseRootFromParent_Done,
1567 /* 1536 */ // Label 87: @1536
1568 /* 1536 */ GIM_Reject,
1569 /* 1537 */ // Label 13: @1537
1570 /* 1537 */ GIM_Try, /*On fail goto*//*Label 88*/ GIMT_Encode4(1570), // Rule ID 31 //
1571 /* 1542 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
1572 /* 1545 */ // MIs[0] dst
1573 /* 1545 */ // No operand predicates
1574 /* 1545 */ // MIs[0] mid
1575 /* 1545 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1576 /* 1549 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_PTRTOINT),
1577 /* 1553 */ // MIs[1] x
1578 /* 1553 */ // No operand predicates
1579 /* 1553 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
1580 /* 1557 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1581 /* 1562 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1582 /* 1564 */ // Combiner Rule #11: p2i_to_i2p
1583 /* 1564 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1584 /* 1569 */ GIR_EraseRootFromParent_Done,
1585 /* 1570 */ // Label 88: @1570
1586 /* 1570 */ GIM_Reject,
1587 /* 1571 */ // Label 14: @1571
1588 /* 1571 */ GIM_Try, /*On fail goto*//*Label 89*/ GIMT_Encode4(1604), // Rule ID 45 //
1589 /* 1576 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
1590 /* 1579 */ // MIs[0] dst
1591 /* 1579 */ // No operand predicates
1592 /* 1579 */ // MIs[0] src1
1593 /* 1579 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1594 /* 1583 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
1595 /* 1587 */ // MIs[1] src0
1596 /* 1587 */ // No operand predicates
1597 /* 1587 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
1598 /* 1591 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1599 /* 1596 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1600 /* 1598 */ // Combiner Rule #24: bitcast_bitcast_fold
1601 /* 1598 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1602 /* 1603 */ GIR_EraseRootFromParent_Done,
1603 /* 1604 */ // Label 89: @1604
1604 /* 1604 */ GIM_Try, /*On fail goto*//*Label 90*/ GIMT_Encode4(1636), // Rule ID 46 //
1605 /* 1609 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled),
1606 /* 1612 */ // MIs[0] dst
1607 /* 1612 */ // No operand predicates
1608 /* 1612 */ // MIs[0] src1
1609 /* 1612 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1610 /* 1616 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
1611 /* 1620 */ // MIs[1] src0
1612 /* 1620 */ // No operand predicates
1613 /* 1620 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner7),
1614 /* 1624 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1615 /* 1626 */ // Combiner Rule #25: bitcast_bitcast_to_bitcast
1616 /* 1626 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_BITCAST),
1617 /* 1629 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1618 /* 1631 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src0
1619 /* 1635 */ GIR_EraseRootFromParent_Done,
1620 /* 1636 */ // Label 90: @1636
1621 /* 1636 */ GIM_Reject,
1622 /* 1637 */ // Label 15: @1637
1623 /* 1637 */ GIM_Try, /*On fail goto*//*Label 91*/ GIMT_Encode4(1648), // Rule ID 1 //
1624 /* 1642 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1625 /* 1645 */ // MIs[0] root
1626 /* 1645 */ // No operand predicates
1627 /* 1645 */ // MIs[0] mi.ptr
1628 /* 1645 */ // No operand predicates
1629 /* 1645 */ // Combiner Rule #1: extending_loads @ [mi[0]]
1630 /* 1645 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1631 /* 1648 */ // Label 91: @1648
1632 /* 1648 */ GIM_Reject,
1633 /* 1649 */ // Label 16: @1649
1634 /* 1649 */ GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(1660), // Rule ID 2 //
1635 /* 1654 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1636 /* 1657 */ // MIs[0] root
1637 /* 1657 */ // No operand predicates
1638 /* 1657 */ // MIs[0] mi.ptr
1639 /* 1657 */ // No operand predicates
1640 /* 1657 */ // Combiner Rule #1: extending_loads @ [mi[1]]
1641 /* 1657 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1642 /* 1660 */ // Label 92: @1660
1643 /* 1660 */ GIM_Reject,
1644 /* 1661 */ // Label 17: @1661
1645 /* 1661 */ GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(1672), // Rule ID 3 //
1646 /* 1666 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1647 /* 1669 */ // MIs[0] root
1648 /* 1669 */ // No operand predicates
1649 /* 1669 */ // MIs[0] mi.ptr
1650 /* 1669 */ // No operand predicates
1651 /* 1669 */ // Combiner Rule #1: extending_loads @ [mi[2]]
1652 /* 1669 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1653 /* 1672 */ // Label 93: @1672
1654 /* 1672 */ GIM_Reject,
1655 /* 1673 */ // Label 18: @1673
1656 /* 1673 */ GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(1684), // Rule ID 86 //
1657 /* 1678 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule61Enabled),
1658 /* 1681 */ // MIs[0] src
1659 /* 1681 */ // No operand predicates
1660 /* 1681 */ // MIs[0] addr
1661 /* 1681 */ // No operand predicates
1662 /* 1681 */ // Combiner Rule #61: fold_fp_zero_store
1663 /* 1681 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
1664 /* 1684 */ // Label 94: @1684
1665 /* 1684 */ GIM_Reject,
1666 /* 1685 */ // Label 19: @1685
1667 /* 1685 */ GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(1696), // Rule ID 35 //
1668 /* 1690 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
1669 /* 1693 */ // MIs[0] dst
1670 /* 1693 */ // No operand predicates
1671 /* 1693 */ // MIs[0] src
1672 /* 1693 */ // No operand predicates
1673 /* 1693 */ // Combiner Rule #15: anyext_trunc_fold
1674 /* 1693 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
1675 /* 1696 */ // Label 95: @1696
1676 /* 1696 */ GIM_Reject,
1677 /* 1697 */ // Label 20: @1697
1678 /* 1697 */ GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(1708), // Rule ID 43 //
1679 /* 1702 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
1680 /* 1705 */ // MIs[0] dst
1681 /* 1705 */ // No operand predicates
1682 /* 1705 */ // MIs[0] src
1683 /* 1705 */ // No operand predicates
1684 /* 1705 */ // Combiner Rule #22: trunc_buildvector_fold
1685 /* 1705 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
1686 /* 1708 */ // Label 96: @1708
1687 /* 1708 */ GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(1719), // Rule ID 44 //
1688 /* 1713 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
1689 /* 1716 */ // MIs[0] dst
1690 /* 1716 */ // No operand predicates
1691 /* 1716 */ // MIs[0] src
1692 /* 1716 */ // No operand predicates
1693 /* 1716 */ // Combiner Rule #23: trunc_lshr_buildvector_fold
1694 /* 1716 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
1695 /* 1719 */ // Label 97: @1719
1696 /* 1719 */ GIM_Reject,
1697 /* 1720 */ // Label 21: @1720
1698 /* 1720 */ GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(1743), // Rule ID 22 //
1699 /* 1725 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1700 /* 1728 */ // MIs[0] dst
1701 /* 1728 */ // No operand predicates
1702 /* 1728 */ // MIs[0] zero
1703 /* 1728 */ // No operand predicates
1704 /* 1728 */ // MIs[0] rhs
1705 /* 1728 */ // No operand predicates
1706 /* 1728 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1707 /* 1732 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1708 /* 1737 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[0]]
1709 /* 1737 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1710 /* 1742 */ GIR_EraseRootFromParent_Done,
1711 /* 1743 */ // Label 98: @1743
1712 /* 1743 */ GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(1766), // Rule ID 12 //
1713 /* 1748 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1714 /* 1751 */ // MIs[0] dst
1715 /* 1751 */ // No operand predicates
1716 /* 1751 */ // MIs[0] lhs
1717 /* 1751 */ // No operand predicates
1718 /* 1751 */ // MIs[0] Operand 2
1719 /* 1751 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1720 /* 1755 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1721 /* 1760 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[4]]
1722 /* 1760 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1723 /* 1765 */ GIR_EraseRootFromParent_Done,
1724 /* 1766 */ // Label 99: @1766
1725 /* 1766 */ GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(1777), // Rule ID 51 //
1726 /* 1771 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
1727 /* 1774 */ // MIs[0] d
1728 /* 1774 */ // No operand predicates
1729 /* 1774 */ // MIs[0] mi.base
1730 /* 1774 */ // No operand predicates
1731 /* 1774 */ // MIs[0] mi.amt
1732 /* 1774 */ // No operand predicates
1733 /* 1774 */ // Combiner Rule #30: shift_immed_chain @ [mi[0]]
1734 /* 1774 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
1735 /* 1777 */ // Label 100: @1777
1736 /* 1777 */ GIM_Reject,
1737 /* 1778 */ // Label 22: @1778
1738 /* 1778 */ GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(1801), // Rule ID 23 //
1739 /* 1783 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1740 /* 1786 */ // MIs[0] dst
1741 /* 1786 */ // No operand predicates
1742 /* 1786 */ // MIs[0] zero
1743 /* 1786 */ // No operand predicates
1744 /* 1786 */ // MIs[0] rhs
1745 /* 1786 */ // No operand predicates
1746 /* 1786 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1747 /* 1790 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1748 /* 1795 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[1]]
1749 /* 1795 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1750 /* 1800 */ GIR_EraseRootFromParent_Done,
1751 /* 1801 */ // Label 101: @1801
1752 /* 1801 */ GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(1824), // Rule ID 14 //
1753 /* 1806 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1754 /* 1809 */ // MIs[0] dst
1755 /* 1809 */ // No operand predicates
1756 /* 1809 */ // MIs[0] lhs
1757 /* 1809 */ // No operand predicates
1758 /* 1809 */ // MIs[0] Operand 2
1759 /* 1809 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1760 /* 1813 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1761 /* 1818 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[6]]
1762 /* 1818 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1763 /* 1823 */ GIR_EraseRootFromParent_Done,
1764 /* 1824 */ // Label 102: @1824
1765 /* 1824 */ GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(1835), // Rule ID 53 //
1766 /* 1829 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
1767 /* 1832 */ // MIs[0] d
1768 /* 1832 */ // No operand predicates
1769 /* 1832 */ // MIs[0] mi.base
1770 /* 1832 */ // No operand predicates
1771 /* 1832 */ // MIs[0] mi.amt
1772 /* 1832 */ // No operand predicates
1773 /* 1832 */ // Combiner Rule #30: shift_immed_chain @ [mi[2]]
1774 /* 1832 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
1775 /* 1835 */ // Label 103: @1835
1776 /* 1835 */ GIM_Reject,
1777 /* 1836 */ // Label 23: @1836
1778 /* 1836 */ GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(1859), // Rule ID 24 //
1779 /* 1841 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1780 /* 1844 */ // MIs[0] dst
1781 /* 1844 */ // No operand predicates
1782 /* 1844 */ // MIs[0] zero
1783 /* 1844 */ // No operand predicates
1784 /* 1844 */ // MIs[0] rhs
1785 /* 1844 */ // No operand predicates
1786 /* 1844 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1787 /* 1848 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1788 /* 1853 */ // Combiner Rule #9: binop_left_to_zero @ [__binop_left_to_zero_match_0[2]]
1789 /* 1853 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1790 /* 1858 */ GIR_EraseRootFromParent_Done,
1791 /* 1859 */ // Label 104: @1859
1792 /* 1859 */ GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(1882), // Rule ID 13 //
1793 /* 1864 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1794 /* 1867 */ // MIs[0] dst
1795 /* 1867 */ // No operand predicates
1796 /* 1867 */ // MIs[0] lhs
1797 /* 1867 */ // No operand predicates
1798 /* 1867 */ // MIs[0] Operand 2
1799 /* 1867 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1800 /* 1871 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1801 /* 1876 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[5]]
1802 /* 1876 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1803 /* 1881 */ GIR_EraseRootFromParent_Done,
1804 /* 1882 */ // Label 105: @1882
1805 /* 1882 */ GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(1893), // Rule ID 52 //
1806 /* 1887 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
1807 /* 1890 */ // MIs[0] d
1808 /* 1890 */ // No operand predicates
1809 /* 1890 */ // MIs[0] mi.base
1810 /* 1890 */ // No operand predicates
1811 /* 1890 */ // MIs[0] mi.amt
1812 /* 1890 */ // No operand predicates
1813 /* 1890 */ // Combiner Rule #30: shift_immed_chain @ [mi[1]]
1814 /* 1890 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
1815 /* 1893 */ // Label 106: @1893
1816 /* 1893 */ GIM_Reject,
1817 /* 1894 */ // Label 24: @1894
1818 /* 1894 */ GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(1917), // Rule ID 17 //
1819 /* 1899 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1820 /* 1902 */ // MIs[0] dst
1821 /* 1902 */ // No operand predicates
1822 /* 1902 */ // MIs[0] lhs
1823 /* 1902 */ // No operand predicates
1824 /* 1902 */ // MIs[0] Operand 2
1825 /* 1902 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1826 /* 1906 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1827 /* 1911 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[9]]
1828 /* 1911 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1829 /* 1916 */ GIR_EraseRootFromParent_Done,
1830 /* 1917 */ // Label 107: @1917
1831 /* 1917 */ GIM_Reject,
1832 /* 1918 */ // Label 25: @1918
1833 /* 1918 */ GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(1941), // Rule ID 16 //
1834 /* 1923 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1835 /* 1926 */ // MIs[0] dst
1836 /* 1926 */ // No operand predicates
1837 /* 1926 */ // MIs[0] lhs
1838 /* 1926 */ // No operand predicates
1839 /* 1926 */ // MIs[0] Operand 2
1840 /* 1926 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1841 /* 1930 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1842 /* 1935 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[8]]
1843 /* 1935 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1844 /* 1940 */ GIR_EraseRootFromParent_Done,
1845 /* 1941 */ // Label 108: @1941
1846 /* 1941 */ GIM_Reject,
1847 /* 1942 */ // Label 26: @1942
1848 /* 1942 */ GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(1965), // Rule ID 7 //
1849 /* 1947 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1850 /* 1950 */ // MIs[0] dst
1851 /* 1950 */ // No operand predicates
1852 /* 1950 */ // MIs[0] cond
1853 /* 1950 */ // No operand predicates
1854 /* 1950 */ // MIs[0] tval
1855 /* 1950 */ // No operand predicates
1856 /* 1950 */ // MIs[0] fval
1857 /* 1950 */ // No operand predicates
1858 /* 1950 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
1859 /* 1954 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1860 /* 1959 */ // Combiner Rule #5: select_same_val_equiv
1861 /* 1959 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1862 /* 1964 */ GIR_EraseRootFromParent_Done,
1863 /* 1965 */ // Label 109: @1965
1864 /* 1965 */ GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(1989), // Rule ID 6 //
1865 /* 1970 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
1866 /* 1973 */ // MIs[0] dst
1867 /* 1973 */ // No operand predicates
1868 /* 1973 */ // MIs[0] cond
1869 /* 1973 */ // No operand predicates
1870 /* 1973 */ // MIs[0] x
1871 /* 1973 */ // No operand predicates
1872 /* 1973 */ // MIs[0] x
1873 /* 1973 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/3, /*OtherMI*/0, /*OtherOpIdx*/2,
1874 /* 1978 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1875 /* 1983 */ // Combiner Rule #4: select_same_val_trivial
1876 /* 1983 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
1877 /* 1988 */ GIR_EraseRootFromParent_Done,
1878 /* 1989 */ // Label 110: @1989
1879 /* 1989 */ GIM_Reject,
1880 /* 1990 */ // Label 27: @1990
1881 /* 1990 */ GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(2017), // Rule ID 73 //
1882 /* 1995 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule48Enabled),
1883 /* 1998 */ // MIs[0] dst
1884 /* 1998 */ // No operand predicates
1885 /* 1998 */ // MIs[0] carry
1886 /* 1998 */ // No operand predicates
1887 /* 1998 */ // MIs[0] lhs
1888 /* 1998 */ // No operand predicates
1889 /* 1998 */ // MIs[0] rhs
1890 /* 1998 */ // No operand predicates
1891 /* 1998 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1892 /* 2002 */ // Combiner Rule #48: G_UADDO_commute_constant_to_rhs
1893 /* 2002 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UADDO),
1894 /* 2005 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1895 /* 2007 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry
1896 /* 2009 */ GIR_RootToRootCopy, /*OpIdx*/3, // rhs
1897 /* 2011 */ GIR_RootToRootCopy, /*OpIdx*/2, // lhs
1898 /* 2013 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1899 /* 2016 */ GIR_EraseRootFromParent_Done,
1900 /* 2017 */ // Label 111: @2017
1901 /* 2017 */ GIM_Reject,
1902 /* 2018 */ // Label 28: @2018
1903 /* 2018 */ GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(2045), // Rule ID 74 //
1904 /* 2023 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule49Enabled),
1905 /* 2026 */ // MIs[0] dst
1906 /* 2026 */ // No operand predicates
1907 /* 2026 */ // MIs[0] carry
1908 /* 2026 */ // No operand predicates
1909 /* 2026 */ // MIs[0] lhs
1910 /* 2026 */ // No operand predicates
1911 /* 2026 */ // MIs[0] rhs
1912 /* 2026 */ // No operand predicates
1913 /* 2026 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1914 /* 2030 */ // Combiner Rule #49: G_SADDO_commute_constant_to_rhs
1915 /* 2030 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SADDO),
1916 /* 2033 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1917 /* 2035 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry
1918 /* 2037 */ GIR_RootToRootCopy, /*OpIdx*/3, // rhs
1919 /* 2039 */ GIR_RootToRootCopy, /*OpIdx*/2, // lhs
1920 /* 2041 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1921 /* 2044 */ GIR_EraseRootFromParent_Done,
1922 /* 2045 */ // Label 112: @2045
1923 /* 2045 */ GIM_Reject,
1924 /* 2046 */ // Label 29: @2046
1925 /* 2046 */ GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(2073), // Rule ID 75 //
1926 /* 2051 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule50Enabled),
1927 /* 2054 */ // MIs[0] dst
1928 /* 2054 */ // No operand predicates
1929 /* 2054 */ // MIs[0] carry
1930 /* 2054 */ // No operand predicates
1931 /* 2054 */ // MIs[0] lhs
1932 /* 2054 */ // No operand predicates
1933 /* 2054 */ // MIs[0] rhs
1934 /* 2054 */ // No operand predicates
1935 /* 2054 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1936 /* 2058 */ // Combiner Rule #50: G_UMULO_commute_constant_to_rhs
1937 /* 2058 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UMULO),
1938 /* 2061 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1939 /* 2063 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry
1940 /* 2065 */ GIR_RootToRootCopy, /*OpIdx*/3, // rhs
1941 /* 2067 */ GIR_RootToRootCopy, /*OpIdx*/2, // lhs
1942 /* 2069 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1943 /* 2072 */ GIR_EraseRootFromParent_Done,
1944 /* 2073 */ // Label 113: @2073
1945 /* 2073 */ GIM_Reject,
1946 /* 2074 */ // Label 30: @2074
1947 /* 2074 */ GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(2101), // Rule ID 76 //
1948 /* 2079 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule51Enabled),
1949 /* 2082 */ // MIs[0] dst
1950 /* 2082 */ // No operand predicates
1951 /* 2082 */ // MIs[0] carry
1952 /* 2082 */ // No operand predicates
1953 /* 2082 */ // MIs[0] lhs
1954 /* 2082 */ // No operand predicates
1955 /* 2082 */ // MIs[0] rhs
1956 /* 2082 */ // No operand predicates
1957 /* 2082 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1958 /* 2086 */ // Combiner Rule #51: G_SMULO_commute_constant_to_rhs
1959 /* 2086 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SMULO),
1960 /* 2089 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1961 /* 2091 */ GIR_RootToRootCopy, /*OpIdx*/1, // carry
1962 /* 2093 */ GIR_RootToRootCopy, /*OpIdx*/3, // rhs
1963 /* 2095 */ GIR_RootToRootCopy, /*OpIdx*/2, // lhs
1964 /* 2097 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1965 /* 2100 */ GIR_EraseRootFromParent_Done,
1966 /* 2101 */ // Label 114: @2101
1967 /* 2101 */ GIM_Reject,
1968 /* 2102 */ // Label 31: @2102
1969 /* 2102 */ GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(2127), // Rule ID 65 //
1970 /* 2107 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule40Enabled),
1971 /* 2110 */ // MIs[0] dst
1972 /* 2110 */ // No operand predicates
1973 /* 2110 */ // MIs[0] lhs
1974 /* 2110 */ // No operand predicates
1975 /* 2110 */ // MIs[0] rhs
1976 /* 2110 */ // No operand predicates
1977 /* 2110 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1978 /* 2114 */ // Combiner Rule #40: G_UMULH_commute_constant_to_rhs
1979 /* 2114 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UMULH),
1980 /* 2117 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1981 /* 2119 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
1982 /* 2121 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
1983 /* 2123 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
1984 /* 2126 */ GIR_EraseRootFromParent_Done,
1985 /* 2127 */ // Label 115: @2127
1986 /* 2127 */ GIM_Reject,
1987 /* 2128 */ // Label 32: @2128
1988 /* 2128 */ GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(2153), // Rule ID 66 //
1989 /* 2133 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule41Enabled),
1990 /* 2136 */ // MIs[0] dst
1991 /* 2136 */ // No operand predicates
1992 /* 2136 */ // MIs[0] lhs
1993 /* 2136 */ // No operand predicates
1994 /* 2136 */ // MIs[0] rhs
1995 /* 2136 */ // No operand predicates
1996 /* 2136 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
1997 /* 2140 */ // Combiner Rule #41: G_SMULH_commute_constant_to_rhs
1998 /* 2140 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SMULH),
1999 /* 2143 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2000 /* 2145 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2001 /* 2147 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2002 /* 2149 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2003 /* 2152 */ GIR_EraseRootFromParent_Done,
2004 /* 2153 */ // Label 116: @2153
2005 /* 2153 */ GIM_Reject,
2006 /* 2154 */ // Label 33: @2154
2007 /* 2154 */ GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(2179), // Rule ID 67 //
2008 /* 2159 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule42Enabled),
2009 /* 2162 */ // MIs[0] dst
2010 /* 2162 */ // No operand predicates
2011 /* 2162 */ // MIs[0] lhs
2012 /* 2162 */ // No operand predicates
2013 /* 2162 */ // MIs[0] rhs
2014 /* 2162 */ // No operand predicates
2015 /* 2162 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2016 /* 2166 */ // Combiner Rule #42: G_UADDSAT_commute_constant_to_rhs
2017 /* 2166 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UADDSAT),
2018 /* 2169 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2019 /* 2171 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2020 /* 2173 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2021 /* 2175 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2022 /* 2178 */ GIR_EraseRootFromParent_Done,
2023 /* 2179 */ // Label 117: @2179
2024 /* 2179 */ GIM_Reject,
2025 /* 2180 */ // Label 34: @2180
2026 /* 2180 */ GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(2205), // Rule ID 68 //
2027 /* 2185 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule43Enabled),
2028 /* 2188 */ // MIs[0] dst
2029 /* 2188 */ // No operand predicates
2030 /* 2188 */ // MIs[0] lhs
2031 /* 2188 */ // No operand predicates
2032 /* 2188 */ // MIs[0] rhs
2033 /* 2188 */ // No operand predicates
2034 /* 2188 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2035 /* 2192 */ // Combiner Rule #43: G_SADDSAT_commute_constant_to_rhs
2036 /* 2192 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SADDSAT),
2037 /* 2195 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2038 /* 2197 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2039 /* 2199 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2040 /* 2201 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2041 /* 2204 */ GIR_EraseRootFromParent_Done,
2042 /* 2205 */ // Label 118: @2205
2043 /* 2205 */ GIM_Reject,
2044 /* 2206 */ // Label 35: @2206
2045 /* 2206 */ GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(2217), // Rule ID 55 //
2046 /* 2211 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
2047 /* 2214 */ // MIs[0] d
2048 /* 2214 */ // No operand predicates
2049 /* 2214 */ // MIs[0] mi.base
2050 /* 2214 */ // No operand predicates
2051 /* 2214 */ // MIs[0] mi.amt
2052 /* 2214 */ // No operand predicates
2053 /* 2214 */ // Combiner Rule #30: shift_immed_chain @ [mi[4]]
2054 /* 2214 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
2055 /* 2217 */ // Label 119: @2217
2056 /* 2217 */ GIM_Reject,
2057 /* 2218 */ // Label 36: @2218
2058 /* 2218 */ GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(2229), // Rule ID 54 //
2059 /* 2223 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
2060 /* 2226 */ // MIs[0] d
2061 /* 2226 */ // No operand predicates
2062 /* 2226 */ // MIs[0] mi.base
2063 /* 2226 */ // No operand predicates
2064 /* 2226 */ // MIs[0] mi.amt
2065 /* 2226 */ // No operand predicates
2066 /* 2226 */ // Combiner Rule #30: shift_immed_chain @ [mi[3]]
2067 /* 2226 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
2068 /* 2229 */ // Label 120: @2229
2069 /* 2229 */ GIM_Reject,
2070 /* 2230 */ // Label 37: @2230
2071 /* 2230 */ GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(2257), // Rule ID 69 //
2072 /* 2235 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule44Enabled),
2073 /* 2238 */ // MIs[0] dst
2074 /* 2238 */ // No operand predicates
2075 /* 2238 */ // MIs[0] lhs
2076 /* 2238 */ // No operand predicates
2077 /* 2238 */ // MIs[0] rhs
2078 /* 2238 */ // No operand predicates
2079 /* 2238 */ // MIs[0] scale
2080 /* 2238 */ // No operand predicates
2081 /* 2238 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2082 /* 2242 */ // Combiner Rule #44: G_SMULFIX_commute_constant_to_rhs
2083 /* 2242 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SMULFIX),
2084 /* 2245 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2085 /* 2247 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2086 /* 2249 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2087 /* 2251 */ GIR_RootToRootCopy, /*OpIdx*/3, // scale
2088 /* 2253 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2089 /* 2256 */ GIR_EraseRootFromParent_Done,
2090 /* 2257 */ // Label 121: @2257
2091 /* 2257 */ GIM_Reject,
2092 /* 2258 */ // Label 38: @2258
2093 /* 2258 */ GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(2285), // Rule ID 70 //
2094 /* 2263 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule45Enabled),
2095 /* 2266 */ // MIs[0] dst
2096 /* 2266 */ // No operand predicates
2097 /* 2266 */ // MIs[0] lhs
2098 /* 2266 */ // No operand predicates
2099 /* 2266 */ // MIs[0] rhs
2100 /* 2266 */ // No operand predicates
2101 /* 2266 */ // MIs[0] scale
2102 /* 2266 */ // No operand predicates
2103 /* 2266 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2104 /* 2270 */ // Combiner Rule #45: G_UMULFIX_commute_constant_to_rhs
2105 /* 2270 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UMULFIX),
2106 /* 2273 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2107 /* 2275 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2108 /* 2277 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2109 /* 2279 */ GIR_RootToRootCopy, /*OpIdx*/3, // scale
2110 /* 2281 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2111 /* 2284 */ GIR_EraseRootFromParent_Done,
2112 /* 2285 */ // Label 122: @2285
2113 /* 2285 */ GIM_Reject,
2114 /* 2286 */ // Label 39: @2286
2115 /* 2286 */ GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(2313), // Rule ID 71 //
2116 /* 2291 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule46Enabled),
2117 /* 2294 */ // MIs[0] dst
2118 /* 2294 */ // No operand predicates
2119 /* 2294 */ // MIs[0] lhs
2120 /* 2294 */ // No operand predicates
2121 /* 2294 */ // MIs[0] rhs
2122 /* 2294 */ // No operand predicates
2123 /* 2294 */ // MIs[0] scale
2124 /* 2294 */ // No operand predicates
2125 /* 2294 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2126 /* 2298 */ // Combiner Rule #46: G_SMULFIXSAT_commute_constant_to_rhs
2127 /* 2298 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SMULFIXSAT),
2128 /* 2301 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2129 /* 2303 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2130 /* 2305 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2131 /* 2307 */ GIR_RootToRootCopy, /*OpIdx*/3, // scale
2132 /* 2309 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2133 /* 2312 */ GIR_EraseRootFromParent_Done,
2134 /* 2313 */ // Label 123: @2313
2135 /* 2313 */ GIM_Reject,
2136 /* 2314 */ // Label 40: @2314
2137 /* 2314 */ GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(2341), // Rule ID 72 //
2138 /* 2319 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule47Enabled),
2139 /* 2322 */ // MIs[0] dst
2140 /* 2322 */ // No operand predicates
2141 /* 2322 */ // MIs[0] lhs
2142 /* 2322 */ // No operand predicates
2143 /* 2322 */ // MIs[0] rhs
2144 /* 2322 */ // No operand predicates
2145 /* 2322 */ // MIs[0] scale
2146 /* 2322 */ // No operand predicates
2147 /* 2322 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2148 /* 2326 */ // Combiner Rule #47: G_UMULFIXSAT_commute_constant_to_rhs
2149 /* 2326 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UMULFIXSAT),
2150 /* 2329 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2151 /* 2331 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2152 /* 2333 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2153 /* 2335 */ GIR_RootToRootCopy, /*OpIdx*/3, // scale
2154 /* 2337 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2155 /* 2340 */ GIR_EraseRootFromParent_Done,
2156 /* 2341 */ // Label 124: @2341
2157 /* 2341 */ GIM_Reject,
2158 /* 2342 */ // Label 41: @2342
2159 /* 2342 */ GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(2371), // Rule ID 49 //
2160 /* 2347 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
2161 /* 2350 */ GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::FmNsz),
2162 /* 2356 */ // MIs[0] dst
2163 /* 2356 */ // No operand predicates
2164 /* 2356 */ // MIs[0] x
2165 /* 2356 */ // No operand predicates
2166 /* 2356 */ // MIs[0] y
2167 /* 2356 */ // No operand predicates
2168 /* 2356 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner9),
2169 /* 2360 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2170 /* 2365 */ // Combiner Rule #28: right_identity_neg_zero_fp_nsz
2171 /* 2365 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2172 /* 2370 */ GIR_EraseRootFromParent_Done,
2173 /* 2371 */ // Label 125: @2371
2174 /* 2371 */ GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(2394), // Rule ID 48 //
2175 /* 2376 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
2176 /* 2379 */ // MIs[0] dst
2177 /* 2379 */ // No operand predicates
2178 /* 2379 */ // MIs[0] x
2179 /* 2379 */ // No operand predicates
2180 /* 2379 */ // MIs[0] y
2181 /* 2379 */ // No operand predicates
2182 /* 2379 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner8),
2183 /* 2383 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2184 /* 2388 */ // Combiner Rule #27: right_identity_neg_zero_fp
2185 /* 2388 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2186 /* 2393 */ GIR_EraseRootFromParent_Done,
2187 /* 2394 */ // Label 126: @2394
2188 /* 2394 */ GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(2419), // Rule ID 77 //
2189 /* 2399 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule52Enabled),
2190 /* 2402 */ // MIs[0] dst
2191 /* 2402 */ // No operand predicates
2192 /* 2402 */ // MIs[0] lhs
2193 /* 2402 */ // No operand predicates
2194 /* 2402 */ // MIs[0] rhs
2195 /* 2402 */ // No operand predicates
2196 /* 2402 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2197 /* 2406 */ // Combiner Rule #52: G_FADD_commute_fp_constant_to_rhs
2198 /* 2406 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FADD),
2199 /* 2409 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2200 /* 2411 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2201 /* 2413 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2202 /* 2415 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2203 /* 2418 */ GIR_EraseRootFromParent_Done,
2204 /* 2419 */ // Label 127: @2419
2205 /* 2419 */ GIM_Reject,
2206 /* 2420 */ // Label 42: @2420
2207 /* 2420 */ GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(2443), // Rule ID 38 //
2208 /* 2425 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
2209 /* 2428 */ // MIs[0] dst
2210 /* 2428 */ // No operand predicates
2211 /* 2428 */ // MIs[0] x
2212 /* 2428 */ // No operand predicates
2213 /* 2428 */ // MIs[0] y
2214 /* 2428 */ // No operand predicates
2215 /* 2428 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner6),
2216 /* 2432 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2217 /* 2437 */ // Combiner Rule #18: right_identity_one_fp
2218 /* 2437 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2219 /* 2442 */ GIR_EraseRootFromParent_Done,
2220 /* 2443 */ // Label 128: @2443
2221 /* 2443 */ GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(2463), // Rule ID 50 //
2222 /* 2448 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
2223 /* 2451 */ // MIs[0] dst
2224 /* 2451 */ // No operand predicates
2225 /* 2451 */ // MIs[0] x
2226 /* 2451 */ // No operand predicates
2227 /* 2451 */ // MIs[0] y
2228 /* 2451 */ // No operand predicates
2229 /* 2451 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner10),
2230 /* 2455 */ // Combiner Rule #29: right_identity_neg_one_fp
2231 /* 2455 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG),
2232 /* 2458 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2233 /* 2460 */ GIR_RootToRootCopy, /*OpIdx*/1, // x
2234 /* 2462 */ GIR_EraseRootFromParent_Done,
2235 /* 2463 */ // Label 129: @2463
2236 /* 2463 */ GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(2488), // Rule ID 78 //
2237 /* 2468 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule53Enabled),
2238 /* 2471 */ // MIs[0] dst
2239 /* 2471 */ // No operand predicates
2240 /* 2471 */ // MIs[0] lhs
2241 /* 2471 */ // No operand predicates
2242 /* 2471 */ // MIs[0] rhs
2243 /* 2471 */ // No operand predicates
2244 /* 2471 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2245 /* 2475 */ // Combiner Rule #53: G_FMUL_commute_fp_constant_to_rhs
2246 /* 2475 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FMUL),
2247 /* 2478 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2248 /* 2480 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2249 /* 2482 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2250 /* 2484 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2251 /* 2487 */ GIR_EraseRootFromParent_Done,
2252 /* 2488 */ // Label 130: @2488
2253 /* 2488 */ GIM_Reject,
2254 /* 2489 */ // Label 43: @2489
2255 /* 2489 */ GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(2518), // Rule ID 36 //
2256 /* 2494 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
2257 /* 2497 */ // MIs[0] dst
2258 /* 2497 */ // No operand predicates
2259 /* 2497 */ // MIs[0] t
2260 /* 2497 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2261 /* 2501 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
2262 /* 2505 */ // MIs[1] src
2263 /* 2505 */ // No operand predicates
2264 /* 2505 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2265 /* 2510 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2266 /* 2512 */ // Combiner Rule #16: fneg_fneg_fold
2267 /* 2512 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2268 /* 2517 */ GIR_EraseRootFromParent_Done,
2269 /* 2518 */ // Label 131: @2518
2270 /* 2518 */ GIM_Reject,
2271 /* 2519 */ // Label 44: @2519
2272 /* 2519 */ GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(2552), // Rule ID 47 //
2273 /* 2524 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
2274 /* 2527 */ // MIs[0] dst
2275 /* 2527 */ // No operand predicates
2276 /* 2527 */ // MIs[0] src1
2277 /* 2527 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
2278 /* 2531 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT),
2279 /* 2535 */ // MIs[1] src0
2280 /* 2535 */ // No operand predicates
2281 /* 2535 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
2282 /* 2539 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2283 /* 2544 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
2284 /* 2546 */ // Combiner Rule #26: fptrunc_fpext_fold
2285 /* 2546 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
2286 /* 2551 */ GIR_EraseRootFromParent_Done,
2287 /* 2552 */ // Label 132: @2552
2288 /* 2552 */ GIM_Reject,
2289 /* 2553 */ // Label 45: @2553
2290 /* 2553 */ GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(2578), // Rule ID 79 //
2291 /* 2558 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule54Enabled),
2292 /* 2561 */ // MIs[0] dst
2293 /* 2561 */ // No operand predicates
2294 /* 2561 */ // MIs[0] lhs
2295 /* 2561 */ // No operand predicates
2296 /* 2561 */ // MIs[0] rhs
2297 /* 2561 */ // No operand predicates
2298 /* 2561 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2299 /* 2565 */ // Combiner Rule #54: G_FMINNUM_commute_fp_constant_to_rhs
2300 /* 2565 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FMINNUM),
2301 /* 2568 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2302 /* 2570 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2303 /* 2572 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2304 /* 2574 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2305 /* 2577 */ GIR_EraseRootFromParent_Done,
2306 /* 2578 */ // Label 133: @2578
2307 /* 2578 */ GIM_Reject,
2308 /* 2579 */ // Label 46: @2579
2309 /* 2579 */ GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(2604), // Rule ID 80 //
2310 /* 2584 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule55Enabled),
2311 /* 2587 */ // MIs[0] dst
2312 /* 2587 */ // No operand predicates
2313 /* 2587 */ // MIs[0] lhs
2314 /* 2587 */ // No operand predicates
2315 /* 2587 */ // MIs[0] rhs
2316 /* 2587 */ // No operand predicates
2317 /* 2587 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2318 /* 2591 */ // Combiner Rule #55: G_FMAXNUM_commute_fp_constant_to_rhs
2319 /* 2591 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FMAXNUM),
2320 /* 2594 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2321 /* 2596 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2322 /* 2598 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2323 /* 2600 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2324 /* 2603 */ GIR_EraseRootFromParent_Done,
2325 /* 2604 */ // Label 134: @2604
2326 /* 2604 */ GIM_Reject,
2327 /* 2605 */ // Label 47: @2605
2328 /* 2605 */ GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(2630), // Rule ID 81 //
2329 /* 2610 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule56Enabled),
2330 /* 2613 */ // MIs[0] dst
2331 /* 2613 */ // No operand predicates
2332 /* 2613 */ // MIs[0] lhs
2333 /* 2613 */ // No operand predicates
2334 /* 2613 */ // MIs[0] rhs
2335 /* 2613 */ // No operand predicates
2336 /* 2613 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2337 /* 2617 */ // Combiner Rule #56: G_FMINNUM_IEEE_commute_fp_constant_to_rhs
2338 /* 2617 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FMINNUM_IEEE),
2339 /* 2620 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2340 /* 2622 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2341 /* 2624 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2342 /* 2626 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2343 /* 2629 */ GIR_EraseRootFromParent_Done,
2344 /* 2630 */ // Label 135: @2630
2345 /* 2630 */ GIM_Reject,
2346 /* 2631 */ // Label 48: @2631
2347 /* 2631 */ GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(2656), // Rule ID 82 //
2348 /* 2636 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule57Enabled),
2349 /* 2639 */ // MIs[0] dst
2350 /* 2639 */ // No operand predicates
2351 /* 2639 */ // MIs[0] lhs
2352 /* 2639 */ // No operand predicates
2353 /* 2639 */ // MIs[0] rhs
2354 /* 2639 */ // No operand predicates
2355 /* 2639 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2356 /* 2643 */ // Combiner Rule #57: G_FMAXNUM_IEEE_commute_fp_constant_to_rhs
2357 /* 2643 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FMAXNUM_IEEE),
2358 /* 2646 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2359 /* 2648 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2360 /* 2650 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2361 /* 2652 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2362 /* 2655 */ GIR_EraseRootFromParent_Done,
2363 /* 2656 */ // Label 136: @2656
2364 /* 2656 */ GIM_Reject,
2365 /* 2657 */ // Label 49: @2657
2366 /* 2657 */ GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(2682), // Rule ID 83 //
2367 /* 2662 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule58Enabled),
2368 /* 2665 */ // MIs[0] dst
2369 /* 2665 */ // No operand predicates
2370 /* 2665 */ // MIs[0] lhs
2371 /* 2665 */ // No operand predicates
2372 /* 2665 */ // MIs[0] rhs
2373 /* 2665 */ // No operand predicates
2374 /* 2665 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2375 /* 2669 */ // Combiner Rule #58: G_FMINIMUM_commute_fp_constant_to_rhs
2376 /* 2669 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FMINIMUM),
2377 /* 2672 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2378 /* 2674 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2379 /* 2676 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2380 /* 2678 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2381 /* 2681 */ GIR_EraseRootFromParent_Done,
2382 /* 2682 */ // Label 137: @2682
2383 /* 2682 */ GIM_Reject,
2384 /* 2683 */ // Label 50: @2683
2385 /* 2683 */ GIM_Try, /*On fail goto*//*Label 138*/ GIMT_Encode4(2708), // Rule ID 84 //
2386 /* 2688 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule59Enabled),
2387 /* 2691 */ // MIs[0] dst
2388 /* 2691 */ // No operand predicates
2389 /* 2691 */ // MIs[0] lhs
2390 /* 2691 */ // No operand predicates
2391 /* 2691 */ // MIs[0] rhs
2392 /* 2691 */ // No operand predicates
2393 /* 2691 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner12),
2394 /* 2695 */ // Combiner Rule #59: G_FMAXIMUM_commute_fp_constant_to_rhs
2395 /* 2695 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FMAXIMUM),
2396 /* 2698 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2397 /* 2700 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2398 /* 2702 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2399 /* 2704 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2400 /* 2707 */ GIR_EraseRootFromParent_Done,
2401 /* 2708 */ // Label 138: @2708
2402 /* 2708 */ GIM_Reject,
2403 /* 2709 */ // Label 51: @2709
2404 /* 2709 */ GIM_Try, /*On fail goto*//*Label 139*/ GIMT_Encode4(2732), // Rule ID 15 //
2405 /* 2714 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
2406 /* 2717 */ // MIs[0] dst
2407 /* 2717 */ // No operand predicates
2408 /* 2717 */ // MIs[0] lhs
2409 /* 2717 */ // No operand predicates
2410 /* 2717 */ // MIs[0] Operand 2
2411 /* 2717 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
2412 /* 2721 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2413 /* 2726 */ // Combiner Rule #6: right_identity_zero @ [__right_identity_zero_match_0[7]]
2414 /* 2726 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
2415 /* 2731 */ GIR_EraseRootFromParent_Done,
2416 /* 2732 */ // Label 139: @2732
2417 /* 2732 */ GIM_Reject,
2418 /* 2733 */ // Label 52: @2733
2419 /* 2733 */ GIM_Try, /*On fail goto*//*Label 140*/ GIMT_Encode4(2758), // Rule ID 61 //
2420 /* 2738 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled),
2421 /* 2741 */ // MIs[0] dst
2422 /* 2741 */ // No operand predicates
2423 /* 2741 */ // MIs[0] lhs
2424 /* 2741 */ // No operand predicates
2425 /* 2741 */ // MIs[0] rhs
2426 /* 2741 */ // No operand predicates
2427 /* 2741 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2428 /* 2745 */ // Combiner Rule #36: G_SMIN_commute_constant_to_rhs
2429 /* 2745 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SMIN),
2430 /* 2748 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2431 /* 2750 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2432 /* 2752 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2433 /* 2754 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2434 /* 2757 */ GIR_EraseRootFromParent_Done,
2435 /* 2758 */ // Label 140: @2758
2436 /* 2758 */ GIM_Reject,
2437 /* 2759 */ // Label 53: @2759
2438 /* 2759 */ GIM_Try, /*On fail goto*//*Label 141*/ GIMT_Encode4(2784), // Rule ID 62 //
2439 /* 2764 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled),
2440 /* 2767 */ // MIs[0] dst
2441 /* 2767 */ // No operand predicates
2442 /* 2767 */ // MIs[0] lhs
2443 /* 2767 */ // No operand predicates
2444 /* 2767 */ // MIs[0] rhs
2445 /* 2767 */ // No operand predicates
2446 /* 2767 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2447 /* 2771 */ // Combiner Rule #37: G_SMAX_commute_constant_to_rhs
2448 /* 2771 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SMAX),
2449 /* 2774 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2450 /* 2776 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2451 /* 2778 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2452 /* 2780 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2453 /* 2783 */ GIR_EraseRootFromParent_Done,
2454 /* 2784 */ // Label 141: @2784
2455 /* 2784 */ GIM_Reject,
2456 /* 2785 */ // Label 54: @2785
2457 /* 2785 */ GIM_Try, /*On fail goto*//*Label 142*/ GIMT_Encode4(2810), // Rule ID 63 //
2458 /* 2790 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule38Enabled),
2459 /* 2793 */ // MIs[0] dst
2460 /* 2793 */ // No operand predicates
2461 /* 2793 */ // MIs[0] lhs
2462 /* 2793 */ // No operand predicates
2463 /* 2793 */ // MIs[0] rhs
2464 /* 2793 */ // No operand predicates
2465 /* 2793 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2466 /* 2797 */ // Combiner Rule #38: G_UMIN_commute_constant_to_rhs
2467 /* 2797 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UMIN),
2468 /* 2800 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2469 /* 2802 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2470 /* 2804 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2471 /* 2806 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2472 /* 2809 */ GIR_EraseRootFromParent_Done,
2473 /* 2810 */ // Label 142: @2810
2474 /* 2810 */ GIM_Reject,
2475 /* 2811 */ // Label 55: @2811
2476 /* 2811 */ GIM_Try, /*On fail goto*//*Label 143*/ GIMT_Encode4(2836), // Rule ID 64 //
2477 /* 2816 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule39Enabled),
2478 /* 2819 */ // MIs[0] dst
2479 /* 2819 */ // No operand predicates
2480 /* 2819 */ // MIs[0] lhs
2481 /* 2819 */ // No operand predicates
2482 /* 2819 */ // MIs[0] rhs
2483 /* 2819 */ // No operand predicates
2484 /* 2819 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner11),
2485 /* 2823 */ // Combiner Rule #39: G_UMAX_commute_constant_to_rhs
2486 /* 2823 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_UMAX),
2487 /* 2826 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
2488 /* 2828 */ GIR_RootToRootCopy, /*OpIdx*/2, // rhs
2489 /* 2830 */ GIR_RootToRootCopy, /*OpIdx*/1, // lhs
2490 /* 2832 */ GIR_CopyMIFlags, /*InsnID*/0, /*OldInsnID*/0,
2491 /* 2835 */ GIR_EraseRootFromParent_Done,
2492 /* 2836 */ // Label 143: @2836
2493 /* 2836 */ GIM_Reject,
2494 /* 2837 */ // Label 56: @2837
2495 /* 2837 */ GIM_Reject,
2496 /* 2838 */ }; // Size: 2838 bytes
2497 return MatchTable0;
2498}
2499#undef GIMT_Encode2
2500#undef GIMT_Encode4
2501#undef GIMT_Encode8
2502
2503LLT RISCVPostLegalizerCombinerImpl::getLLTForHwMode(unsigned Index) const {
2504 llvm_unreachable("Unexpected index");
2505}
2506
2507
2508#endif // GET_GICOMBINER_IMPL
2509
2510#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
2511
2512AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
2513AvailableFunctionFeatures()
2514
2515#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
2516
2517#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
2518
2519, State(0),
2520ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
2521
2522#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
2523
2524