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