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