1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* RISCVPostLegalizerCombinerImpl Combiner Match Table *|
4|* *|
5|* Automatically generated file, do not edit! *|
6|* *|
7\*===----------------------------------------------------------------------===*/
8
9#ifdef GET_GICOMBINER_DEPS
10
11#include "llvm/ADT/SparseBitVector.h"
12namespace llvm {
13
14extern cl::OptionCategory GICombinerOptionCategory;
15
16} // namespace llvm
17
18#endif // GET_GICOMBINER_DEPS
19
20#ifdef GET_GICOMBINER_TYPES
21
22struct RISCVPostLegalizerCombinerImplRuleConfig {
23 SparseBitVector<> DisabledRules;
24
25 bool isRuleEnabled(unsigned RuleID) const;
26 bool parseCommandLineOption();
27 bool setRuleEnabled(StringRef RuleIdentifier);
28 bool setRuleDisabled(StringRef RuleIdentifier);
29};
30
31static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) {
32 uint64_t I;
33 // getAtInteger(...) returns false on success
34 bool Parsed = !RuleIdentifier.getAsInteger(0, I);
35 if (Parsed)
36 return I;
37
38#ifndef NDEBUG
39 switch (RuleIdentifier.size()) {
40 default: break;
41 case 10: // 3 strings to match.
42 switch (RuleIdentifier[0]) {
43 default: break;
44 case 'i': // 1 string to match.
45 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i", 9) != 0)
46 break;
47 return 11; // "i2p_to_p2i"
48 case 'p': // 1 string to match.
49 if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p", 9) != 0)
50 break;
51 return 10; // "p2i_to_i2p"
52 case 's': // 1 string to match.
53 if (memcmp(RuleIdentifier.data()+1, "ub_to_add", 9) != 0)
54 break;
55 return 0; // "sub_to_add"
56 }
57 break;
58 case 11: // 1 string to match.
59 if (memcmp(RuleIdentifier.data()+0, "add_sub_reg", 11) != 0)
60 break;
61 return 16; // "add_sub_reg"
62 case 13: // 3 strings to match.
63 switch (RuleIdentifier[0]) {
64 default: break;
65 case 'l': // 1 string to match.
66 if (memcmp(RuleIdentifier.data()+1, "oad_and_mask", 12) != 0)
67 break;
68 return 2; // "load_and_mask"
69 case 'r': // 1 string to match.
70 if (memcmp(RuleIdentifier.data()+1, "edundant_and", 12) != 0)
71 break;
72 return 3; // "redundant_and"
73 case 's': // 1 string to match.
74 if (memcmp(RuleIdentifier.data()+1, "ame_val_zero", 12) != 0)
75 break;
76 return 7; // "same_val_zero"
77 }
78 break;
79 case 14: // 2 strings to match.
80 switch (RuleIdentifier[0]) {
81 default: break;
82 case 'b': // 1 string to match.
83 if (memcmp(RuleIdentifier.data()+1, "inop_same_val", 13) != 0)
84 break;
85 return 6; // "binop_same_val"
86 case 'f': // 1 string to match.
87 if (memcmp(RuleIdentifier.data()+1, "neg_fneg_fold", 13) != 0)
88 break;
89 return 13; // "fneg_fneg_fold"
90 }
91 break;
92 case 15: // 2 strings to match.
93 switch (RuleIdentifier[0]) {
94 default: break;
95 case 'e': // 1 string to match.
96 if (memcmp(RuleIdentifier.data()+1, "xtending_loads", 14) != 0)
97 break;
98 return 1; // "extending_loads"
99 case 's': // 1 string to match.
100 if (memcmp(RuleIdentifier.data()+1, "elect_same_val", 14) != 0)
101 break;
102 return 4; // "select_same_val"
103 }
104 break;
105 case 17: // 2 strings to match.
106 switch (RuleIdentifier[0]) {
107 default: break;
108 case 'a': // 1 string to match.
109 if (memcmp(RuleIdentifier.data()+1, "nyext_trunc_fold", 16) != 0)
110 break;
111 return 12; // "anyext_trunc_fold"
112 case 's': // 1 string to match.
113 if (memcmp(RuleIdentifier.data()+1, "hift_immed_chain", 16) != 0)
114 break;
115 return 26; // "shift_immed_chain"
116 }
117 break;
118 case 18: // 3 strings to match.
119 switch (RuleIdentifier[0]) {
120 default: break;
121 case 'b': // 1 string to match.
122 if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero", 17) != 0)
123 break;
124 return 8; // "binop_left_to_zero"
125 case 'f': // 2 strings to match.
126 switch (RuleIdentifier[1]) {
127 default: break;
128 case 'o': // 1 string to match.
129 if (memcmp(RuleIdentifier.data()+2, "ld_fp_zero_store", 16) != 0)
130 break;
131 return 30; // "fold_fp_zero_store"
132 case 'p': // 1 string to match.
133 if (memcmp(RuleIdentifier.data()+2, "trunc_fpext_fold", 16) != 0)
134 break;
135 return 22; // "fptrunc_fpext_fold"
136 }
137 break;
138 }
139 break;
140 case 19: // 3 strings to match.
141 switch (RuleIdentifier[0]) {
142 default: break;
143 case 'b': // 1 string to match.
144 if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero", 18) != 0)
145 break;
146 return 9; // "binop_right_to_zero"
147 case 'r': // 1 string to match.
148 if (memcmp(RuleIdentifier.data()+1, "ight_identity_zero", 18) != 0)
149 break;
150 return 5; // "right_identity_zero"
151 case 's': // 1 string to match.
152 if (memcmp(RuleIdentifier.data()+1, "implify_neg_minmax", 18) != 0)
153 break;
154 return 29; // "simplify_neg_minmax"
155 }
156 break;
157 case 20: // 1 string to match.
158 if (memcmp(RuleIdentifier.data()+0, "bitcast_bitcast_fold", 20) != 0)
159 break;
160 return 20; // "bitcast_bitcast_fold"
161 case 21: // 1 string to match.
162 if (memcmp(RuleIdentifier.data()+0, "right_identity_one_fp", 21) != 0)
163 break;
164 return 15; // "right_identity_one_fp"
165 case 22: // 2 strings to match.
166 switch (RuleIdentifier[0]) {
167 default: break;
168 case 'r': // 1 string to match.
169 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_int", 21) != 0)
170 break;
171 return 14; // "right_identity_one_int"
172 case 't': // 1 string to match.
173 if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold", 21) != 0)
174 break;
175 return 18; // "trunc_buildvector_fold"
176 }
177 break;
178 case 25: // 2 strings to match.
179 switch (RuleIdentifier[0]) {
180 default: break;
181 case 'b': // 1 string to match.
182 if (memcmp(RuleIdentifier.data()+1, "uildvector_identity_fold", 24) != 0)
183 break;
184 return 17; // "buildvector_identity_fold"
185 case 'r': // 1 string to match.
186 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_one_fp", 24) != 0)
187 break;
188 return 25; // "right_identity_neg_one_fp"
189 }
190 break;
191 case 26: // 3 strings to match.
192 switch (RuleIdentifier[0]) {
193 default: break;
194 case 'b': // 1 string to match.
195 if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_to_bitcast", 25) != 0)
196 break;
197 return 21; // "bitcast_bitcast_to_bitcast"
198 case 'c': // 1 string to match.
199 if (memcmp(RuleIdentifier.data()+1, "ommute_fp_constant_to_rhs", 25) != 0)
200 break;
201 return 28; // "commute_fp_constant_to_rhs"
202 case 'r': // 1 string to match.
203 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp", 25) != 0)
204 break;
205 return 23; // "right_identity_neg_zero_fp"
206 }
207 break;
208 case 27: // 2 strings to match.
209 switch (RuleIdentifier[0]) {
210 default: break;
211 case 'c': // 1 string to match.
212 if (memcmp(RuleIdentifier.data()+1, "ommute_int_constant_to_rhs", 26) != 0)
213 break;
214 return 27; // "commute_int_constant_to_rhs"
215 case 't': // 1 string to match.
216 if (memcmp(RuleIdentifier.data()+1, "runc_lshr_buildvector_fold", 26) != 0)
217 break;
218 return 19; // "trunc_lshr_buildvector_fold"
219 }
220 break;
221 case 30: // 1 string to match.
222 if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_zero_fp_nsz", 30) != 0)
223 break;
224 return 24; // "right_identity_neg_zero_fp_nsz"
225 }
226#endif // ifndef NDEBUG
227
228 return std::nullopt;
229}
230static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
231 std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
232 if (!RangePair.second.empty()) {
233 const auto First = getRuleIdxForIdentifier(RangePair.first);
234 const auto Last = getRuleIdxForIdentifier(RangePair.second);
235 if (!First || !Last)
236 return std::nullopt;
237 if (First >= Last)
238 report_fatal_error("Beginning of range should be before end of range");
239 return {{*First, *Last + 1}};
240 }
241 if (RangePair.first == "*") {
242 return {{0, 31}};
243 }
244 const auto I = getRuleIdxForIdentifier(RangePair.first);
245 if (!I)
246 return std::nullopt;
247 return {{*I, *I + 1}};
248}
249
250bool RISCVPostLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
251 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
252 if (!MaybeRange)
253 return false;
254 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
255 DisabledRules.reset(I);
256 return true;
257}
258
259bool RISCVPostLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
260 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
261 if (!MaybeRange)
262 return false;
263 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
264 DisabledRules.set(I);
265 return true;
266}
267
268static std::vector<std::string> RISCVPostLegalizerCombinerOption;
269static cl::list<std::string> RISCVPostLegalizerCombinerDisableOption(
270 "riscvpostlegalizercombiner-disable-rule",
271 cl::desc("Disable one or more combiner rules temporarily in the RISCVPostLegalizerCombiner pass"),
272 cl::CommaSeparated,
273 cl::Hidden,
274 cl::cat(GICombinerOptionCategory),
275 cl::callback([](const std::string &Str) {
276 RISCVPostLegalizerCombinerOption.push_back(Str);
277 }));
278static cl::list<std::string> RISCVPostLegalizerCombinerOnlyEnableOption(
279 "riscvpostlegalizercombiner-only-enable-rule",
280 cl::desc("Disable all rules in the RISCVPostLegalizerCombiner pass then re-enable the specified ones"),
281 cl::Hidden,
282 cl::cat(GICombinerOptionCategory),
283 cl::callback([](const std::string &CommaSeparatedArg) {
284 StringRef Str = CommaSeparatedArg;
285 RISCVPostLegalizerCombinerOption.push_back("*");
286 do {
287 auto X = Str.split(",");
288 RISCVPostLegalizerCombinerOption.push_back(("!" + X.first).str());
289 Str = X.second;
290 } while (!Str.empty());
291 }));
292
293
294bool RISCVPostLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
295 return !DisabledRules.test(RuleID);
296}
297bool RISCVPostLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
298 for (StringRef Identifier : RISCVPostLegalizerCombinerOption) {
299 bool Enabled = Identifier.consume_front("!");
300 if (Enabled && !setRuleEnabled(Identifier))
301 return false;
302 if (!Enabled && !setRuleDisabled(Identifier))
303 return false;
304 }
305 return true;
306}
307
308
309#endif // GET_GICOMBINER_TYPES
310
311#ifdef GET_GICOMBINER_TYPES
312
313const unsigned MAX_SUBTARGET_PREDICATES = 0;
314using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
315
316#endif // GET_GICOMBINER_TYPES
317
318#ifdef GET_GICOMBINER_CLASS_MEMBERS
319
320 bool canMatchOpcode(unsigned Opc) const override;
321
322#endif // GET_GICOMBINER_CLASS_MEMBERS
323
324#ifdef GET_GICOMBINER_CLASS_MEMBERS
325
326PredicateBitset AvailableModuleFeatures;
327mutable PredicateBitset AvailableFunctionFeatures;
328PredicateBitset getAvailableFeatures() const {
329 return AvailableModuleFeatures | AvailableFunctionFeatures;
330}
331PredicateBitset
332computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const;
333PredicateBitset
334computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget,
335 const MachineFunction *MF) const;
336void setupGeneratedPerFunctionState(MachineFunction &MF) override;
337
338#endif // GET_GICOMBINER_CLASS_MEMBERS
339
340#ifdef GET_GICOMBINER_CLASS_MEMBERS
341
342 mutable MatcherState State;
343 typedef ComplexRendererFns(RISCVPostLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
344 typedef void(RISCVPostLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
345 const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
346 static RISCVPostLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
347 static RISCVPostLegalizerCombinerImpl::CustomRendererFn CustomRenderers[];
348 bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
349 bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
350 bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
351 const uint8_t *getMatchTable() const override;
352 bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
353 bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override;
354 bool testSimplePredicate(unsigned PredicateID) const override;
355 bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
356
357#endif // GET_GICOMBINER_CLASS_MEMBERS
358
359#ifdef GET_GICOMBINER_IMPL
360
361// LLT Objects.
362enum {
363 GILLT_s1,
364};
365const static size_t NumTypeObjects = 1;
366const static LLT TypeObjects[] = {
367 LLT::scalar(1),
368};
369
370// Bits for subtarget features that participate in instruction matching.
371enum SubtargetFeatureBits : uint8_t {
372};
373
374PredicateBitset RISCVPostLegalizerCombinerImpl::
375computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const {
376 PredicateBitset Features{};
377 return Features;
378}
379
380void RISCVPostLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
381 AvailableFunctionFeatures = computeAvailableFunctionFeatures((const RISCVSubtarget *)&MF.getSubtarget(), &MF);
382}
383PredicateBitset RISCVPostLegalizerCombinerImpl::
384computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, const MachineFunction *MF) const {
385 PredicateBitset Features{};
386 return Features;
387}
388
389// Feature bitsets.
390enum {
391 GIFBS_Invalid,
392};
393constexpr static PredicateBitset FeatureBitsets[] {
394 {}, // GIFBS_Invalid
395};
396
397// ComplexPattern predicates.
398enum {
399 GICP_Invalid,
400};
401// See constructor for table contents
402
403RISCVPostLegalizerCombinerImpl::ComplexMatcherMemFn
404RISCVPostLegalizerCombinerImpl::ComplexPredicateFns[] = {
405 nullptr, // GICP_Invalid
406};
407
408enum {
409 GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1,
410 GICXXPred_MI_Predicate_GICombiner1,
411 GICXXPred_MI_Predicate_GICombiner2,
412 GICXXPred_MI_Predicate_GICombiner3,
413 GICXXPred_MI_Predicate_GICombiner4,
414};
415bool RISCVPostLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
416 switch (PredicateID) {
417 case GICXXPred_MI_Predicate_GICombiner0: {
418 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0);
419 }
420 case GICXXPred_MI_Predicate_GICombiner1: {
421 return MRI.getType(State.MIs[1]->getOperand(1).getReg()) != MRI.getType(State.MIs[0]->getOperand(0).getReg());
422 }
423 case GICXXPred_MI_Predicate_GICombiner2: {
424 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0);
425 }
426 case GICXXPred_MI_Predicate_GICombiner3: {
427 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 0.0);
428 }
429 case GICXXPred_MI_Predicate_GICombiner4: {
430 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0);
431 }
432 }
433 llvm_unreachable("Unknown predicate");
434 return false;
435}
436bool RISCVPostLegalizerCombinerImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const {
437 llvm_unreachable("Unknown predicate");
438 return false;
439}
440bool RISCVPostLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
441 llvm_unreachable("Unknown predicate");
442 return false;
443}
444bool RISCVPostLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
445 llvm_unreachable("Unknown predicate");
446 return false;
447}
448bool RISCVPostLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
449 llvm_unreachable("Unknown predicate");
450 return false;
451}
452enum {
453 GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
454 GICXXPred_Simple_IsRule1Enabled,
455 GICXXPred_Simple_IsRule2Enabled,
456 GICXXPred_Simple_IsRule3Enabled,
457 GICXXPred_Simple_IsRule4Enabled,
458 GICXXPred_Simple_IsRule5Enabled,
459 GICXXPred_Simple_IsRule6Enabled,
460 GICXXPred_Simple_IsRule7Enabled,
461 GICXXPred_Simple_IsRule8Enabled,
462 GICXXPred_Simple_IsRule9Enabled,
463 GICXXPred_Simple_IsRule10Enabled,
464 GICXXPred_Simple_IsRule11Enabled,
465 GICXXPred_Simple_IsRule12Enabled,
466 GICXXPred_Simple_IsRule13Enabled,
467 GICXXPred_Simple_IsRule14Enabled,
468 GICXXPred_Simple_IsRule15Enabled,
469 GICXXPred_Simple_IsRule16Enabled,
470 GICXXPred_Simple_IsRule17Enabled,
471 GICXXPred_Simple_IsRule18Enabled,
472 GICXXPred_Simple_IsRule19Enabled,
473 GICXXPred_Simple_IsRule20Enabled,
474 GICXXPred_Simple_IsRule21Enabled,
475 GICXXPred_Simple_IsRule22Enabled,
476 GICXXPred_Simple_IsRule23Enabled,
477 GICXXPred_Simple_IsRule24Enabled,
478 GICXXPred_Simple_IsRule25Enabled,
479 GICXXPred_Simple_IsRule26Enabled,
480 GICXXPred_Simple_IsRule27Enabled,
481 GICXXPred_Simple_IsRule28Enabled,
482 GICXXPred_Simple_IsRule29Enabled,
483 GICXXPred_Simple_IsRule30Enabled,
484};
485
486bool RISCVPostLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
487 return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
488}
489// Custom renderers.
490enum {
491 GICR_Invalid,
492};
493RISCVPostLegalizerCombinerImpl::CustomRendererFn
494RISCVPostLegalizerCombinerImpl::CustomRenderers[] = {
495 nullptr, // GICR_Invalid
496};
497
498bool RISCVPostLegalizerCombinerImpl::canMatchOpcode(unsigned Opc) const {
499 switch (Opc) {
500 case TargetOpcode::G_ADD:
501 case TargetOpcode::G_AND:
502 case TargetOpcode::G_ASHR:
503 case TargetOpcode::G_FADD:
504 case TargetOpcode::G_FMUL:
505 case TargetOpcode::G_LSHR:
506 case TargetOpcode::G_MUL:
507 case TargetOpcode::G_OR:
508 case TargetOpcode::G_PTR_ADD:
509 case TargetOpcode::G_ROTL:
510 case TargetOpcode::G_ROTR:
511 case TargetOpcode::G_SDIV:
512 case TargetOpcode::G_SHL:
513 case TargetOpcode::G_SREM:
514 case TargetOpcode::G_SUB:
515 case TargetOpcode::G_UDIV:
516 case TargetOpcode::G_UREM:
517 case TargetOpcode::G_XOR:
518 case TargetOpcode::G_BITCAST:
519 case TargetOpcode::G_FNEG:
520 case TargetOpcode::G_FPTRUNC:
521 case TargetOpcode::G_PTRTOINT:
522 case TargetOpcode::G_STORE:
523 case TargetOpcode::G_ANYEXT:
524 case TargetOpcode::G_BUILD_VECTOR:
525 case TargetOpcode::G_BUILD_VECTOR_TRUNC:
526 case TargetOpcode::G_FMAXIMUM:
527 case TargetOpcode::G_FMAXNUM:
528 case TargetOpcode::G_FMAXNUM_IEEE:
529 case TargetOpcode::G_FMINIMUM:
530 case TargetOpcode::G_FMINNUM:
531 case TargetOpcode::G_FMINNUM_IEEE:
532 case TargetOpcode::G_INTTOPTR:
533 case TargetOpcode::G_LOAD:
534 case TargetOpcode::G_SADDO:
535 case TargetOpcode::G_SADDSAT:
536 case TargetOpcode::G_SELECT:
537 case TargetOpcode::G_SEXTLOAD:
538 case TargetOpcode::G_SMAX:
539 case TargetOpcode::G_SMIN:
540 case TargetOpcode::G_SMULFIX:
541 case TargetOpcode::G_SMULFIXSAT:
542 case TargetOpcode::G_SMULH:
543 case TargetOpcode::G_SMULO:
544 case TargetOpcode::G_SSHLSAT:
545 case TargetOpcode::G_TRUNC:
546 case TargetOpcode::G_UADDO:
547 case TargetOpcode::G_UADDSAT:
548 case TargetOpcode::G_UMAX:
549 case TargetOpcode::G_UMIN:
550 case TargetOpcode::G_UMULFIX:
551 case TargetOpcode::G_UMULFIXSAT:
552 case TargetOpcode::G_UMULH:
553 case TargetOpcode::G_UMULO:
554 case TargetOpcode::G_USHLSAT:
555 case TargetOpcode::G_ZEXTLOAD:
556 return true;
557 default:
558 return false;
559 }
560}
561
562bool RISCVPostLegalizerCombinerImpl::tryCombineAll(MachineInstr &I) const {
563 const PredicateBitset AvailableFeatures = getAvailableFeatures();
564 State.MIs.clear();
565 State.MIs.push_back(&I);
566 if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), Helper.getTII(), MRI, Helper.getTRI(), Helper.getRBI(), AvailableFeatures, /*CoverageInfo*/ nullptr)) {
567 return true;
568 }
569
570 return false;
571}
572
573enum {
574 GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
575 GICXXCustomAction_GICombiner1,
576 GICXXCustomAction_GICombiner2,
577 GICXXCustomAction_GICombiner3,
578 GICXXCustomAction_GICombiner4,
579 GICXXCustomAction_GICombiner5,
580 GICXXCustomAction_GICombiner6,
581 GICXXCustomAction_GICombiner7,
582 GICXXCustomAction_GICombiner8,
583 GICXXCustomAction_GICombiner9,
584 GICXXCustomAction_GICombiner10,
585 GICXXCustomAction_GICombiner11,
586 GICXXCustomAction_GICombiner12,
587 GICXXCustomAction_GICombiner13,
588 GICXXCustomAction_GICombiner14,
589 GICXXCustomAction_GICombiner15,
590 GICXXCustomAction_GICombiner16,
591};
592bool RISCVPostLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
593 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
594 switch(ApplyID) {
595 case GICXXCustomAction_GICombiner0:{
596 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
597 // Match Patterns
598 if(![&](){return Helper.matchCombineSubToAdd(*State.MIs[0], GIMatchData_matchinfo);}()) {
599 return false;
600 }
601 // Apply Patterns
602 Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo);
603 return true;
604 }
605 case GICXXCustomAction_GICombiner1:{
606 PreferredTuple GIMatchData_matchinfo;
607 // Match Patterns
608 if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) {
609 return false;
610 }
611 // Apply Patterns
612 Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);
613 return true;
614 }
615 case GICXXCustomAction_GICombiner2:{
616 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
617 // Match Patterns
618 if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) {
619 return false;
620 }
621 // Apply Patterns
622 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
623 return true;
624 }
625 case GICXXCustomAction_GICombiner3:{
626 Register GIMatchData_matchinfo;
627 // Match Patterns
628 if(![&](){return Helper.matchRedundantAnd(*State.MIs[0], GIMatchData_matchinfo);}()) {
629 return false;
630 }
631 // Apply Patterns
632 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
633 return true;
634 }
635 case GICXXCustomAction_GICombiner4:{
636 // Match Patterns
637 if(![&](){return Helper.matchSelectSameVal(*State.MIs[0]);}()) {
638 return false;
639 }
640 // Apply Patterns
641 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 2);
642 return true;
643 }
644 case GICXXCustomAction_GICombiner5:{
645 Register GIMatchData_info;
646 // Match Patterns
647 if(![&](){return Helper.matchCombineI2PToP2I(*State.MIs[0], GIMatchData_info);}()) {
648 return false;
649 }
650 // Apply Patterns
651 Helper.applyCombineI2PToP2I(*State.MIs[0], GIMatchData_info);
652 return true;
653 }
654 case GICXXCustomAction_GICombiner6:{
655 Register GIMatchData_info;
656 // Match Patterns
657 if(![&](){GIMatchData_info = State.MIs[1]->getOperand(1).getReg(); return true;}()) {
658 return false;
659 }
660 // Apply Patterns
661 Helper.applyCombineP2IToI2P(*State.MIs[0], GIMatchData_info);
662 return true;
663 }
664 case GICXXCustomAction_GICombiner7:{
665 Register GIMatchData_matchinfo;
666 // Match Patterns
667 if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) {
668 return false;
669 }
670 // Apply Patterns
671 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
672 return true;
673 }
674 case GICXXCustomAction_GICombiner8:{
675 Register GIMatchData_matchinfo;
676 // Match Patterns
677 if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
678 return false;
679 }
680 // Apply Patterns
681 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
682 return true;
683 }
684 case GICXXCustomAction_GICombiner9:{
685 Register GIMatchData_matchinfo;
686 // Match Patterns
687 if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
688 return false;
689 }
690 // Apply Patterns
691 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
692 return true;
693 }
694 case GICXXCustomAction_GICombiner10:{
695 Register GIMatchData_matchinfo;
696 // Match Patterns
697 if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
698 return false;
699 }
700 // Apply Patterns
701 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
702 return true;
703 }
704 case GICXXCustomAction_GICombiner11:{
705 // Match Patterns
706 if(![&](){return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());}()) {
707 return false;
708 }
709 // Apply Patterns
710 Helper.replaceSingleDefInstWithReg(*State.MIs[0], State.MIs[1]->getOperand(1).getReg());
711 return true;
712 }
713 case GICXXCustomAction_GICombiner12:{
714 RegisterImmPair GIMatchData_matchinfo;
715 // Match Patterns
716 if(![&](){return Helper.matchShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) {
717 return false;
718 }
719 // Apply Patterns
720 Helper.applyShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);
721 return true;
722 }
723 case GICXXCustomAction_GICombiner13:{
724 // Match Patterns
725 if(![&](){return Helper.matchCommuteConstantToRHS(*State.MIs[0]);}()) {
726 return false;
727 }
728 // Apply Patterns
729 Helper.applyCommuteBinOpOperands(*State.MIs[0]);
730 return true;
731 }
732 case GICXXCustomAction_GICombiner14:{
733 // Match Patterns
734 if(![&](){return Helper.matchCommuteFPConstantToRHS(*State.MIs[0]);}()) {
735 return false;
736 }
737 // Apply Patterns
738 Helper.applyCommuteBinOpOperands(*State.MIs[0]);
739 return true;
740 }
741 case GICXXCustomAction_GICombiner15:{
742 std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
743 // Match Patterns
744 if(![&](){return Helper.matchSimplifyNegMinMax(*State.MIs[0], GIMatchData_matchinfo);}()) {
745 return false;
746 }
747 // Apply Patterns
748 Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
749 return true;
750 }
751 case GICXXCustomAction_GICombiner16:{
752 Register GIMatchData_matchinfo;
753 // Match Patterns
754 if(![&](){return matchFoldFPZeroStore(*State.MIs[0], MRI, STI, GIMatchData_matchinfo);}()) {
755 return false;
756 }
757 // Apply Patterns
758 applyFoldFPZeroStore(*State.MIs[0], MRI, B, STI, GIMatchData_matchinfo);
759 return true;
760 }
761 }
762 llvm_unreachable("Unknown Apply Action");
763}
764#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
765#define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8)
766#define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24)
767#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)
768#else
769#define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val)
770#define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
771#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)
772#endif
773const uint8_t *RISCVPostLegalizerCombinerImpl::getMatchTable() const {
774 constexpr static uint8_t MatchTable0[] = {
775 /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(55), GIMT_Encode2(246), /*)*//*default:*//*Label 56*/ GIMT_Encode4(2388),
776 /* 10 */ /*TargetOpcode::G_ADD*//*Label 0*/ GIMT_Encode4(774),
777 /* 14 */ /*TargetOpcode::G_SUB*//*Label 1*/ GIMT_Encode4(877),
778 /* 18 */ /*TargetOpcode::G_MUL*//*Label 2*/ GIMT_Encode4(972),
779 /* 22 */ /*TargetOpcode::G_SDIV*//*Label 3*/ GIMT_Encode4(1070),
780 /* 26 */ /*TargetOpcode::G_UDIV*//*Label 4*/ GIMT_Encode4(1111),
781 /* 30 */ /*TargetOpcode::G_SREM*//*Label 5*/ GIMT_Encode4(1152),
782 /* 34 */ /*TargetOpcode::G_UREM*//*Label 6*/ GIMT_Encode4(1193), GIMT_Encode4(0), GIMT_Encode4(0),
783 /* 46 */ /*TargetOpcode::G_AND*//*Label 7*/ GIMT_Encode4(1234),
784 /* 50 */ /*TargetOpcode::G_OR*//*Label 8*/ GIMT_Encode4(1292),
785 /* 54 */ /*TargetOpcode::G_XOR*//*Label 9*/ GIMT_Encode4(1351), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
786 /* 122 */ /*TargetOpcode::G_BUILD_VECTOR*//*Label 10*/ GIMT_Encode4(1425),
787 /* 126 */ /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 11*/ GIMT_Encode4(1437), GIMT_Encode4(0),
788 /* 134 */ /*TargetOpcode::G_PTRTOINT*//*Label 12*/ GIMT_Encode4(1449),
789 /* 138 */ /*TargetOpcode::G_INTTOPTR*//*Label 13*/ GIMT_Encode4(1471),
790 /* 142 */ /*TargetOpcode::G_BITCAST*//*Label 14*/ GIMT_Encode4(1483), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
791 /* 186 */ /*TargetOpcode::G_LOAD*//*Label 15*/ GIMT_Encode4(1537),
792 /* 190 */ /*TargetOpcode::G_SEXTLOAD*//*Label 16*/ GIMT_Encode4(1549),
793 /* 194 */ /*TargetOpcode::G_ZEXTLOAD*//*Label 17*/ GIMT_Encode4(1561), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
794 /* 214 */ /*TargetOpcode::G_STORE*//*Label 18*/ GIMT_Encode4(1573), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
795 /* 362 */ /*TargetOpcode::G_ANYEXT*//*Label 19*/ GIMT_Encode4(1585),
796 /* 366 */ /*TargetOpcode::G_TRUNC*//*Label 20*/ GIMT_Encode4(1597), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
797 /* 410 */ /*TargetOpcode::G_SHL*//*Label 21*/ GIMT_Encode4(1620),
798 /* 414 */ /*TargetOpcode::G_LSHR*//*Label 22*/ GIMT_Encode4(1695),
799 /* 418 */ /*TargetOpcode::G_ASHR*//*Label 23*/ GIMT_Encode4(1770), GIMT_Encode4(0), GIMT_Encode4(0),
800 /* 430 */ /*TargetOpcode::G_ROTR*//*Label 24*/ GIMT_Encode4(1845),
801 /* 434 */ /*TargetOpcode::G_ROTL*//*Label 25*/ GIMT_Encode4(1869), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
802 /* 454 */ /*TargetOpcode::G_SELECT*//*Label 26*/ GIMT_Encode4(1893),
803 /* 458 */ /*TargetOpcode::G_UADDO*//*Label 27*/ GIMT_Encode4(1905), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
804 /* 474 */ /*TargetOpcode::G_SADDO*//*Label 28*/ GIMT_Encode4(1917), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
805 /* 490 */ /*TargetOpcode::G_UMULO*//*Label 29*/ GIMT_Encode4(1929),
806 /* 494 */ /*TargetOpcode::G_SMULO*//*Label 30*/ GIMT_Encode4(1941),
807 /* 498 */ /*TargetOpcode::G_UMULH*//*Label 31*/ GIMT_Encode4(1953),
808 /* 502 */ /*TargetOpcode::G_SMULH*//*Label 32*/ GIMT_Encode4(1965),
809 /* 506 */ /*TargetOpcode::G_UADDSAT*//*Label 33*/ GIMT_Encode4(1977),
810 /* 510 */ /*TargetOpcode::G_SADDSAT*//*Label 34*/ GIMT_Encode4(1989), GIMT_Encode4(0), GIMT_Encode4(0),
811 /* 522 */ /*TargetOpcode::G_USHLSAT*//*Label 35*/ GIMT_Encode4(2001),
812 /* 526 */ /*TargetOpcode::G_SSHLSAT*//*Label 36*/ GIMT_Encode4(2013),
813 /* 530 */ /*TargetOpcode::G_SMULFIX*//*Label 37*/ GIMT_Encode4(2025),
814 /* 534 */ /*TargetOpcode::G_UMULFIX*//*Label 38*/ GIMT_Encode4(2037),
815 /* 538 */ /*TargetOpcode::G_SMULFIXSAT*//*Label 39*/ GIMT_Encode4(2049),
816 /* 542 */ /*TargetOpcode::G_UMULFIXSAT*//*Label 40*/ GIMT_Encode4(2061), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
817 /* 562 */ /*TargetOpcode::G_FADD*//*Label 41*/ GIMT_Encode4(2073), GIMT_Encode4(0),
818 /* 570 */ /*TargetOpcode::G_FMUL*//*Label 42*/ GIMT_Encode4(2137), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
819 /* 634 */ /*TargetOpcode::G_FNEG*//*Label 43*/ GIMT_Encode4(2192), GIMT_Encode4(0),
820 /* 642 */ /*TargetOpcode::G_FPTRUNC*//*Label 44*/ GIMT_Encode4(2222), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
821 /* 686 */ /*TargetOpcode::G_FMINNUM*//*Label 45*/ GIMT_Encode4(2244),
822 /* 690 */ /*TargetOpcode::G_FMAXNUM*//*Label 46*/ GIMT_Encode4(2256),
823 /* 694 */ /*TargetOpcode::G_FMINNUM_IEEE*//*Label 47*/ GIMT_Encode4(2268),
824 /* 698 */ /*TargetOpcode::G_FMAXNUM_IEEE*//*Label 48*/ GIMT_Encode4(2280),
825 /* 702 */ /*TargetOpcode::G_FMINIMUM*//*Label 49*/ GIMT_Encode4(2292),
826 /* 706 */ /*TargetOpcode::G_FMAXIMUM*//*Label 50*/ GIMT_Encode4(2304), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
827 /* 750 */ /*TargetOpcode::G_PTR_ADD*//*Label 51*/ GIMT_Encode4(2316), GIMT_Encode4(0),
828 /* 758 */ /*TargetOpcode::G_SMIN*//*Label 52*/ GIMT_Encode4(2340),
829 /* 762 */ /*TargetOpcode::G_SMAX*//*Label 53*/ GIMT_Encode4(2352),
830 /* 766 */ /*TargetOpcode::G_UMIN*//*Label 54*/ GIMT_Encode4(2364),
831 /* 770 */ /*TargetOpcode::G_UMAX*//*Label 55*/ GIMT_Encode4(2376),
832 /* 774 */ // Label 0: @774
833 /* 774 */ GIM_Try, /*On fail goto*//*Label 57*/ GIMT_Encode4(785), // Rule ID 53 //
834 /* 779 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
835 /* 782 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_ADD'
836 /* 782 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
837 /* 785 */ // Label 57: @785
838 /* 785 */ GIM_Try, /*On fail goto*//*Label 58*/ GIMT_Encode4(819), // Rule ID 37 //
839 /* 790 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
840 /* 793 */ // MIs[0] dst
841 /* 793 */ // No operand predicates
842 /* 793 */ // MIs[0] __add_sub_reg_match_0.tmp
843 /* 793 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
844 /* 797 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
845 /* 801 */ // MIs[1] src
846 /* 801 */ // No operand predicates
847 /* 801 */ // MIs[1] __add_sub_reg_match_0.x
848 /* 801 */ // No operand predicates
849 /* 801 */ // MIs[0] __add_sub_reg_match_0.x
850 /* 801 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
851 /* 806 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
852 /* 811 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
853 /* 813 */ // Combiner Rule #16: add_sub_reg @ [__add_sub_reg_match_0[1]]
854 /* 813 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
855 /* 818 */ GIR_EraseRootFromParent_Done,
856 /* 819 */ // Label 58: @819
857 /* 819 */ GIM_Try, /*On fail goto*//*Label 59*/ GIMT_Encode4(853), // Rule ID 36 //
858 /* 824 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
859 /* 827 */ // MIs[0] dst
860 /* 827 */ // No operand predicates
861 /* 827 */ // MIs[0] __add_sub_reg_match_0.x
862 /* 827 */ // No operand predicates
863 /* 827 */ // MIs[0] __add_sub_reg_match_0.tmp
864 /* 827 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
865 /* 831 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
866 /* 835 */ // MIs[1] src
867 /* 835 */ // No operand predicates
868 /* 835 */ // MIs[1] __add_sub_reg_match_0.x
869 /* 835 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
870 /* 840 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
871 /* 845 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
872 /* 847 */ // Combiner Rule #16: add_sub_reg @ [__add_sub_reg_match_0[0]]
873 /* 847 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
874 /* 852 */ GIR_EraseRootFromParent_Done,
875 /* 853 */ // Label 59: @853
876 /* 853 */ GIM_Try, /*On fail goto*//*Label 60*/ GIMT_Encode4(876), // Rule ID 8 //
877 /* 858 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
878 /* 861 */ // MIs[0] dst
879 /* 861 */ // No operand predicates
880 /* 861 */ // MIs[0] lhs
881 /* 861 */ // No operand predicates
882 /* 861 */ // MIs[0] Operand 2
883 /* 861 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
884 /* 865 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
885 /* 870 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[1]]
886 /* 870 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
887 /* 875 */ GIR_EraseRootFromParent_Done,
888 /* 876 */ // Label 60: @876
889 /* 876 */ GIM_Reject,
890 /* 877 */ // Label 1: @877
891 /* 877 */ GIM_Try, /*On fail goto*//*Label 61*/ GIMT_Encode4(888), // Rule ID 82 //
892 /* 882 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
893 /* 885 */ // Combiner Rule #29: simplify_neg_minmax; wip_match_opcode 'G_SUB'
894 /* 885 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner15),
895 /* 888 */ // Label 61: @888
896 /* 888 */ GIM_Try, /*On fail goto*//*Label 62*/ GIMT_Encode4(927), // Rule ID 19 //
897 /* 893 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
898 /* 896 */ // MIs[0] dst
899 /* 896 */ // No operand predicates
900 /* 896 */ // MIs[0] x
901 /* 896 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
902 /* 900 */ // MIs[0] x
903 /* 900 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
904 /* 905 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
905 /* 908 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
906 /* 918 */ // Combiner Rule #7: same_val_zero @ [__same_val_zero_match_0[0]]
907 /* 918 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
908 /* 921 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
909 /* 923 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
910 /* 926 */ GIR_EraseRootFromParent_Done,
911 /* 927 */ // Label 62: @927
912 /* 927 */ GIM_Try, /*On fail goto*//*Label 63*/ GIMT_Encode4(950), // Rule ID 7 //
913 /* 932 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
914 /* 935 */ // MIs[0] dst
915 /* 935 */ // No operand predicates
916 /* 935 */ // MIs[0] lhs
917 /* 935 */ // No operand predicates
918 /* 935 */ // MIs[0] Operand 2
919 /* 935 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
920 /* 939 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
921 /* 944 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[0]]
922 /* 944 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
923 /* 949 */ GIR_EraseRootFromParent_Done,
924 /* 950 */ // Label 63: @950
925 /* 950 */ GIM_Try, /*On fail goto*//*Label 64*/ GIMT_Encode4(971), // Rule ID 0 //
926 /* 955 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
927 /* 958 */ // MIs[0] d
928 /* 958 */ // No operand predicates
929 /* 958 */ // MIs[0] op1
930 /* 958 */ // No operand predicates
931 /* 958 */ // MIs[0] c
932 /* 958 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
933 /* 962 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
934 /* 966 */ // MIs[1] imm
935 /* 966 */ // No operand predicates
936 /* 966 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
937 /* 968 */ // Combiner Rule #0: sub_to_add
938 /* 968 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
939 /* 971 */ // Label 64: @971
940 /* 971 */ GIM_Reject,
941 /* 972 */ // Label 2: @972
942 /* 972 */ GIM_Try, /*On fail goto*//*Label 65*/ GIMT_Encode4(983), // Rule ID 54 //
943 /* 977 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
944 /* 980 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_MUL'
945 /* 980 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
946 /* 983 */ // Label 65: @983
947 /* 983 */ GIM_Try, /*On fail goto*//*Label 66*/ GIMT_Encode4(1023), // Rule ID 28 //
948 /* 988 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
949 /* 991 */ // MIs[0] dst
950 /* 991 */ // No operand predicates
951 /* 991 */ // MIs[0] zero
952 /* 991 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
953 /* 995 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
954 /* 999 */ // MIs[1] Operand 1
955 /* 999 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
956 /* 1010 */ // MIs[0] rhs
957 /* 1010 */ // No operand predicates
958 /* 1010 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
959 /* 1015 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
960 /* 1017 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[7]]
961 /* 1017 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
962 /* 1022 */ GIR_EraseRootFromParent_Done,
963 /* 1023 */ // Label 66: @1023
964 /* 1023 */ GIM_Try, /*On fail goto*//*Label 67*/ GIMT_Encode4(1046), // Rule ID 29 //
965 /* 1028 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
966 /* 1031 */ // MIs[0] dst
967 /* 1031 */ // No operand predicates
968 /* 1031 */ // MIs[0] lhs
969 /* 1031 */ // No operand predicates
970 /* 1031 */ // MIs[0] zero
971 /* 1031 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
972 /* 1035 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
973 /* 1040 */ // Combiner Rule #9: binop_right_to_zero
974 /* 1040 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
975 /* 1045 */ GIR_EraseRootFromParent_Done,
976 /* 1046 */ // Label 67: @1046
977 /* 1046 */ GIM_Try, /*On fail goto*//*Label 68*/ GIMT_Encode4(1069), // Rule ID 34 //
978 /* 1051 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
979 /* 1054 */ // MIs[0] dst
980 /* 1054 */ // No operand predicates
981 /* 1054 */ // MIs[0] x
982 /* 1054 */ // No operand predicates
983 /* 1054 */ // MIs[0] Operand 2
984 /* 1054 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1,
985 /* 1058 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
986 /* 1063 */ // Combiner Rule #14: right_identity_one_int
987 /* 1063 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
988 /* 1068 */ GIR_EraseRootFromParent_Done,
989 /* 1069 */ // Label 68: @1069
990 /* 1069 */ GIM_Reject,
991 /* 1070 */ // Label 3: @1070
992 /* 1070 */ GIM_Try, /*On fail goto*//*Label 69*/ GIMT_Encode4(1110), // Rule ID 24 //
993 /* 1075 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
994 /* 1078 */ // MIs[0] dst
995 /* 1078 */ // No operand predicates
996 /* 1078 */ // MIs[0] zero
997 /* 1078 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
998 /* 1082 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
999 /* 1086 */ // MIs[1] Operand 1
1000 /* 1086 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1001 /* 1097 */ // MIs[0] rhs
1002 /* 1097 */ // No operand predicates
1003 /* 1097 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1004 /* 1102 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1005 /* 1104 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[3]]
1006 /* 1104 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1007 /* 1109 */ GIR_EraseRootFromParent_Done,
1008 /* 1110 */ // Label 69: @1110
1009 /* 1110 */ GIM_Reject,
1010 /* 1111 */ // Label 4: @1111
1011 /* 1111 */ GIM_Try, /*On fail goto*//*Label 70*/ GIMT_Encode4(1151), // Rule ID 25 //
1012 /* 1116 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1013 /* 1119 */ // MIs[0] dst
1014 /* 1119 */ // No operand predicates
1015 /* 1119 */ // MIs[0] zero
1016 /* 1119 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1017 /* 1123 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1018 /* 1127 */ // MIs[1] Operand 1
1019 /* 1127 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1020 /* 1138 */ // MIs[0] rhs
1021 /* 1138 */ // No operand predicates
1022 /* 1138 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1023 /* 1143 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1024 /* 1145 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[4]]
1025 /* 1145 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1026 /* 1150 */ GIR_EraseRootFromParent_Done,
1027 /* 1151 */ // Label 70: @1151
1028 /* 1151 */ GIM_Reject,
1029 /* 1152 */ // Label 5: @1152
1030 /* 1152 */ GIM_Try, /*On fail goto*//*Label 71*/ GIMT_Encode4(1192), // Rule ID 26 //
1031 /* 1157 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1032 /* 1160 */ // MIs[0] dst
1033 /* 1160 */ // No operand predicates
1034 /* 1160 */ // MIs[0] zero
1035 /* 1160 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1036 /* 1164 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1037 /* 1168 */ // MIs[1] Operand 1
1038 /* 1168 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1039 /* 1179 */ // MIs[0] rhs
1040 /* 1179 */ // No operand predicates
1041 /* 1179 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1042 /* 1184 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1043 /* 1186 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[5]]
1044 /* 1186 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1045 /* 1191 */ GIR_EraseRootFromParent_Done,
1046 /* 1192 */ // Label 71: @1192
1047 /* 1192 */ GIM_Reject,
1048 /* 1193 */ // Label 6: @1193
1049 /* 1193 */ GIM_Try, /*On fail goto*//*Label 72*/ GIMT_Encode4(1233), // Rule ID 27 //
1050 /* 1198 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1051 /* 1201 */ // MIs[0] dst
1052 /* 1201 */ // No operand predicates
1053 /* 1201 */ // MIs[0] zero
1054 /* 1201 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1055 /* 1205 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1056 /* 1209 */ // MIs[1] Operand 1
1057 /* 1209 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1058 /* 1220 */ // MIs[0] rhs
1059 /* 1220 */ // No operand predicates
1060 /* 1220 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1061 /* 1225 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1062 /* 1227 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[6]]
1063 /* 1227 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1064 /* 1232 */ GIR_EraseRootFromParent_Done,
1065 /* 1233 */ // Label 72: @1233
1066 /* 1233 */ GIM_Reject,
1067 /* 1234 */ // Label 7: @1234
1068 /* 1234 */ GIM_Try, /*On fail goto*//*Label 73*/ GIMT_Encode4(1245), // Rule ID 4 //
1069 /* 1239 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1070 /* 1242 */ // Combiner Rule #2: load_and_mask; wip_match_opcode 'G_AND'
1071 /* 1242 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
1072 /* 1245 */ // Label 73: @1245
1073 /* 1245 */ GIM_Try, /*On fail goto*//*Label 74*/ GIMT_Encode4(1256), // Rule ID 5 //
1074 /* 1250 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
1075 /* 1253 */ // Combiner Rule #3: redundant_and; wip_match_opcode 'G_AND'
1076 /* 1253 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
1077 /* 1256 */ // Label 74: @1256
1078 /* 1256 */ GIM_Try, /*On fail goto*//*Label 75*/ GIMT_Encode4(1267), // Rule ID 55 //
1079 /* 1261 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1080 /* 1264 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_AND'
1081 /* 1264 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1082 /* 1267 */ // Label 75: @1267
1083 /* 1267 */ GIM_Try, /*On fail goto*//*Label 76*/ GIMT_Encode4(1291), // Rule ID 17 //
1084 /* 1272 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1085 /* 1275 */ // MIs[0] dst
1086 /* 1275 */ // No operand predicates
1087 /* 1275 */ // MIs[0] src
1088 /* 1275 */ // No operand predicates
1089 /* 1275 */ // MIs[0] src
1090 /* 1275 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1091 /* 1280 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1092 /* 1285 */ // Combiner Rule #6: binop_same_val @ [__binop_same_val_match_0[0]]
1093 /* 1285 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1094 /* 1290 */ GIR_EraseRootFromParent_Done,
1095 /* 1291 */ // Label 76: @1291
1096 /* 1291 */ GIM_Reject,
1097 /* 1292 */ // Label 8: @1292
1098 /* 1292 */ GIM_Try, /*On fail goto*//*Label 77*/ GIMT_Encode4(1303), // Rule ID 56 //
1099 /* 1297 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1100 /* 1300 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_OR'
1101 /* 1300 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1102 /* 1303 */ // Label 77: @1303
1103 /* 1303 */ GIM_Try, /*On fail goto*//*Label 78*/ GIMT_Encode4(1327), // Rule ID 18 //
1104 /* 1308 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1105 /* 1311 */ // MIs[0] dst
1106 /* 1311 */ // No operand predicates
1107 /* 1311 */ // MIs[0] src
1108 /* 1311 */ // No operand predicates
1109 /* 1311 */ // MIs[0] src
1110 /* 1311 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1111 /* 1316 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1112 /* 1321 */ // Combiner Rule #6: binop_same_val @ [__binop_same_val_match_0[1]]
1113 /* 1321 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1114 /* 1326 */ GIR_EraseRootFromParent_Done,
1115 /* 1327 */ // Label 78: @1327
1116 /* 1327 */ GIM_Try, /*On fail goto*//*Label 79*/ GIMT_Encode4(1350), // Rule ID 9 //
1117 /* 1332 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1118 /* 1335 */ // MIs[0] dst
1119 /* 1335 */ // No operand predicates
1120 /* 1335 */ // MIs[0] lhs
1121 /* 1335 */ // No operand predicates
1122 /* 1335 */ // MIs[0] Operand 2
1123 /* 1335 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1124 /* 1339 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1125 /* 1344 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[2]]
1126 /* 1344 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1127 /* 1349 */ GIR_EraseRootFromParent_Done,
1128 /* 1350 */ // Label 79: @1350
1129 /* 1350 */ GIM_Reject,
1130 /* 1351 */ // Label 9: @1351
1131 /* 1351 */ GIM_Try, /*On fail goto*//*Label 80*/ GIMT_Encode4(1362), // Rule ID 57 //
1132 /* 1356 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1133 /* 1359 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_XOR'
1134 /* 1359 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1135 /* 1362 */ // Label 80: @1362
1136 /* 1362 */ GIM_Try, /*On fail goto*//*Label 81*/ GIMT_Encode4(1401), // Rule ID 20 //
1137 /* 1367 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
1138 /* 1370 */ // MIs[0] dst
1139 /* 1370 */ // No operand predicates
1140 /* 1370 */ // MIs[0] x
1141 /* 1370 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
1142 /* 1374 */ // MIs[0] x
1143 /* 1374 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
1144 /* 1379 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
1145 /* 1382 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1146 /* 1392 */ // Combiner Rule #7: same_val_zero @ [__same_val_zero_match_0[1]]
1147 /* 1392 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1148 /* 1395 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1149 /* 1397 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1150 /* 1400 */ GIR_EraseRootFromParent_Done,
1151 /* 1401 */ // Label 81: @1401
1152 /* 1401 */ GIM_Try, /*On fail goto*//*Label 82*/ GIMT_Encode4(1424), // Rule ID 10 //
1153 /* 1406 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1154 /* 1409 */ // MIs[0] dst
1155 /* 1409 */ // No operand predicates
1156 /* 1409 */ // MIs[0] lhs
1157 /* 1409 */ // No operand predicates
1158 /* 1409 */ // MIs[0] Operand 2
1159 /* 1409 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1160 /* 1413 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1161 /* 1418 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[3]]
1162 /* 1418 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1163 /* 1423 */ GIR_EraseRootFromParent_Done,
1164 /* 1424 */ // Label 82: @1424
1165 /* 1424 */ GIM_Reject,
1166 /* 1425 */ // Label 10: @1425
1167 /* 1425 */ GIM_Try, /*On fail goto*//*Label 83*/ GIMT_Encode4(1436), // Rule ID 39 //
1168 /* 1430 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1169 /* 1433 */ // Combiner Rule #17: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR'
1170 /* 1433 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
1171 /* 1436 */ // Label 83: @1436
1172 /* 1436 */ GIM_Reject,
1173 /* 1437 */ // Label 11: @1437
1174 /* 1437 */ GIM_Try, /*On fail goto*//*Label 84*/ GIMT_Encode4(1448), // Rule ID 38 //
1175 /* 1442 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1176 /* 1445 */ // Combiner Rule #17: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC'
1177 /* 1445 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
1178 /* 1448 */ // Label 84: @1448
1179 /* 1448 */ GIM_Reject,
1180 /* 1449 */ // Label 12: @1449
1181 /* 1449 */ GIM_Try, /*On fail goto*//*Label 85*/ GIMT_Encode4(1470), // Rule ID 31 //
1182 /* 1454 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
1183 /* 1457 */ // MIs[0] dst
1184 /* 1457 */ // No operand predicates
1185 /* 1457 */ // MIs[0] t
1186 /* 1457 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1187 /* 1461 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1188 /* 1465 */ // MIs[1] ptr
1189 /* 1465 */ // No operand predicates
1190 /* 1465 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1191 /* 1467 */ // Combiner Rule #11: i2p_to_p2i
1192 /* 1467 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
1193 /* 1470 */ // Label 85: @1470
1194 /* 1470 */ GIM_Reject,
1195 /* 1471 */ // Label 13: @1471
1196 /* 1471 */ GIM_Try, /*On fail goto*//*Label 86*/ GIMT_Encode4(1482), // Rule ID 30 //
1197 /* 1476 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
1198 /* 1479 */ // Combiner Rule #10: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR'
1199 /* 1479 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
1200 /* 1482 */ // Label 86: @1482
1201 /* 1482 */ GIM_Reject,
1202 /* 1483 */ // Label 14: @1483
1203 /* 1483 */ GIM_Try, /*On fail goto*//*Label 87*/ GIMT_Encode4(1515), // Rule ID 43 //
1204 /* 1488 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
1205 /* 1491 */ // MIs[0] dst
1206 /* 1491 */ // No operand predicates
1207 /* 1491 */ // MIs[0] src1
1208 /* 1491 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1209 /* 1495 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
1210 /* 1499 */ // MIs[1] src0
1211 /* 1499 */ // No operand predicates
1212 /* 1499 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1213 /* 1503 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1214 /* 1505 */ // Combiner Rule #21: bitcast_bitcast_to_bitcast
1215 /* 1505 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_BITCAST),
1216 /* 1508 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1217 /* 1510 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src0
1218 /* 1514 */ GIR_EraseRootFromParent_Done,
1219 /* 1515 */ // Label 87: @1515
1220 /* 1515 */ GIM_Try, /*On fail goto*//*Label 88*/ GIMT_Encode4(1536), // Rule ID 42 //
1221 /* 1520 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1222 /* 1523 */ // MIs[0] dst
1223 /* 1523 */ // No operand predicates
1224 /* 1523 */ // MIs[0] src1
1225 /* 1523 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1226 /* 1527 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
1227 /* 1531 */ // MIs[1] src0
1228 /* 1531 */ // No operand predicates
1229 /* 1531 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1230 /* 1533 */ // Combiner Rule #20: bitcast_bitcast_fold
1231 /* 1533 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
1232 /* 1536 */ // Label 88: @1536
1233 /* 1536 */ GIM_Reject,
1234 /* 1537 */ // Label 15: @1537
1235 /* 1537 */ GIM_Try, /*On fail goto*//*Label 89*/ GIMT_Encode4(1548), // Rule ID 1 //
1236 /* 1542 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1237 /* 1545 */ // Combiner Rule #1: extending_loads; wip_match_opcode 'G_LOAD'
1238 /* 1545 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1239 /* 1548 */ // Label 89: @1548
1240 /* 1548 */ GIM_Reject,
1241 /* 1549 */ // Label 16: @1549
1242 /* 1549 */ GIM_Try, /*On fail goto*//*Label 90*/ GIMT_Encode4(1560), // Rule ID 2 //
1243 /* 1554 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1244 /* 1557 */ // Combiner Rule #1: extending_loads; wip_match_opcode 'G_SEXTLOAD'
1245 /* 1557 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1246 /* 1560 */ // Label 90: @1560
1247 /* 1560 */ GIM_Reject,
1248 /* 1561 */ // Label 17: @1561
1249 /* 1561 */ GIM_Try, /*On fail goto*//*Label 91*/ GIMT_Encode4(1572), // Rule ID 3 //
1250 /* 1566 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1251 /* 1569 */ // Combiner Rule #1: extending_loads; wip_match_opcode 'G_ZEXTLOAD'
1252 /* 1569 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1253 /* 1572 */ // Label 91: @1572
1254 /* 1572 */ GIM_Reject,
1255 /* 1573 */ // Label 18: @1573
1256 /* 1573 */ GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(1584), // Rule ID 83 //
1257 /* 1578 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
1258 /* 1581 */ // MIs[0] src
1259 /* 1581 */ // No operand predicates
1260 /* 1581 */ // MIs[0] addr
1261 /* 1581 */ // No operand predicates
1262 /* 1581 */ // Combiner Rule #30: fold_fp_zero_store
1263 /* 1581 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner16),
1264 /* 1584 */ // Label 92: @1584
1265 /* 1584 */ GIM_Reject,
1266 /* 1585 */ // Label 19: @1585
1267 /* 1585 */ GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(1596), // Rule ID 32 //
1268 /* 1590 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
1269 /* 1593 */ // Combiner Rule #12: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT'
1270 /* 1593 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
1271 /* 1596 */ // Label 93: @1596
1272 /* 1596 */ GIM_Reject,
1273 /* 1597 */ // Label 20: @1597
1274 /* 1597 */ GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(1608), // Rule ID 40 //
1275 /* 1602 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
1276 /* 1605 */ // Combiner Rule #18: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC'
1277 /* 1605 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
1278 /* 1608 */ // Label 94: @1608
1279 /* 1608 */ GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(1619), // Rule ID 41 //
1280 /* 1613 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
1281 /* 1616 */ // Combiner Rule #19: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC'
1282 /* 1616 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
1283 /* 1619 */ // Label 95: @1619
1284 /* 1619 */ GIM_Reject,
1285 /* 1620 */ // Label 21: @1620
1286 /* 1620 */ GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(1631), // Rule ID 48 //
1287 /* 1625 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
1288 /* 1628 */ // Combiner Rule #26: shift_immed_chain; wip_match_opcode 'G_SHL'
1289 /* 1628 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1290 /* 1631 */ // Label 96: @1631
1291 /* 1631 */ GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(1671), // Rule ID 21 //
1292 /* 1636 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1293 /* 1639 */ // MIs[0] dst
1294 /* 1639 */ // No operand predicates
1295 /* 1639 */ // MIs[0] zero
1296 /* 1639 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1297 /* 1643 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1298 /* 1647 */ // MIs[1] Operand 1
1299 /* 1647 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1300 /* 1658 */ // MIs[0] rhs
1301 /* 1658 */ // No operand predicates
1302 /* 1658 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1303 /* 1663 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1304 /* 1665 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[0]]
1305 /* 1665 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1306 /* 1670 */ GIR_EraseRootFromParent_Done,
1307 /* 1671 */ // Label 97: @1671
1308 /* 1671 */ GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(1694), // Rule ID 11 //
1309 /* 1676 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1310 /* 1679 */ // MIs[0] dst
1311 /* 1679 */ // No operand predicates
1312 /* 1679 */ // MIs[0] lhs
1313 /* 1679 */ // No operand predicates
1314 /* 1679 */ // MIs[0] Operand 2
1315 /* 1679 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1316 /* 1683 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1317 /* 1688 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[4]]
1318 /* 1688 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1319 /* 1693 */ GIR_EraseRootFromParent_Done,
1320 /* 1694 */ // Label 98: @1694
1321 /* 1694 */ GIM_Reject,
1322 /* 1695 */ // Label 22: @1695
1323 /* 1695 */ GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(1706), // Rule ID 50 //
1324 /* 1700 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
1325 /* 1703 */ // Combiner Rule #26: shift_immed_chain; wip_match_opcode 'G_LSHR'
1326 /* 1703 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1327 /* 1706 */ // Label 99: @1706
1328 /* 1706 */ GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(1746), // Rule ID 22 //
1329 /* 1711 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1330 /* 1714 */ // MIs[0] dst
1331 /* 1714 */ // No operand predicates
1332 /* 1714 */ // MIs[0] zero
1333 /* 1714 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1334 /* 1718 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1335 /* 1722 */ // MIs[1] Operand 1
1336 /* 1722 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1337 /* 1733 */ // MIs[0] rhs
1338 /* 1733 */ // No operand predicates
1339 /* 1733 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1340 /* 1738 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1341 /* 1740 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[1]]
1342 /* 1740 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1343 /* 1745 */ GIR_EraseRootFromParent_Done,
1344 /* 1746 */ // Label 100: @1746
1345 /* 1746 */ GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(1769), // Rule ID 13 //
1346 /* 1751 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1347 /* 1754 */ // MIs[0] dst
1348 /* 1754 */ // No operand predicates
1349 /* 1754 */ // MIs[0] lhs
1350 /* 1754 */ // No operand predicates
1351 /* 1754 */ // MIs[0] Operand 2
1352 /* 1754 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1353 /* 1758 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1354 /* 1763 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[6]]
1355 /* 1763 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1356 /* 1768 */ GIR_EraseRootFromParent_Done,
1357 /* 1769 */ // Label 101: @1769
1358 /* 1769 */ GIM_Reject,
1359 /* 1770 */ // Label 23: @1770
1360 /* 1770 */ GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(1781), // Rule ID 49 //
1361 /* 1775 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
1362 /* 1778 */ // Combiner Rule #26: shift_immed_chain; wip_match_opcode 'G_ASHR'
1363 /* 1778 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1364 /* 1781 */ // Label 102: @1781
1365 /* 1781 */ GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(1821), // Rule ID 23 //
1366 /* 1786 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1367 /* 1789 */ // MIs[0] dst
1368 /* 1789 */ // No operand predicates
1369 /* 1789 */ // MIs[0] zero
1370 /* 1789 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1371 /* 1793 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1372 /* 1797 */ // MIs[1] Operand 1
1373 /* 1797 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1374 /* 1808 */ // MIs[0] rhs
1375 /* 1808 */ // No operand predicates
1376 /* 1808 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1377 /* 1813 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1378 /* 1815 */ // Combiner Rule #8: binop_left_to_zero @ [__binop_left_to_zero_match_0[2]]
1379 /* 1815 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1380 /* 1820 */ GIR_EraseRootFromParent_Done,
1381 /* 1821 */ // Label 103: @1821
1382 /* 1821 */ GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(1844), // Rule ID 12 //
1383 /* 1826 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1384 /* 1829 */ // MIs[0] dst
1385 /* 1829 */ // No operand predicates
1386 /* 1829 */ // MIs[0] lhs
1387 /* 1829 */ // No operand predicates
1388 /* 1829 */ // MIs[0] Operand 2
1389 /* 1829 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1390 /* 1833 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1391 /* 1838 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[5]]
1392 /* 1838 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1393 /* 1843 */ GIR_EraseRootFromParent_Done,
1394 /* 1844 */ // Label 104: @1844
1395 /* 1844 */ GIM_Reject,
1396 /* 1845 */ // Label 24: @1845
1397 /* 1845 */ GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(1868), // Rule ID 16 //
1398 /* 1850 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1399 /* 1853 */ // MIs[0] dst
1400 /* 1853 */ // No operand predicates
1401 /* 1853 */ // MIs[0] lhs
1402 /* 1853 */ // No operand predicates
1403 /* 1853 */ // MIs[0] Operand 2
1404 /* 1853 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1405 /* 1857 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1406 /* 1862 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[9]]
1407 /* 1862 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1408 /* 1867 */ GIR_EraseRootFromParent_Done,
1409 /* 1868 */ // Label 105: @1868
1410 /* 1868 */ GIM_Reject,
1411 /* 1869 */ // Label 25: @1869
1412 /* 1869 */ GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(1892), // Rule ID 15 //
1413 /* 1874 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1414 /* 1877 */ // MIs[0] dst
1415 /* 1877 */ // No operand predicates
1416 /* 1877 */ // MIs[0] lhs
1417 /* 1877 */ // No operand predicates
1418 /* 1877 */ // MIs[0] Operand 2
1419 /* 1877 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1420 /* 1881 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1421 /* 1886 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[8]]
1422 /* 1886 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1423 /* 1891 */ GIR_EraseRootFromParent_Done,
1424 /* 1892 */ // Label 106: @1892
1425 /* 1892 */ GIM_Reject,
1426 /* 1893 */ // Label 26: @1893
1427 /* 1893 */ GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(1904), // Rule ID 6 //
1428 /* 1898 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
1429 /* 1901 */ // Combiner Rule #4: select_same_val; wip_match_opcode 'G_SELECT'
1430 /* 1901 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
1431 /* 1904 */ // Label 107: @1904
1432 /* 1904 */ GIM_Reject,
1433 /* 1905 */ // Label 27: @1905
1434 /* 1905 */ GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(1916), // Rule ID 62 //
1435 /* 1910 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1436 /* 1913 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDO'
1437 /* 1913 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1438 /* 1916 */ // Label 108: @1916
1439 /* 1916 */ GIM_Reject,
1440 /* 1917 */ // Label 28: @1917
1441 /* 1917 */ GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(1928), // Rule ID 63 //
1442 /* 1922 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1443 /* 1925 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDO'
1444 /* 1925 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1445 /* 1928 */ // Label 109: @1928
1446 /* 1928 */ GIM_Reject,
1447 /* 1929 */ // Label 29: @1929
1448 /* 1929 */ GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(1940), // Rule ID 64 //
1449 /* 1934 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1450 /* 1937 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULO'
1451 /* 1937 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1452 /* 1940 */ // Label 110: @1940
1453 /* 1940 */ GIM_Reject,
1454 /* 1941 */ // Label 30: @1941
1455 /* 1941 */ GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(1952), // Rule ID 65 //
1456 /* 1946 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1457 /* 1949 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULO'
1458 /* 1949 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1459 /* 1952 */ // Label 111: @1952
1460 /* 1952 */ GIM_Reject,
1461 /* 1953 */ // Label 31: @1953
1462 /* 1953 */ GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(1964), // Rule ID 66 //
1463 /* 1958 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1464 /* 1961 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULH'
1465 /* 1961 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1466 /* 1964 */ // Label 112: @1964
1467 /* 1964 */ GIM_Reject,
1468 /* 1965 */ // Label 32: @1965
1469 /* 1965 */ GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(1976), // Rule ID 67 //
1470 /* 1970 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1471 /* 1973 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULH'
1472 /* 1973 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1473 /* 1976 */ // Label 113: @1976
1474 /* 1976 */ GIM_Reject,
1475 /* 1977 */ // Label 33: @1977
1476 /* 1977 */ GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(1988), // Rule ID 68 //
1477 /* 1982 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1478 /* 1985 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDSAT'
1479 /* 1985 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1480 /* 1988 */ // Label 114: @1988
1481 /* 1988 */ GIM_Reject,
1482 /* 1989 */ // Label 34: @1989
1483 /* 1989 */ GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(2000), // Rule ID 69 //
1484 /* 1994 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1485 /* 1997 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDSAT'
1486 /* 1997 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1487 /* 2000 */ // Label 115: @2000
1488 /* 2000 */ GIM_Reject,
1489 /* 2001 */ // Label 35: @2001
1490 /* 2001 */ GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(2012), // Rule ID 52 //
1491 /* 2006 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
1492 /* 2009 */ // Combiner Rule #26: shift_immed_chain; wip_match_opcode 'G_USHLSAT'
1493 /* 2009 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1494 /* 2012 */ // Label 116: @2012
1495 /* 2012 */ GIM_Reject,
1496 /* 2013 */ // Label 36: @2013
1497 /* 2013 */ GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(2024), // Rule ID 51 //
1498 /* 2018 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
1499 /* 2021 */ // Combiner Rule #26: shift_immed_chain; wip_match_opcode 'G_SSHLSAT'
1500 /* 2021 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
1501 /* 2024 */ // Label 117: @2024
1502 /* 2024 */ GIM_Reject,
1503 /* 2025 */ // Label 37: @2025
1504 /* 2025 */ GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(2036), // Rule ID 70 //
1505 /* 2030 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1506 /* 2033 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIX'
1507 /* 2033 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1508 /* 2036 */ // Label 118: @2036
1509 /* 2036 */ GIM_Reject,
1510 /* 2037 */ // Label 38: @2037
1511 /* 2037 */ GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(2048), // Rule ID 71 //
1512 /* 2042 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1513 /* 2045 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIX'
1514 /* 2045 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1515 /* 2048 */ // Label 119: @2048
1516 /* 2048 */ GIM_Reject,
1517 /* 2049 */ // Label 39: @2049
1518 /* 2049 */ GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(2060), // Rule ID 72 //
1519 /* 2054 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1520 /* 2057 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIXSAT'
1521 /* 2057 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1522 /* 2060 */ // Label 120: @2060
1523 /* 2060 */ GIM_Reject,
1524 /* 2061 */ // Label 40: @2061
1525 /* 2061 */ GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(2072), // Rule ID 73 //
1526 /* 2066 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1527 /* 2069 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIXSAT'
1528 /* 2069 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1529 /* 2072 */ // Label 121: @2072
1530 /* 2072 */ GIM_Reject,
1531 /* 2073 */ // Label 41: @2073
1532 /* 2073 */ GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(2084), // Rule ID 74 //
1533 /* 2078 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1534 /* 2081 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FADD'
1535 /* 2081 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1536 /* 2084 */ // Label 122: @2084
1537 /* 2084 */ GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(2107), // Rule ID 45 //
1538 /* 2089 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
1539 /* 2092 */ // MIs[0] dst
1540 /* 2092 */ // No operand predicates
1541 /* 2092 */ // MIs[0] x
1542 /* 2092 */ // No operand predicates
1543 /* 2092 */ // MIs[0] y
1544 /* 2092 */ // No operand predicates
1545 /* 2092 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
1546 /* 2096 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1547 /* 2101 */ // Combiner Rule #23: right_identity_neg_zero_fp
1548 /* 2101 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1549 /* 2106 */ GIR_EraseRootFromParent_Done,
1550 /* 2107 */ // Label 123: @2107
1551 /* 2107 */ GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(2136), // Rule ID 46 //
1552 /* 2112 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
1553 /* 2115 */ GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::FmNsz),
1554 /* 2121 */ // MIs[0] dst
1555 /* 2121 */ // No operand predicates
1556 /* 2121 */ // MIs[0] x
1557 /* 2121 */ // No operand predicates
1558 /* 2121 */ // MIs[0] y
1559 /* 2121 */ // No operand predicates
1560 /* 2121 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3),
1561 /* 2125 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1562 /* 2130 */ // Combiner Rule #24: right_identity_neg_zero_fp_nsz
1563 /* 2130 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1564 /* 2135 */ GIR_EraseRootFromParent_Done,
1565 /* 2136 */ // Label 124: @2136
1566 /* 2136 */ GIM_Reject,
1567 /* 2137 */ // Label 42: @2137
1568 /* 2137 */ GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(2148), // Rule ID 75 //
1569 /* 2142 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1570 /* 2145 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMUL'
1571 /* 2145 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1572 /* 2148 */ // Label 125: @2148
1573 /* 2148 */ GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(2171), // Rule ID 35 //
1574 /* 2153 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
1575 /* 2156 */ // MIs[0] dst
1576 /* 2156 */ // No operand predicates
1577 /* 2156 */ // MIs[0] x
1578 /* 2156 */ // No operand predicates
1579 /* 2156 */ // MIs[0] y
1580 /* 2156 */ // No operand predicates
1581 /* 2156 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
1582 /* 2160 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1583 /* 2165 */ // Combiner Rule #15: right_identity_one_fp
1584 /* 2165 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1585 /* 2170 */ GIR_EraseRootFromParent_Done,
1586 /* 2171 */ // Label 126: @2171
1587 /* 2171 */ GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(2191), // Rule ID 47 //
1588 /* 2176 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled),
1589 /* 2179 */ // MIs[0] dst
1590 /* 2179 */ // No operand predicates
1591 /* 2179 */ // MIs[0] x
1592 /* 2179 */ // No operand predicates
1593 /* 2179 */ // MIs[0] y
1594 /* 2179 */ // No operand predicates
1595 /* 2179 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner4),
1596 /* 2183 */ // Combiner Rule #25: right_identity_neg_one_fp
1597 /* 2183 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG),
1598 /* 2186 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1599 /* 2188 */ GIR_RootToRootCopy, /*OpIdx*/1, // x
1600 /* 2190 */ GIR_EraseRootFromParent_Done,
1601 /* 2191 */ // Label 127: @2191
1602 /* 2191 */ GIM_Reject,
1603 /* 2192 */ // Label 43: @2192
1604 /* 2192 */ GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(2221), // Rule ID 33 //
1605 /* 2197 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
1606 /* 2200 */ // MIs[0] dst
1607 /* 2200 */ // No operand predicates
1608 /* 2200 */ // MIs[0] t
1609 /* 2200 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1610 /* 2204 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
1611 /* 2208 */ // MIs[1] src
1612 /* 2208 */ // No operand predicates
1613 /* 2208 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1614 /* 2213 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1615 /* 2215 */ // Combiner Rule #13: fneg_fneg_fold
1616 /* 2215 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1617 /* 2220 */ GIR_EraseRootFromParent_Done,
1618 /* 2221 */ // Label 128: @2221
1619 /* 2221 */ GIM_Reject,
1620 /* 2222 */ // Label 44: @2222
1621 /* 2222 */ GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(2243), // Rule ID 44 //
1622 /* 2227 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
1623 /* 2230 */ // MIs[0] dst
1624 /* 2230 */ // No operand predicates
1625 /* 2230 */ // MIs[0] src1
1626 /* 2230 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1627 /* 2234 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT),
1628 /* 2238 */ // MIs[1] src0
1629 /* 2238 */ // No operand predicates
1630 /* 2238 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1631 /* 2240 */ // Combiner Rule #22: fptrunc_fpext_fold
1632 /* 2240 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
1633 /* 2243 */ // Label 129: @2243
1634 /* 2243 */ GIM_Reject,
1635 /* 2244 */ // Label 45: @2244
1636 /* 2244 */ GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(2255), // Rule ID 76 //
1637 /* 2249 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1638 /* 2252 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM'
1639 /* 2252 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1640 /* 2255 */ // Label 130: @2255
1641 /* 2255 */ GIM_Reject,
1642 /* 2256 */ // Label 46: @2256
1643 /* 2256 */ GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(2267), // Rule ID 77 //
1644 /* 2261 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1645 /* 2264 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM'
1646 /* 2264 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1647 /* 2267 */ // Label 131: @2267
1648 /* 2267 */ GIM_Reject,
1649 /* 2268 */ // Label 47: @2268
1650 /* 2268 */ GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(2279), // Rule ID 78 //
1651 /* 2273 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1652 /* 2276 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM_IEEE'
1653 /* 2276 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1654 /* 2279 */ // Label 132: @2279
1655 /* 2279 */ GIM_Reject,
1656 /* 2280 */ // Label 48: @2280
1657 /* 2280 */ GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(2291), // Rule ID 79 //
1658 /* 2285 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1659 /* 2288 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM_IEEE'
1660 /* 2288 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1661 /* 2291 */ // Label 133: @2291
1662 /* 2291 */ GIM_Reject,
1663 /* 2292 */ // Label 49: @2292
1664 /* 2292 */ GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(2303), // Rule ID 80 //
1665 /* 2297 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1666 /* 2300 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINIMUM'
1667 /* 2300 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1668 /* 2303 */ // Label 134: @2303
1669 /* 2303 */ GIM_Reject,
1670 /* 2304 */ // Label 50: @2304
1671 /* 2304 */ GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(2315), // Rule ID 81 //
1672 /* 2309 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
1673 /* 2312 */ // Combiner Rule #28: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXIMUM'
1674 /* 2312 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
1675 /* 2315 */ // Label 135: @2315
1676 /* 2315 */ GIM_Reject,
1677 /* 2316 */ // Label 51: @2316
1678 /* 2316 */ GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(2339), // Rule ID 14 //
1679 /* 2321 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1680 /* 2324 */ // MIs[0] dst
1681 /* 2324 */ // No operand predicates
1682 /* 2324 */ // MIs[0] lhs
1683 /* 2324 */ // No operand predicates
1684 /* 2324 */ // MIs[0] Operand 2
1685 /* 2324 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1686 /* 2328 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1687 /* 2333 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[7]]
1688 /* 2333 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1689 /* 2338 */ GIR_EraseRootFromParent_Done,
1690 /* 2339 */ // Label 136: @2339
1691 /* 2339 */ GIM_Reject,
1692 /* 2340 */ // Label 52: @2340
1693 /* 2340 */ GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(2351), // Rule ID 58 //
1694 /* 2345 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1695 /* 2348 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SMIN'
1696 /* 2348 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1697 /* 2351 */ // Label 137: @2351
1698 /* 2351 */ GIM_Reject,
1699 /* 2352 */ // Label 53: @2352
1700 /* 2352 */ GIM_Try, /*On fail goto*//*Label 138*/ GIMT_Encode4(2363), // Rule ID 59 //
1701 /* 2357 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1702 /* 2360 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_SMAX'
1703 /* 2360 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1704 /* 2363 */ // Label 138: @2363
1705 /* 2363 */ GIM_Reject,
1706 /* 2364 */ // Label 54: @2364
1707 /* 2364 */ GIM_Try, /*On fail goto*//*Label 139*/ GIMT_Encode4(2375), // Rule ID 60 //
1708 /* 2369 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1709 /* 2372 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UMIN'
1710 /* 2372 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1711 /* 2375 */ // Label 139: @2375
1712 /* 2375 */ GIM_Reject,
1713 /* 2376 */ // Label 55: @2376
1714 /* 2376 */ GIM_Try, /*On fail goto*//*Label 140*/ GIMT_Encode4(2387), // Rule ID 61 //
1715 /* 2381 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1716 /* 2384 */ // Combiner Rule #27: commute_int_constant_to_rhs; wip_match_opcode 'G_UMAX'
1717 /* 2384 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
1718 /* 2387 */ // Label 140: @2387
1719 /* 2387 */ GIM_Reject,
1720 /* 2388 */ // Label 56: @2388
1721 /* 2388 */ GIM_Reject,
1722 /* 2389 */ }; // Size: 2389 bytes
1723 return MatchTable0;
1724}
1725#undef GIMT_Encode2
1726#undef GIMT_Encode4
1727#undef GIMT_Encode8
1728
1729
1730#endif // GET_GICOMBINER_IMPL
1731
1732#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
1733
1734AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
1735AvailableFunctionFeatures()
1736
1737#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
1738
1739#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
1740
1741, State(0),
1742ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
1743
1744#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
1745
1746