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