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