1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* X86PostLegalizerCombinerImpl 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 X86PostLegalizerCombinerImplRuleConfig {
23 SparseBitVector<> DisabledRules;
24
25 bool isRuleEnabled(unsigned RuleID) const;
26 bool parseCommandLineOption();
27 bool setRuleEnabled(StringRef RuleIdentifier);
28 bool setRuleDisabled(StringRef RuleIdentifier);
29};
30
31static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) {
32 uint64_t I;
33 // getAtInteger(...) returns false on success
34 bool Parsed = !RuleIdentifier.getAsInteger(0, I);
35 if (Parsed)
36 return I;
37
38#ifndef NDEBUG
39 switch (RuleIdentifier.size()) {
40 default: break;
41 case 9: // 1 string to match.
42 if (memcmp(RuleIdentifier.data()+0, "copy_prop", 9) != 0)
43 break;
44 return 37; // "copy_prop"
45 case 10: // 2 strings to match.
46 switch (RuleIdentifier[0]) {
47 default: break;
48 case 'i': // 1 string to match.
49 if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i", 9) != 0)
50 break;
51 return 23; // "i2p_to_p2i"
52 case 'p': // 1 string to match.
53 if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p", 9) != 0)
54 break;
55 return 22; // "p2i_to_i2p"
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 28; // "add_sub_reg"
62 case 12: // 1 string to match.
63 if (memcmp(RuleIdentifier.data()+0, "redundant_or", 12) != 0)
64 break;
65 return 0; // "redundant_or"
66 case 13: // 1 string to match.
67 if (memcmp(RuleIdentifier.data()+0, "same_val_zero", 13) != 0)
68 break;
69 return 19; // "same_val_zero"
70 case 14: // 2 strings to match.
71 switch (RuleIdentifier[0]) {
72 default: break;
73 case 'b': // 1 string to match.
74 if (memcmp(RuleIdentifier.data()+1, "inop_same_val", 13) != 0)
75 break;
76 return 18; // "binop_same_val"
77 case 'f': // 1 string to match.
78 if (memcmp(RuleIdentifier.data()+1, "neg_fneg_fold", 13) != 0)
79 break;
80 return 25; // "fneg_fneg_fold"
81 }
82 break;
83 case 15: // 1 string to match.
84 if (memcmp(RuleIdentifier.data()+0, "select_same_val", 15) != 0)
85 break;
86 return 16; // "select_same_val"
87 case 17: // 1 string to match.
88 if (memcmp(RuleIdentifier.data()+0, "anyext_trunc_fold", 17) != 0)
89 break;
90 return 24; // "anyext_trunc_fold"
91 case 18: // 4 strings to match.
92 switch (RuleIdentifier[0]) {
93 default: break;
94 case 'b': // 1 string to match.
95 if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero", 17) != 0)
96 break;
97 return 20; // "binop_left_to_zero"
98 case 'c': // 2 strings to match.
99 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_f", 14) != 0)
100 break;
101 switch (RuleIdentifier[15]) {
102 default: break;
103 case 'a': // 1 string to match.
104 if (memcmp(RuleIdentifier.data()+16, "bs", 2) != 0)
105 break;
106 return 2; // "constant_fold_fabs"
107 case 'n': // 1 string to match.
108 if (memcmp(RuleIdentifier.data()+16, "eg", 2) != 0)
109 break;
110 return 1; // "constant_fold_fneg"
111 }
112 break;
113 case 'f': // 1 string to match.
114 if (memcmp(RuleIdentifier.data()+1, "ptrunc_fpext_fold", 17) != 0)
115 break;
116 return 33; // "fptrunc_fpext_fold"
117 }
118 break;
119 case 19: // 7 strings to match.
120 switch (RuleIdentifier[0]) {
121 default: break;
122 case 'b': // 1 string to match.
123 if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero", 18) != 0)
124 break;
125 return 21; // "binop_right_to_zero"
126 case 'c': // 5 strings to match.
127 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_f", 14) != 0)
128 break;
129 switch (RuleIdentifier[15]) {
130 default: break;
131 case 'c': // 1 string to match.
132 if (memcmp(RuleIdentifier.data()+16, "eil", 3) != 0)
133 break;
134 return 7; // "constant_fold_fceil"
135 case 'l': // 1 string to match.
136 if (memcmp(RuleIdentifier.data()+16, "og2", 3) != 0)
137 break;
138 return 4; // "constant_fold_flog2"
139 case 'p': // 1 string to match.
140 if (memcmp(RuleIdentifier.data()+16, "ext", 3) != 0)
141 break;
142 return 6; // "constant_fold_fpext"
143 case 'r': // 1 string to match.
144 if (memcmp(RuleIdentifier.data()+16, "int", 3) != 0)
145 break;
146 return 12; // "constant_fold_frint"
147 case 's': // 1 string to match.
148 if (memcmp(RuleIdentifier.data()+16, "qrt", 3) != 0)
149 break;
150 return 3; // "constant_fold_fsqrt"
151 }
152 break;
153 case 'r': // 1 string to match.
154 if (memcmp(RuleIdentifier.data()+1, "ight_identity_zero", 18) != 0)
155 break;
156 return 17; // "right_identity_zero"
157 }
158 break;
159 case 20: // 2 strings to match.
160 switch (RuleIdentifier[0]) {
161 default: break;
162 case 'b': // 1 string to match.
163 if (memcmp(RuleIdentifier.data()+1, "itcast_bitcast_fold", 19) != 0)
164 break;
165 return 32; // "bitcast_bitcast_fold"
166 case 'c': // 1 string to match.
167 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_ffloor", 19) != 0)
168 break;
169 return 8; // "constant_fold_ffloor"
170 }
171 break;
172 case 21: // 2 strings to match.
173 switch (RuleIdentifier[0]) {
174 default: break;
175 case 'c': // 1 string to match.
176 if (memcmp(RuleIdentifier.data()+1, "onstant_fold_fptrunc", 20) != 0)
177 break;
178 return 5; // "constant_fold_fptrunc"
179 case 'r': // 1 string to match.
180 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_fp", 20) != 0)
181 break;
182 return 27; // "right_identity_one_fp"
183 }
184 break;
185 case 22: // 2 strings to match.
186 switch (RuleIdentifier[0]) {
187 default: break;
188 case 'r': // 1 string to match.
189 if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_int", 21) != 0)
190 break;
191 return 26; // "right_identity_one_int"
192 case 't': // 1 string to match.
193 if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold", 21) != 0)
194 break;
195 return 30; // "trunc_buildvector_fold"
196 }
197 break;
198 case 23: // 2 strings to match.
199 if (memcmp(RuleIdentifier.data()+0, "itof_const_zero_fold_", 21) != 0)
200 break;
201 switch (RuleIdentifier[21]) {
202 default: break;
203 case 's': // 1 string to match.
204 if (RuleIdentifier[22] != 'i')
205 break;
206 return 14; // "itof_const_zero_fold_si"
207 case 'u': // 1 string to match.
208 if (RuleIdentifier[22] != 'i')
209 break;
210 return 15; // "itof_const_zero_fold_ui"
211 }
212 break;
213 case 24: // 1 string to match.
214 if (memcmp(RuleIdentifier.data()+0, "constant_fold_fnearbyint", 24) != 0)
215 break;
216 return 13; // "constant_fold_fnearbyint"
217 case 25: // 2 strings to match.
218 switch (RuleIdentifier[0]) {
219 default: break;
220 case 'b': // 1 string to match.
221 if (memcmp(RuleIdentifier.data()+1, "uildvector_identity_fold", 24) != 0)
222 break;
223 return 29; // "buildvector_identity_fold"
224 case 'r': // 1 string to match.
225 if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_one_fp", 24) != 0)
226 break;
227 return 36; // "right_identity_neg_one_fp"
228 }
229 break;
230 case 26: // 1 string to match.
231 if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_zero_fp", 26) != 0)
232 break;
233 return 34; // "right_identity_neg_zero_fp"
234 case 27: // 1 string to match.
235 if (memcmp(RuleIdentifier.data()+0, "trunc_lshr_buildvector_fold", 27) != 0)
236 break;
237 return 31; // "trunc_lshr_buildvector_fold"
238 case 29: // 2 strings to match.
239 if (memcmp(RuleIdentifier.data()+0, "constant_fold_intrinsic_", 24) != 0)
240 break;
241 switch (RuleIdentifier[24]) {
242 default: break;
243 case 'r': // 1 string to match.
244 if (memcmp(RuleIdentifier.data()+25, "ound", 4) != 0)
245 break;
246 return 10; // "constant_fold_intrinsic_round"
247 case 't': // 1 string to match.
248 if (memcmp(RuleIdentifier.data()+25, "runc", 4) != 0)
249 break;
250 return 9; // "constant_fold_intrinsic_trunc"
251 }
252 break;
253 case 30: // 1 string to match.
254 if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_zero_fp_nsz", 30) != 0)
255 break;
256 return 35; // "right_identity_neg_zero_fp_nsz"
257 case 33: // 1 string to match.
258 if (memcmp(RuleIdentifier.data()+0, "constant_fold_intrinsic_roundeven", 33) != 0)
259 break;
260 return 11; // "constant_fold_intrinsic_roundeven"
261 }
262#endif // ifndef NDEBUG
263
264 return std::nullopt;
265}
266static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
267 std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
268 if (!RangePair.second.empty()) {
269 const auto First = getRuleIdxForIdentifier(RangePair.first);
270 const auto Last = getRuleIdxForIdentifier(RangePair.second);
271 if (!First || !Last)
272 return std::nullopt;
273 if (First >= Last)
274 report_fatal_error("Beginning of range should be before end of range");
275 return {{*First, *Last + 1}};
276 }
277 if (RangePair.first == "*") {
278 return {{0, 38}};
279 }
280 const auto I = getRuleIdxForIdentifier(RangePair.first);
281 if (!I)
282 return std::nullopt;
283 return {{*I, *I + 1}};
284}
285
286bool X86PostLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
287 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
288 if (!MaybeRange)
289 return false;
290 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
291 DisabledRules.reset(I);
292 return true;
293}
294
295bool X86PostLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
296 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
297 if (!MaybeRange)
298 return false;
299 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
300 DisabledRules.set(I);
301 return true;
302}
303
304static std::vector<std::string> X86PostLegalizerCombinerOption;
305static cl::list<std::string> X86PostLegalizerCombinerDisableOption(
306 "x86postlegalizercombiner-disable-rule",
307 cl::desc("Disable one or more combiner rules temporarily in the X86PostLegalizerCombiner pass"),
308 cl::CommaSeparated,
309 cl::Hidden,
310 cl::cat(GICombinerOptionCategory),
311 cl::callback([](const std::string &Str) {
312 X86PostLegalizerCombinerOption.push_back(Str);
313 }));
314static cl::list<std::string> X86PostLegalizerCombinerOnlyEnableOption(
315 "x86postlegalizercombiner-only-enable-rule",
316 cl::desc("Disable all rules in the X86PostLegalizerCombiner pass then re-enable the specified ones"),
317 cl::Hidden,
318 cl::cat(GICombinerOptionCategory),
319 cl::callback([](const std::string &CommaSeparatedArg) {
320 StringRef Str = CommaSeparatedArg;
321 X86PostLegalizerCombinerOption.push_back("*");
322 do {
323 auto X = Str.split(",");
324 X86PostLegalizerCombinerOption.push_back(("!" + X.first).str());
325 Str = X.second;
326 } while (!Str.empty());
327 }));
328
329
330bool X86PostLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
331 return !DisabledRules.test(RuleID);
332}
333bool X86PostLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
334 for (StringRef Identifier : X86PostLegalizerCombinerOption) {
335 bool Enabled = Identifier.consume_front("!");
336 if (Enabled && !setRuleEnabled(Identifier))
337 return false;
338 if (!Enabled && !setRuleDisabled(Identifier))
339 return false;
340 }
341 return true;
342}
343
344
345#endif // GET_GICOMBINER_TYPES
346
347#ifdef GET_GICOMBINER_TYPES
348
349const unsigned MAX_SUBTARGET_PREDICATES = 0;
350using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
351
352#endif // GET_GICOMBINER_TYPES
353
354#ifdef GET_GICOMBINER_CLASS_MEMBERS
355
356PredicateBitset AvailableModuleFeatures;
357mutable PredicateBitset AvailableFunctionFeatures;
358PredicateBitset getAvailableFeatures() const {
359 return AvailableModuleFeatures | AvailableFunctionFeatures;
360}
361PredicateBitset
362computeAvailableModuleFeatures(const X86Subtarget *Subtarget) const;
363PredicateBitset
364computeAvailableFunctionFeatures(const X86Subtarget *Subtarget,
365 const MachineFunction *MF) const;
366void setupGeneratedPerFunctionState(MachineFunction &MF) override;
367
368#endif // GET_GICOMBINER_CLASS_MEMBERS
369
370#ifdef GET_GICOMBINER_CLASS_MEMBERS
371
372 mutable MatcherState State;
373 typedef ComplexRendererFns(X86PostLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
374 typedef void(X86PostLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
375 const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
376 static X86PostLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
377 static X86PostLegalizerCombinerImpl::CustomRendererFn CustomRenderers[];
378 bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
379 bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
380 bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
381 const uint8_t *getMatchTable() const override;
382 bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
383 bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override;
384 bool testSimplePredicate(unsigned PredicateID) const override;
385 bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
386
387#endif // GET_GICOMBINER_CLASS_MEMBERS
388
389#ifdef GET_GICOMBINER_IMPL
390
391// LLT Objects.
392enum {
393 GILLT_s1,
394};
395const static size_t NumTypeObjects = 1;
396const static LLT TypeObjects[] = {
397 LLT::scalar(1),
398};
399
400// Bits for subtarget features that participate in instruction matching.
401enum SubtargetFeatureBits : uint8_t {
402};
403
404PredicateBitset X86PostLegalizerCombinerImpl::
405computeAvailableModuleFeatures(const X86Subtarget *Subtarget) const {
406 PredicateBitset Features{};
407 return Features;
408}
409
410void X86PostLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
411 AvailableFunctionFeatures = computeAvailableFunctionFeatures((const X86Subtarget *)&MF.getSubtarget(), &MF);
412}
413PredicateBitset X86PostLegalizerCombinerImpl::
414computeAvailableFunctionFeatures(const X86Subtarget *Subtarget, const MachineFunction *MF) const {
415 PredicateBitset Features{};
416 return Features;
417}
418
419// Feature bitsets.
420enum {
421 GIFBS_Invalid,
422};
423constexpr static PredicateBitset FeatureBitsets[] {
424 {}, // GIFBS_Invalid
425};
426
427// ComplexPattern predicates.
428enum {
429 GICP_Invalid,
430};
431// See constructor for table contents
432
433X86PostLegalizerCombinerImpl::ComplexMatcherMemFn
434X86PostLegalizerCombinerImpl::ComplexPredicateFns[] = {
435 nullptr, // GICP_Invalid
436};
437
438enum {
439 GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1,
440 GICXXPred_MI_Predicate_GICombiner1,
441 GICXXPred_MI_Predicate_GICombiner2,
442 GICXXPred_MI_Predicate_GICombiner3,
443};
444bool X86PostLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
445 switch (PredicateID) {
446 case GICXXPred_MI_Predicate_GICombiner0: {
447 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0);
448 }
449 case GICXXPred_MI_Predicate_GICombiner1: {
450 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0);
451 }
452 case GICXXPred_MI_Predicate_GICombiner2: {
453 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 0.0);
454 }
455 case GICXXPred_MI_Predicate_GICombiner3: {
456 return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0);
457 }
458 }
459 llvm_unreachable("Unknown predicate");
460 return false;
461}
462bool X86PostLegalizerCombinerImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const {
463 llvm_unreachable("Unknown predicate");
464 return false;
465}
466bool X86PostLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
467 llvm_unreachable("Unknown predicate");
468 return false;
469}
470bool X86PostLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
471 llvm_unreachable("Unknown predicate");
472 return false;
473}
474bool X86PostLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
475 llvm_unreachable("Unknown predicate");
476 return false;
477}
478enum {
479 GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
480 GICXXPred_Simple_IsRule1Enabled,
481 GICXXPred_Simple_IsRule2Enabled,
482 GICXXPred_Simple_IsRule3Enabled,
483 GICXXPred_Simple_IsRule4Enabled,
484 GICXXPred_Simple_IsRule5Enabled,
485 GICXXPred_Simple_IsRule6Enabled,
486 GICXXPred_Simple_IsRule7Enabled,
487 GICXXPred_Simple_IsRule8Enabled,
488 GICXXPred_Simple_IsRule9Enabled,
489 GICXXPred_Simple_IsRule10Enabled,
490 GICXXPred_Simple_IsRule11Enabled,
491 GICXXPred_Simple_IsRule12Enabled,
492 GICXXPred_Simple_IsRule13Enabled,
493 GICXXPred_Simple_IsRule14Enabled,
494 GICXXPred_Simple_IsRule15Enabled,
495 GICXXPred_Simple_IsRule16Enabled,
496 GICXXPred_Simple_IsRule17Enabled,
497 GICXXPred_Simple_IsRule18Enabled,
498 GICXXPred_Simple_IsRule19Enabled,
499 GICXXPred_Simple_IsRule20Enabled,
500 GICXXPred_Simple_IsRule21Enabled,
501 GICXXPred_Simple_IsRule22Enabled,
502 GICXXPred_Simple_IsRule23Enabled,
503 GICXXPred_Simple_IsRule24Enabled,
504 GICXXPred_Simple_IsRule25Enabled,
505 GICXXPred_Simple_IsRule26Enabled,
506 GICXXPred_Simple_IsRule27Enabled,
507 GICXXPred_Simple_IsRule28Enabled,
508 GICXXPred_Simple_IsRule29Enabled,
509 GICXXPred_Simple_IsRule30Enabled,
510 GICXXPred_Simple_IsRule31Enabled,
511 GICXXPred_Simple_IsRule32Enabled,
512 GICXXPred_Simple_IsRule33Enabled,
513 GICXXPred_Simple_IsRule34Enabled,
514 GICXXPred_Simple_IsRule35Enabled,
515 GICXXPred_Simple_IsRule36Enabled,
516 GICXXPred_Simple_IsRule37Enabled,
517};
518
519bool X86PostLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
520 return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
521}
522// Custom renderers.
523enum {
524 GICR_Invalid,
525};
526X86PostLegalizerCombinerImpl::CustomRendererFn
527X86PostLegalizerCombinerImpl::CustomRenderers[] = {
528 nullptr, // GICR_Invalid
529};
530
531bool X86PostLegalizerCombinerImpl::tryCombineAllImpl(MachineInstr &I) const {
532 const TargetSubtargetInfo &ST = MF.getSubtarget();
533 const PredicateBitset AvailableFeatures = getAvailableFeatures();
534 B.setInstrAndDebugLoc(I);
535 State.MIs.clear();
536 State.MIs.push_back(&I);
537 if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, /*CoverageInfo*/ nullptr)) {
538 return true;
539 }
540
541 return false;
542}
543
544enum {
545 GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
546 GICXXCustomAction_GICombiner1,
547 GICXXCustomAction_GICombiner2,
548 GICXXCustomAction_GICombiner3,
549 GICXXCustomAction_GICombiner4,
550 GICXXCustomAction_GICombiner5,
551 GICXXCustomAction_GICombiner6,
552 GICXXCustomAction_GICombiner7,
553 GICXXCustomAction_GICombiner8,
554 GICXXCustomAction_GICombiner9,
555 GICXXCustomAction_GICombiner10,
556 GICXXCustomAction_GICombiner11,
557};
558bool X86PostLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
559 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
560 switch(ApplyID) {
561 case GICXXCustomAction_GICombiner0:{
562 Register GIMatchData_matchinfo;
563 // Match Patterns
564 if(![&](){return Helper.matchRedundantOr(*State.MIs[0], GIMatchData_matchinfo);}()) {
565 return false;
566 }
567 // Apply Patterns
568 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
569 return true;
570 }
571 case GICXXCustomAction_GICombiner1:{
572 // Apply Patterns
573 Helper.applyCombineConstantFoldFpUnary(*State.MIs[0], State.MIs[1]->getOperand(1).getFPImm());
574 return true;
575 }
576 case GICXXCustomAction_GICombiner2:{
577 // Apply Patterns
578 Helper.replaceInstWithFConstant(*State.MIs[0]->getOperand(0).getParent(), 0.0);
579 return true;
580 }
581 case GICXXCustomAction_GICombiner3:{
582 // Match Patterns
583 if(![&](){return Helper.matchSelectSameVal(*State.MIs[0]);}()) {
584 return false;
585 }
586 // Apply Patterns
587 Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 2);
588 return true;
589 }
590 case GICXXCustomAction_GICombiner4:{
591 Register GIMatchData_info;
592 // Match Patterns
593 if(![&](){return Helper.matchCombineI2PToP2I(*State.MIs[0], GIMatchData_info);}()) {
594 return false;
595 }
596 // Apply Patterns
597 Helper.applyCombineI2PToP2I(*State.MIs[0], GIMatchData_info);
598 return true;
599 }
600 case GICXXCustomAction_GICombiner5:{
601 Register GIMatchData_info;
602 // Match Patterns
603 if(![&](){GIMatchData_info = State.MIs[1]->getOperand(1).getReg(); return true;}()) {
604 return false;
605 }
606 // Apply Patterns
607 Helper.applyCombineP2IToI2P(*State.MIs[0], GIMatchData_info);
608 return true;
609 }
610 case GICXXCustomAction_GICombiner6:{
611 Register GIMatchData_matchinfo;
612 // Match Patterns
613 if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) {
614 return false;
615 }
616 // Apply Patterns
617 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
618 return true;
619 }
620 case GICXXCustomAction_GICombiner7:{
621 Register GIMatchData_matchinfo;
622 // Match Patterns
623 if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
624 return false;
625 }
626 // Apply Patterns
627 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
628 return true;
629 }
630 case GICXXCustomAction_GICombiner8:{
631 Register GIMatchData_matchinfo;
632 // Match Patterns
633 if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
634 return false;
635 }
636 // Apply Patterns
637 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
638 return true;
639 }
640 case GICXXCustomAction_GICombiner9:{
641 Register GIMatchData_matchinfo;
642 // Match Patterns
643 if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) {
644 return false;
645 }
646 // Apply Patterns
647 Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo);
648 return true;
649 }
650 case GICXXCustomAction_GICombiner10:{
651 // Match Patterns
652 if(![&](){return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());}()) {
653 return false;
654 }
655 // Apply Patterns
656 Helper.replaceSingleDefInstWithReg(*State.MIs[0], State.MIs[1]->getOperand(1).getReg());
657 return true;
658 }
659 case GICXXCustomAction_GICombiner11:{
660 // Match Patterns
661 if(![&](){return Helper.matchCombineCopy(*State.MIs[0]);}()) {
662 return false;
663 }
664 // Apply Patterns
665 Helper.applyCombineCopy(*State.MIs[0]);
666 return true;
667 }
668 }
669 llvm_unreachable("Unknown Apply Action");
670}
671#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
672#define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8)
673#define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24)
674#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)
675#else
676#define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val)
677#define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
678#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)
679#endif
680const uint8_t *X86PostLegalizerCombinerImpl::getMatchTable() const {
681 constexpr static uint8_t MatchTable0[] = {
682 /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(20), GIMT_Encode2(280), /*)*//*default:*//*Label 42*/ GIMT_Encode4(2471),
683 /* 10 */ /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(1050), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
684 /* 150 */ /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(1062),
685 /* 154 */ /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(1154),
686 /* 158 */ /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(1217),
687 /* 162 */ /*TargetOpcode::G_SDIV*//*Label 4*/ GIMT_Encode4(1304),
688 /* 166 */ /*TargetOpcode::G_UDIV*//*Label 5*/ GIMT_Encode4(1345),
689 /* 170 */ /*TargetOpcode::G_SREM*//*Label 6*/ GIMT_Encode4(1386),
690 /* 174 */ /*TargetOpcode::G_UREM*//*Label 7*/ GIMT_Encode4(1427), GIMT_Encode4(0), GIMT_Encode4(0),
691 /* 186 */ /*TargetOpcode::G_AND*//*Label 8*/ GIMT_Encode4(1468),
692 /* 190 */ /*TargetOpcode::G_OR*//*Label 9*/ GIMT_Encode4(1493),
693 /* 194 */ /*TargetOpcode::G_XOR*//*Label 10*/ GIMT_Encode4(1552), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
694 /* 262 */ /*TargetOpcode::G_BUILD_VECTOR*//*Label 11*/ GIMT_Encode4(1615),
695 /* 266 */ /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 12*/ GIMT_Encode4(1627), GIMT_Encode4(0),
696 /* 274 */ /*TargetOpcode::G_PTRTOINT*//*Label 13*/ GIMT_Encode4(1639),
697 /* 278 */ /*TargetOpcode::G_INTTOPTR*//*Label 14*/ GIMT_Encode4(1661),
698 /* 282 */ /*TargetOpcode::G_BITCAST*//*Label 15*/ GIMT_Encode4(1673), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
699 /* 298 */ /*TargetOpcode::G_INTRINSIC_TRUNC*//*Label 16*/ GIMT_Encode4(1695),
700 /* 302 */ /*TargetOpcode::G_INTRINSIC_ROUND*//*Label 17*/ GIMT_Encode4(1717), GIMT_Encode4(0), GIMT_Encode4(0),
701 /* 314 */ /*TargetOpcode::G_INTRINSIC_ROUNDEVEN*//*Label 18*/ GIMT_Encode4(1739), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
702 /* 486 */ /*TargetOpcode::G_ANYEXT*//*Label 19*/ GIMT_Encode4(1761),
703 /* 490 */ /*TargetOpcode::G_TRUNC*//*Label 20*/ GIMT_Encode4(1773), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
704 /* 534 */ /*TargetOpcode::G_SHL*//*Label 21*/ GIMT_Encode4(1796),
705 /* 538 */ /*TargetOpcode::G_LSHR*//*Label 22*/ GIMT_Encode4(1860),
706 /* 542 */ /*TargetOpcode::G_ASHR*//*Label 23*/ GIMT_Encode4(1924), GIMT_Encode4(0), GIMT_Encode4(0),
707 /* 554 */ /*TargetOpcode::G_ROTR*//*Label 24*/ GIMT_Encode4(1988),
708 /* 558 */ /*TargetOpcode::G_ROTL*//*Label 25*/ GIMT_Encode4(2012), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
709 /* 578 */ /*TargetOpcode::G_SELECT*//*Label 26*/ GIMT_Encode4(2036), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
710 /* 686 */ /*TargetOpcode::G_FADD*//*Label 27*/ GIMT_Encode4(2048), GIMT_Encode4(0),
711 /* 694 */ /*TargetOpcode::G_FMUL*//*Label 28*/ GIMT_Encode4(2101), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
712 /* 742 */ /*TargetOpcode::G_FLOG2*//*Label 29*/ GIMT_Encode4(2145), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
713 /* 758 */ /*TargetOpcode::G_FNEG*//*Label 30*/ GIMT_Encode4(2167),
714 /* 762 */ /*TargetOpcode::G_FPEXT*//*Label 31*/ GIMT_Encode4(2218),
715 /* 766 */ /*TargetOpcode::G_FPTRUNC*//*Label 32*/ GIMT_Encode4(2240), GIMT_Encode4(0), GIMT_Encode4(0),
716 /* 778 */ /*TargetOpcode::G_SITOFP*//*Label 33*/ GIMT_Encode4(2283),
717 /* 782 */ /*TargetOpcode::G_UITOFP*//*Label 34*/ GIMT_Encode4(2299), GIMT_Encode4(0), GIMT_Encode4(0),
718 /* 794 */ /*TargetOpcode::G_FABS*//*Label 35*/ GIMT_Encode4(2315), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
719 /* 874 */ /*TargetOpcode::G_PTR_ADD*//*Label 36*/ GIMT_Encode4(2337), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
720 /* 986 */ /*TargetOpcode::G_FCEIL*//*Label 37*/ GIMT_Encode4(2361), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
721 /* 1034 */ /*TargetOpcode::G_FSQRT*//*Label 38*/ GIMT_Encode4(2383),
722 /* 1038 */ /*TargetOpcode::G_FFLOOR*//*Label 39*/ GIMT_Encode4(2405),
723 /* 1042 */ /*TargetOpcode::G_FRINT*//*Label 40*/ GIMT_Encode4(2427),
724 /* 1046 */ /*TargetOpcode::G_FNEARBYINT*//*Label 41*/ GIMT_Encode4(2449),
725 /* 1050 */ // Label 0: @1050
726 /* 1050 */ GIM_Try, /*On fail goto*//*Label 43*/ GIMT_Encode4(1061), // Rule ID 57 //
727 /* 1055 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled),
728 /* 1058 */ // MIs[0] d
729 /* 1058 */ // No operand predicates
730 /* 1058 */ // MIs[0] s
731 /* 1058 */ // No operand predicates
732 /* 1058 */ // Combiner Rule #37: copy_prop
733 /* 1058 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
734 /* 1061 */ // Label 43: @1061
735 /* 1061 */ GIM_Reject,
736 /* 1062 */ // Label 1: @1062
737 /* 1062 */ GIM_Try, /*On fail goto*//*Label 44*/ GIMT_Encode4(1096), // Rule ID 47 //
738 /* 1067 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
739 /* 1070 */ // MIs[0] dst
740 /* 1070 */ // No operand predicates
741 /* 1070 */ // MIs[0] __add_sub_reg_match_0.tmp
742 /* 1070 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
743 /* 1074 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
744 /* 1078 */ // MIs[1] src
745 /* 1078 */ // No operand predicates
746 /* 1078 */ // MIs[1] __add_sub_reg_match_0.x
747 /* 1078 */ // No operand predicates
748 /* 1078 */ // MIs[0] __add_sub_reg_match_0.x
749 /* 1078 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
750 /* 1083 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
751 /* 1088 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
752 /* 1090 */ // Combiner Rule #28: add_sub_reg @ [__add_sub_reg_match_0[1]]
753 /* 1090 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
754 /* 1095 */ GIR_EraseRootFromParent_Done,
755 /* 1096 */ // Label 44: @1096
756 /* 1096 */ GIM_Try, /*On fail goto*//*Label 45*/ GIMT_Encode4(1130), // Rule ID 46 //
757 /* 1101 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
758 /* 1104 */ // MIs[0] dst
759 /* 1104 */ // No operand predicates
760 /* 1104 */ // MIs[0] __add_sub_reg_match_0.x
761 /* 1104 */ // No operand predicates
762 /* 1104 */ // MIs[0] __add_sub_reg_match_0.tmp
763 /* 1104 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
764 /* 1108 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
765 /* 1112 */ // MIs[1] src
766 /* 1112 */ // No operand predicates
767 /* 1112 */ // MIs[1] __add_sub_reg_match_0.x
768 /* 1112 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
769 /* 1117 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
770 /* 1122 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
771 /* 1124 */ // Combiner Rule #28: add_sub_reg @ [__add_sub_reg_match_0[0]]
772 /* 1124 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
773 /* 1129 */ GIR_EraseRootFromParent_Done,
774 /* 1130 */ // Label 45: @1130
775 /* 1130 */ GIM_Try, /*On fail goto*//*Label 46*/ GIMT_Encode4(1153), // Rule ID 18 //
776 /* 1135 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
777 /* 1138 */ // MIs[0] dst
778 /* 1138 */ // No operand predicates
779 /* 1138 */ // MIs[0] lhs
780 /* 1138 */ // No operand predicates
781 /* 1138 */ // MIs[0] Operand 2
782 /* 1138 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
783 /* 1142 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
784 /* 1147 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[1]]
785 /* 1147 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
786 /* 1152 */ GIR_EraseRootFromParent_Done,
787 /* 1153 */ // Label 46: @1153
788 /* 1153 */ GIM_Reject,
789 /* 1154 */ // Label 2: @1154
790 /* 1154 */ GIM_Try, /*On fail goto*//*Label 47*/ GIMT_Encode4(1193), // Rule ID 29 //
791 /* 1159 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
792 /* 1162 */ // MIs[0] dst
793 /* 1162 */ // No operand predicates
794 /* 1162 */ // MIs[0] x
795 /* 1162 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
796 /* 1166 */ // MIs[0] x
797 /* 1166 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
798 /* 1171 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
799 /* 1174 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
800 /* 1184 */ // Combiner Rule #19: same_val_zero @ [__same_val_zero_match_0[0]]
801 /* 1184 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
802 /* 1187 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
803 /* 1189 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
804 /* 1192 */ GIR_EraseRootFromParent_Done,
805 /* 1193 */ // Label 47: @1193
806 /* 1193 */ GIM_Try, /*On fail goto*//*Label 48*/ GIMT_Encode4(1216), // Rule ID 17 //
807 /* 1198 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
808 /* 1201 */ // MIs[0] dst
809 /* 1201 */ // No operand predicates
810 /* 1201 */ // MIs[0] lhs
811 /* 1201 */ // No operand predicates
812 /* 1201 */ // MIs[0] Operand 2
813 /* 1201 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
814 /* 1205 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
815 /* 1210 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[0]]
816 /* 1210 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
817 /* 1215 */ GIR_EraseRootFromParent_Done,
818 /* 1216 */ // Label 48: @1216
819 /* 1216 */ GIM_Reject,
820 /* 1217 */ // Label 3: @1217
821 /* 1217 */ GIM_Try, /*On fail goto*//*Label 49*/ GIMT_Encode4(1257), // Rule ID 38 //
822 /* 1222 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
823 /* 1225 */ // MIs[0] dst
824 /* 1225 */ // No operand predicates
825 /* 1225 */ // MIs[0] zero
826 /* 1225 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
827 /* 1229 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
828 /* 1233 */ // MIs[1] Operand 1
829 /* 1233 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
830 /* 1244 */ // MIs[0] rhs
831 /* 1244 */ // No operand predicates
832 /* 1244 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
833 /* 1249 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
834 /* 1251 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[7]]
835 /* 1251 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
836 /* 1256 */ GIR_EraseRootFromParent_Done,
837 /* 1257 */ // Label 49: @1257
838 /* 1257 */ GIM_Try, /*On fail goto*//*Label 50*/ GIMT_Encode4(1280), // Rule ID 39 //
839 /* 1262 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
840 /* 1265 */ // MIs[0] dst
841 /* 1265 */ // No operand predicates
842 /* 1265 */ // MIs[0] lhs
843 /* 1265 */ // No operand predicates
844 /* 1265 */ // MIs[0] zero
845 /* 1265 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
846 /* 1269 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
847 /* 1274 */ // Combiner Rule #21: binop_right_to_zero
848 /* 1274 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
849 /* 1279 */ GIR_EraseRootFromParent_Done,
850 /* 1280 */ // Label 50: @1280
851 /* 1280 */ GIM_Try, /*On fail goto*//*Label 51*/ GIMT_Encode4(1303), // Rule ID 44 //
852 /* 1285 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
853 /* 1288 */ // MIs[0] dst
854 /* 1288 */ // No operand predicates
855 /* 1288 */ // MIs[0] x
856 /* 1288 */ // No operand predicates
857 /* 1288 */ // MIs[0] Operand 2
858 /* 1288 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1,
859 /* 1292 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
860 /* 1297 */ // Combiner Rule #26: right_identity_one_int
861 /* 1297 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
862 /* 1302 */ GIR_EraseRootFromParent_Done,
863 /* 1303 */ // Label 51: @1303
864 /* 1303 */ GIM_Reject,
865 /* 1304 */ // Label 4: @1304
866 /* 1304 */ GIM_Try, /*On fail goto*//*Label 52*/ GIMT_Encode4(1344), // Rule ID 34 //
867 /* 1309 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
868 /* 1312 */ // MIs[0] dst
869 /* 1312 */ // No operand predicates
870 /* 1312 */ // MIs[0] zero
871 /* 1312 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
872 /* 1316 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
873 /* 1320 */ // MIs[1] Operand 1
874 /* 1320 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
875 /* 1331 */ // MIs[0] rhs
876 /* 1331 */ // No operand predicates
877 /* 1331 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
878 /* 1336 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
879 /* 1338 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[3]]
880 /* 1338 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
881 /* 1343 */ GIR_EraseRootFromParent_Done,
882 /* 1344 */ // Label 52: @1344
883 /* 1344 */ GIM_Reject,
884 /* 1345 */ // Label 5: @1345
885 /* 1345 */ GIM_Try, /*On fail goto*//*Label 53*/ GIMT_Encode4(1385), // Rule ID 35 //
886 /* 1350 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
887 /* 1353 */ // MIs[0] dst
888 /* 1353 */ // No operand predicates
889 /* 1353 */ // MIs[0] zero
890 /* 1353 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
891 /* 1357 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
892 /* 1361 */ // MIs[1] Operand 1
893 /* 1361 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
894 /* 1372 */ // MIs[0] rhs
895 /* 1372 */ // No operand predicates
896 /* 1372 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
897 /* 1377 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
898 /* 1379 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[4]]
899 /* 1379 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
900 /* 1384 */ GIR_EraseRootFromParent_Done,
901 /* 1385 */ // Label 53: @1385
902 /* 1385 */ GIM_Reject,
903 /* 1386 */ // Label 6: @1386
904 /* 1386 */ GIM_Try, /*On fail goto*//*Label 54*/ GIMT_Encode4(1426), // Rule ID 36 //
905 /* 1391 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
906 /* 1394 */ // MIs[0] dst
907 /* 1394 */ // No operand predicates
908 /* 1394 */ // MIs[0] zero
909 /* 1394 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
910 /* 1398 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
911 /* 1402 */ // MIs[1] Operand 1
912 /* 1402 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
913 /* 1413 */ // MIs[0] rhs
914 /* 1413 */ // No operand predicates
915 /* 1413 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
916 /* 1418 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
917 /* 1420 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[5]]
918 /* 1420 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
919 /* 1425 */ GIR_EraseRootFromParent_Done,
920 /* 1426 */ // Label 54: @1426
921 /* 1426 */ GIM_Reject,
922 /* 1427 */ // Label 7: @1427
923 /* 1427 */ GIM_Try, /*On fail goto*//*Label 55*/ GIMT_Encode4(1467), // Rule ID 37 //
924 /* 1432 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
925 /* 1435 */ // MIs[0] dst
926 /* 1435 */ // No operand predicates
927 /* 1435 */ // MIs[0] zero
928 /* 1435 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
929 /* 1439 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
930 /* 1443 */ // MIs[1] Operand 1
931 /* 1443 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
932 /* 1454 */ // MIs[0] rhs
933 /* 1454 */ // No operand predicates
934 /* 1454 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
935 /* 1459 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
936 /* 1461 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[6]]
937 /* 1461 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
938 /* 1466 */ GIR_EraseRootFromParent_Done,
939 /* 1467 */ // Label 55: @1467
940 /* 1467 */ GIM_Reject,
941 /* 1468 */ // Label 8: @1468
942 /* 1468 */ GIM_Try, /*On fail goto*//*Label 56*/ GIMT_Encode4(1492), // Rule ID 27 //
943 /* 1473 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
944 /* 1476 */ // MIs[0] dst
945 /* 1476 */ // No operand predicates
946 /* 1476 */ // MIs[0] src
947 /* 1476 */ // No operand predicates
948 /* 1476 */ // MIs[0] src
949 /* 1476 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
950 /* 1481 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
951 /* 1486 */ // Combiner Rule #18: binop_same_val @ [__binop_same_val_match_0[0]]
952 /* 1486 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
953 /* 1491 */ GIR_EraseRootFromParent_Done,
954 /* 1492 */ // Label 56: @1492
955 /* 1492 */ GIM_Reject,
956 /* 1493 */ // Label 9: @1493
957 /* 1493 */ GIM_Try, /*On fail goto*//*Label 57*/ GIMT_Encode4(1504), // Rule ID 0 //
958 /* 1498 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
959 /* 1501 */ // Combiner Rule #0: redundant_or; wip_match_opcode 'G_OR'
960 /* 1501 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
961 /* 1504 */ // Label 57: @1504
962 /* 1504 */ GIM_Try, /*On fail goto*//*Label 58*/ GIMT_Encode4(1528), // Rule ID 28 //
963 /* 1509 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
964 /* 1512 */ // MIs[0] dst
965 /* 1512 */ // No operand predicates
966 /* 1512 */ // MIs[0] src
967 /* 1512 */ // No operand predicates
968 /* 1512 */ // MIs[0] src
969 /* 1512 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
970 /* 1517 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
971 /* 1522 */ // Combiner Rule #18: binop_same_val @ [__binop_same_val_match_0[1]]
972 /* 1522 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
973 /* 1527 */ GIR_EraseRootFromParent_Done,
974 /* 1528 */ // Label 58: @1528
975 /* 1528 */ GIM_Try, /*On fail goto*//*Label 59*/ GIMT_Encode4(1551), // Rule ID 19 //
976 /* 1533 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
977 /* 1536 */ // MIs[0] dst
978 /* 1536 */ // No operand predicates
979 /* 1536 */ // MIs[0] lhs
980 /* 1536 */ // No operand predicates
981 /* 1536 */ // MIs[0] Operand 2
982 /* 1536 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
983 /* 1540 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
984 /* 1545 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[2]]
985 /* 1545 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
986 /* 1550 */ GIR_EraseRootFromParent_Done,
987 /* 1551 */ // Label 59: @1551
988 /* 1551 */ GIM_Reject,
989 /* 1552 */ // Label 10: @1552
990 /* 1552 */ GIM_Try, /*On fail goto*//*Label 60*/ GIMT_Encode4(1591), // Rule ID 30 //
991 /* 1557 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
992 /* 1560 */ // MIs[0] dst
993 /* 1560 */ // No operand predicates
994 /* 1560 */ // MIs[0] x
995 /* 1560 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
996 /* 1564 */ // MIs[0] x
997 /* 1564 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
998 /* 1569 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
999 /* 1572 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1000 /* 1582 */ // Combiner Rule #19: same_val_zero @ [__same_val_zero_match_0[1]]
1001 /* 1582 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1002 /* 1585 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1003 /* 1587 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1004 /* 1590 */ GIR_EraseRootFromParent_Done,
1005 /* 1591 */ // Label 60: @1591
1006 /* 1591 */ GIM_Try, /*On fail goto*//*Label 61*/ GIMT_Encode4(1614), // Rule ID 20 //
1007 /* 1596 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1008 /* 1599 */ // MIs[0] dst
1009 /* 1599 */ // No operand predicates
1010 /* 1599 */ // MIs[0] lhs
1011 /* 1599 */ // No operand predicates
1012 /* 1599 */ // MIs[0] Operand 2
1013 /* 1599 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1014 /* 1603 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1015 /* 1608 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[3]]
1016 /* 1608 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1017 /* 1613 */ GIR_EraseRootFromParent_Done,
1018 /* 1614 */ // Label 61: @1614
1019 /* 1614 */ GIM_Reject,
1020 /* 1615 */ // Label 11: @1615
1021 /* 1615 */ GIM_Try, /*On fail goto*//*Label 62*/ GIMT_Encode4(1626), // Rule ID 49 //
1022 /* 1620 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
1023 /* 1623 */ // Combiner Rule #29: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR'
1024 /* 1623 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
1025 /* 1626 */ // Label 62: @1626
1026 /* 1626 */ GIM_Reject,
1027 /* 1627 */ // Label 12: @1627
1028 /* 1627 */ GIM_Try, /*On fail goto*//*Label 63*/ GIMT_Encode4(1638), // Rule ID 48 //
1029 /* 1632 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
1030 /* 1635 */ // Combiner Rule #29: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC'
1031 /* 1635 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
1032 /* 1638 */ // Label 63: @1638
1033 /* 1638 */ GIM_Reject,
1034 /* 1639 */ // Label 13: @1639
1035 /* 1639 */ GIM_Try, /*On fail goto*//*Label 64*/ GIMT_Encode4(1660), // Rule ID 41 //
1036 /* 1644 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
1037 /* 1647 */ // MIs[0] dst
1038 /* 1647 */ // No operand predicates
1039 /* 1647 */ // MIs[0] t
1040 /* 1647 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1041 /* 1651 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1042 /* 1655 */ // MIs[1] ptr
1043 /* 1655 */ // No operand predicates
1044 /* 1655 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1045 /* 1657 */ // Combiner Rule #23: i2p_to_p2i
1046 /* 1657 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
1047 /* 1660 */ // Label 64: @1660
1048 /* 1660 */ GIM_Reject,
1049 /* 1661 */ // Label 14: @1661
1050 /* 1661 */ GIM_Try, /*On fail goto*//*Label 65*/ GIMT_Encode4(1672), // Rule ID 40 //
1051 /* 1666 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
1052 /* 1669 */ // Combiner Rule #22: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR'
1053 /* 1669 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
1054 /* 1672 */ // Label 65: @1672
1055 /* 1672 */ GIM_Reject,
1056 /* 1673 */ // Label 15: @1673
1057 /* 1673 */ GIM_Try, /*On fail goto*//*Label 66*/ GIMT_Encode4(1694), // Rule ID 52 //
1058 /* 1678 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
1059 /* 1681 */ // MIs[0] dst
1060 /* 1681 */ // No operand predicates
1061 /* 1681 */ // MIs[0] src1
1062 /* 1681 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1063 /* 1685 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
1064 /* 1689 */ // MIs[1] src0
1065 /* 1689 */ // No operand predicates
1066 /* 1689 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1067 /* 1691 */ // Combiner Rule #32: bitcast_bitcast_fold
1068 /* 1691 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
1069 /* 1694 */ // Label 66: @1694
1070 /* 1694 */ GIM_Reject,
1071 /* 1695 */ // Label 16: @1695
1072 /* 1695 */ GIM_Try, /*On fail goto*//*Label 67*/ GIMT_Encode4(1716), // Rule ID 9 //
1073 /* 1700 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1074 /* 1703 */ // MIs[0] dst
1075 /* 1703 */ // No operand predicates
1076 /* 1703 */ // MIs[0] src0
1077 /* 1703 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1078 /* 1707 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1079 /* 1711 */ // MIs[1] cst
1080 /* 1711 */ // No operand predicates
1081 /* 1711 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1082 /* 1713 */ // Combiner Rule #9: constant_fold_intrinsic_trunc
1083 /* 1713 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1084 /* 1716 */ // Label 67: @1716
1085 /* 1716 */ GIM_Reject,
1086 /* 1717 */ // Label 17: @1717
1087 /* 1717 */ GIM_Try, /*On fail goto*//*Label 68*/ GIMT_Encode4(1738), // Rule ID 10 //
1088 /* 1722 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
1089 /* 1725 */ // MIs[0] dst
1090 /* 1725 */ // No operand predicates
1091 /* 1725 */ // MIs[0] src0
1092 /* 1725 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1093 /* 1729 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1094 /* 1733 */ // MIs[1] cst
1095 /* 1733 */ // No operand predicates
1096 /* 1733 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1097 /* 1735 */ // Combiner Rule #10: constant_fold_intrinsic_round
1098 /* 1735 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1099 /* 1738 */ // Label 68: @1738
1100 /* 1738 */ GIM_Reject,
1101 /* 1739 */ // Label 18: @1739
1102 /* 1739 */ GIM_Try, /*On fail goto*//*Label 69*/ GIMT_Encode4(1760), // Rule ID 11 //
1103 /* 1744 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
1104 /* 1747 */ // MIs[0] dst
1105 /* 1747 */ // No operand predicates
1106 /* 1747 */ // MIs[0] src0
1107 /* 1747 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1108 /* 1751 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1109 /* 1755 */ // MIs[1] cst
1110 /* 1755 */ // No operand predicates
1111 /* 1755 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1112 /* 1757 */ // Combiner Rule #11: constant_fold_intrinsic_roundeven
1113 /* 1757 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1114 /* 1760 */ // Label 69: @1760
1115 /* 1760 */ GIM_Reject,
1116 /* 1761 */ // Label 19: @1761
1117 /* 1761 */ GIM_Try, /*On fail goto*//*Label 70*/ GIMT_Encode4(1772), // Rule ID 42 //
1118 /* 1766 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
1119 /* 1769 */ // Combiner Rule #24: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT'
1120 /* 1769 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
1121 /* 1772 */ // Label 70: @1772
1122 /* 1772 */ GIM_Reject,
1123 /* 1773 */ // Label 20: @1773
1124 /* 1773 */ GIM_Try, /*On fail goto*//*Label 71*/ GIMT_Encode4(1784), // Rule ID 50 //
1125 /* 1778 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
1126 /* 1781 */ // Combiner Rule #30: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC'
1127 /* 1781 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
1128 /* 1784 */ // Label 71: @1784
1129 /* 1784 */ GIM_Try, /*On fail goto*//*Label 72*/ GIMT_Encode4(1795), // Rule ID 51 //
1130 /* 1789 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled),
1131 /* 1792 */ // Combiner Rule #31: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC'
1132 /* 1792 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
1133 /* 1795 */ // Label 72: @1795
1134 /* 1795 */ GIM_Reject,
1135 /* 1796 */ // Label 21: @1796
1136 /* 1796 */ GIM_Try, /*On fail goto*//*Label 73*/ GIMT_Encode4(1836), // Rule ID 31 //
1137 /* 1801 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1138 /* 1804 */ // MIs[0] dst
1139 /* 1804 */ // No operand predicates
1140 /* 1804 */ // MIs[0] zero
1141 /* 1804 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1142 /* 1808 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1143 /* 1812 */ // MIs[1] Operand 1
1144 /* 1812 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1145 /* 1823 */ // MIs[0] rhs
1146 /* 1823 */ // No operand predicates
1147 /* 1823 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1148 /* 1828 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1149 /* 1830 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[0]]
1150 /* 1830 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1151 /* 1835 */ GIR_EraseRootFromParent_Done,
1152 /* 1836 */ // Label 73: @1836
1153 /* 1836 */ GIM_Try, /*On fail goto*//*Label 74*/ GIMT_Encode4(1859), // Rule ID 21 //
1154 /* 1841 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1155 /* 1844 */ // MIs[0] dst
1156 /* 1844 */ // No operand predicates
1157 /* 1844 */ // MIs[0] lhs
1158 /* 1844 */ // No operand predicates
1159 /* 1844 */ // MIs[0] Operand 2
1160 /* 1844 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1161 /* 1848 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1162 /* 1853 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[4]]
1163 /* 1853 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1164 /* 1858 */ GIR_EraseRootFromParent_Done,
1165 /* 1859 */ // Label 74: @1859
1166 /* 1859 */ GIM_Reject,
1167 /* 1860 */ // Label 22: @1860
1168 /* 1860 */ GIM_Try, /*On fail goto*//*Label 75*/ GIMT_Encode4(1900), // Rule ID 32 //
1169 /* 1865 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1170 /* 1868 */ // MIs[0] dst
1171 /* 1868 */ // No operand predicates
1172 /* 1868 */ // MIs[0] zero
1173 /* 1868 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1174 /* 1872 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1175 /* 1876 */ // MIs[1] Operand 1
1176 /* 1876 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1177 /* 1887 */ // MIs[0] rhs
1178 /* 1887 */ // No operand predicates
1179 /* 1887 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1180 /* 1892 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1181 /* 1894 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[1]]
1182 /* 1894 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1183 /* 1899 */ GIR_EraseRootFromParent_Done,
1184 /* 1900 */ // Label 75: @1900
1185 /* 1900 */ GIM_Try, /*On fail goto*//*Label 76*/ GIMT_Encode4(1923), // Rule ID 23 //
1186 /* 1905 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1187 /* 1908 */ // MIs[0] dst
1188 /* 1908 */ // No operand predicates
1189 /* 1908 */ // MIs[0] lhs
1190 /* 1908 */ // No operand predicates
1191 /* 1908 */ // MIs[0] Operand 2
1192 /* 1908 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1193 /* 1912 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1194 /* 1917 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[6]]
1195 /* 1917 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1196 /* 1922 */ GIR_EraseRootFromParent_Done,
1197 /* 1923 */ // Label 76: @1923
1198 /* 1923 */ GIM_Reject,
1199 /* 1924 */ // Label 23: @1924
1200 /* 1924 */ GIM_Try, /*On fail goto*//*Label 77*/ GIMT_Encode4(1964), // Rule ID 33 //
1201 /* 1929 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1202 /* 1932 */ // MIs[0] dst
1203 /* 1932 */ // No operand predicates
1204 /* 1932 */ // MIs[0] zero
1205 /* 1932 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1206 /* 1936 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1207 /* 1940 */ // MIs[1] Operand 1
1208 /* 1940 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1209 /* 1951 */ // MIs[0] rhs
1210 /* 1951 */ // No operand predicates
1211 /* 1951 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1212 /* 1956 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1213 /* 1958 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[2]]
1214 /* 1958 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1215 /* 1963 */ GIR_EraseRootFromParent_Done,
1216 /* 1964 */ // Label 77: @1964
1217 /* 1964 */ GIM_Try, /*On fail goto*//*Label 78*/ GIMT_Encode4(1987), // Rule ID 22 //
1218 /* 1969 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1219 /* 1972 */ // MIs[0] dst
1220 /* 1972 */ // No operand predicates
1221 /* 1972 */ // MIs[0] lhs
1222 /* 1972 */ // No operand predicates
1223 /* 1972 */ // MIs[0] Operand 2
1224 /* 1972 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1225 /* 1976 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1226 /* 1981 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[5]]
1227 /* 1981 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1228 /* 1986 */ GIR_EraseRootFromParent_Done,
1229 /* 1987 */ // Label 78: @1987
1230 /* 1987 */ GIM_Reject,
1231 /* 1988 */ // Label 24: @1988
1232 /* 1988 */ GIM_Try, /*On fail goto*//*Label 79*/ GIMT_Encode4(2011), // Rule ID 26 //
1233 /* 1993 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1234 /* 1996 */ // MIs[0] dst
1235 /* 1996 */ // No operand predicates
1236 /* 1996 */ // MIs[0] lhs
1237 /* 1996 */ // No operand predicates
1238 /* 1996 */ // MIs[0] Operand 2
1239 /* 1996 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1240 /* 2000 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1241 /* 2005 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[9]]
1242 /* 2005 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1243 /* 2010 */ GIR_EraseRootFromParent_Done,
1244 /* 2011 */ // Label 79: @2011
1245 /* 2011 */ GIM_Reject,
1246 /* 2012 */ // Label 25: @2012
1247 /* 2012 */ GIM_Try, /*On fail goto*//*Label 80*/ GIMT_Encode4(2035), // Rule ID 25 //
1248 /* 2017 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1249 /* 2020 */ // MIs[0] dst
1250 /* 2020 */ // No operand predicates
1251 /* 2020 */ // MIs[0] lhs
1252 /* 2020 */ // No operand predicates
1253 /* 2020 */ // MIs[0] Operand 2
1254 /* 2020 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1255 /* 2024 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1256 /* 2029 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[8]]
1257 /* 2029 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1258 /* 2034 */ GIR_EraseRootFromParent_Done,
1259 /* 2035 */ // Label 80: @2035
1260 /* 2035 */ GIM_Reject,
1261 /* 2036 */ // Label 26: @2036
1262 /* 2036 */ GIM_Try, /*On fail goto*//*Label 81*/ GIMT_Encode4(2047), // Rule ID 16 //
1263 /* 2041 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
1264 /* 2044 */ // Combiner Rule #16: select_same_val; wip_match_opcode 'G_SELECT'
1265 /* 2044 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
1266 /* 2047 */ // Label 81: @2047
1267 /* 2047 */ GIM_Reject,
1268 /* 2048 */ // Label 27: @2048
1269 /* 2048 */ GIM_Try, /*On fail goto*//*Label 82*/ GIMT_Encode4(2071), // Rule ID 54 //
1270 /* 2053 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
1271 /* 2056 */ // MIs[0] dst
1272 /* 2056 */ // No operand predicates
1273 /* 2056 */ // MIs[0] x
1274 /* 2056 */ // No operand predicates
1275 /* 2056 */ // MIs[0] y
1276 /* 2056 */ // No operand predicates
1277 /* 2056 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1278 /* 2060 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1279 /* 2065 */ // Combiner Rule #34: right_identity_neg_zero_fp
1280 /* 2065 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1281 /* 2070 */ GIR_EraseRootFromParent_Done,
1282 /* 2071 */ // Label 82: @2071
1283 /* 2071 */ GIM_Try, /*On fail goto*//*Label 83*/ GIMT_Encode4(2100), // Rule ID 55 //
1284 /* 2076 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled),
1285 /* 2079 */ GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::FmNsz),
1286 /* 2085 */ // MIs[0] dst
1287 /* 2085 */ // No operand predicates
1288 /* 2085 */ // MIs[0] x
1289 /* 2085 */ // No operand predicates
1290 /* 2085 */ // MIs[0] y
1291 /* 2085 */ // No operand predicates
1292 /* 2085 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
1293 /* 2089 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1294 /* 2094 */ // Combiner Rule #35: right_identity_neg_zero_fp_nsz
1295 /* 2094 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1296 /* 2099 */ GIR_EraseRootFromParent_Done,
1297 /* 2100 */ // Label 83: @2100
1298 /* 2100 */ GIM_Reject,
1299 /* 2101 */ // Label 28: @2101
1300 /* 2101 */ GIM_Try, /*On fail goto*//*Label 84*/ GIMT_Encode4(2124), // Rule ID 45 //
1301 /* 2106 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1302 /* 2109 */ // MIs[0] dst
1303 /* 2109 */ // No operand predicates
1304 /* 2109 */ // MIs[0] x
1305 /* 2109 */ // No operand predicates
1306 /* 2109 */ // MIs[0] y
1307 /* 2109 */ // No operand predicates
1308 /* 2109 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
1309 /* 2113 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1310 /* 2118 */ // Combiner Rule #27: right_identity_one_fp
1311 /* 2118 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1312 /* 2123 */ GIR_EraseRootFromParent_Done,
1313 /* 2124 */ // Label 84: @2124
1314 /* 2124 */ GIM_Try, /*On fail goto*//*Label 85*/ GIMT_Encode4(2144), // Rule ID 56 //
1315 /* 2129 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled),
1316 /* 2132 */ // MIs[0] dst
1317 /* 2132 */ // No operand predicates
1318 /* 2132 */ // MIs[0] x
1319 /* 2132 */ // No operand predicates
1320 /* 2132 */ // MIs[0] y
1321 /* 2132 */ // No operand predicates
1322 /* 2132 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3),
1323 /* 2136 */ // Combiner Rule #36: right_identity_neg_one_fp
1324 /* 2136 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG),
1325 /* 2139 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1326 /* 2141 */ GIR_RootToRootCopy, /*OpIdx*/1, // x
1327 /* 2143 */ GIR_EraseRootFromParent_Done,
1328 /* 2144 */ // Label 85: @2144
1329 /* 2144 */ GIM_Reject,
1330 /* 2145 */ // Label 29: @2145
1331 /* 2145 */ GIM_Try, /*On fail goto*//*Label 86*/ GIMT_Encode4(2166), // Rule ID 4 //
1332 /* 2150 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
1333 /* 2153 */ // MIs[0] dst
1334 /* 2153 */ // No operand predicates
1335 /* 2153 */ // MIs[0] src0
1336 /* 2153 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1337 /* 2157 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1338 /* 2161 */ // MIs[1] cst
1339 /* 2161 */ // No operand predicates
1340 /* 2161 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1341 /* 2163 */ // Combiner Rule #4: constant_fold_flog2
1342 /* 2163 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1343 /* 2166 */ // Label 86: @2166
1344 /* 2166 */ GIM_Reject,
1345 /* 2167 */ // Label 30: @2167
1346 /* 2167 */ GIM_Try, /*On fail goto*//*Label 87*/ GIMT_Encode4(2188), // Rule ID 1 //
1347 /* 2172 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1348 /* 2175 */ // MIs[0] dst
1349 /* 2175 */ // No operand predicates
1350 /* 2175 */ // MIs[0] src0
1351 /* 2175 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1352 /* 2179 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1353 /* 2183 */ // MIs[1] cst
1354 /* 2183 */ // No operand predicates
1355 /* 2183 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1356 /* 2185 */ // Combiner Rule #1: constant_fold_fneg
1357 /* 2185 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1358 /* 2188 */ // Label 87: @2188
1359 /* 2188 */ GIM_Try, /*On fail goto*//*Label 88*/ GIMT_Encode4(2217), // Rule ID 43 //
1360 /* 2193 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled),
1361 /* 2196 */ // MIs[0] dst
1362 /* 2196 */ // No operand predicates
1363 /* 2196 */ // MIs[0] t
1364 /* 2196 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1365 /* 2200 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
1366 /* 2204 */ // MIs[1] src
1367 /* 2204 */ // No operand predicates
1368 /* 2204 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1369 /* 2209 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1370 /* 2211 */ // Combiner Rule #25: fneg_fneg_fold
1371 /* 2211 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1372 /* 2216 */ GIR_EraseRootFromParent_Done,
1373 /* 2217 */ // Label 88: @2217
1374 /* 2217 */ GIM_Reject,
1375 /* 2218 */ // Label 31: @2218
1376 /* 2218 */ GIM_Try, /*On fail goto*//*Label 89*/ GIMT_Encode4(2239), // Rule ID 6 //
1377 /* 2223 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1378 /* 2226 */ // MIs[0] dst
1379 /* 2226 */ // No operand predicates
1380 /* 2226 */ // MIs[0] src0
1381 /* 2226 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1382 /* 2230 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1383 /* 2234 */ // MIs[1] cst
1384 /* 2234 */ // No operand predicates
1385 /* 2234 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1386 /* 2236 */ // Combiner Rule #6: constant_fold_fpext
1387 /* 2236 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1388 /* 2239 */ // Label 89: @2239
1389 /* 2239 */ GIM_Reject,
1390 /* 2240 */ // Label 32: @2240
1391 /* 2240 */ GIM_Try, /*On fail goto*//*Label 90*/ GIMT_Encode4(2261), // Rule ID 5 //
1392 /* 2245 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1393 /* 2248 */ // MIs[0] dst
1394 /* 2248 */ // No operand predicates
1395 /* 2248 */ // MIs[0] src0
1396 /* 2248 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1397 /* 2252 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1398 /* 2256 */ // MIs[1] cst
1399 /* 2256 */ // No operand predicates
1400 /* 2256 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1401 /* 2258 */ // Combiner Rule #5: constant_fold_fptrunc
1402 /* 2258 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1403 /* 2261 */ // Label 90: @2261
1404 /* 2261 */ GIM_Try, /*On fail goto*//*Label 91*/ GIMT_Encode4(2282), // Rule ID 53 //
1405 /* 2266 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled),
1406 /* 2269 */ // MIs[0] dst
1407 /* 2269 */ // No operand predicates
1408 /* 2269 */ // MIs[0] src1
1409 /* 2269 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1410 /* 2273 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT),
1411 /* 2277 */ // MIs[1] src0
1412 /* 2277 */ // No operand predicates
1413 /* 2277 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1414 /* 2279 */ // Combiner Rule #33: fptrunc_fpext_fold
1415 /* 2279 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
1416 /* 2282 */ // Label 91: @2282
1417 /* 2282 */ GIM_Reject,
1418 /* 2283 */ // Label 33: @2283
1419 /* 2283 */ GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(2298), // Rule ID 14 //
1420 /* 2288 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
1421 /* 2291 */ // MIs[0] dst
1422 /* 2291 */ // No operand predicates
1423 /* 2291 */ // MIs[0] Operand 1
1424 /* 2291 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
1425 /* 2295 */ // Combiner Rule #14: itof_const_zero_fold_si
1426 /* 2295 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
1427 /* 2298 */ // Label 92: @2298
1428 /* 2298 */ GIM_Reject,
1429 /* 2299 */ // Label 34: @2299
1430 /* 2299 */ GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(2314), // Rule ID 15 //
1431 /* 2304 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
1432 /* 2307 */ // MIs[0] dst
1433 /* 2307 */ // No operand predicates
1434 /* 2307 */ // MIs[0] Operand 1
1435 /* 2307 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
1436 /* 2311 */ // Combiner Rule #15: itof_const_zero_fold_ui
1437 /* 2311 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
1438 /* 2314 */ // Label 93: @2314
1439 /* 2314 */ GIM_Reject,
1440 /* 2315 */ // Label 35: @2315
1441 /* 2315 */ GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(2336), // Rule ID 2 //
1442 /* 2320 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1443 /* 2323 */ // MIs[0] dst
1444 /* 2323 */ // No operand predicates
1445 /* 2323 */ // MIs[0] src0
1446 /* 2323 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1447 /* 2327 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1448 /* 2331 */ // MIs[1] cst
1449 /* 2331 */ // No operand predicates
1450 /* 2331 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1451 /* 2333 */ // Combiner Rule #2: constant_fold_fabs
1452 /* 2333 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1453 /* 2336 */ // Label 94: @2336
1454 /* 2336 */ GIM_Reject,
1455 /* 2337 */ // Label 36: @2337
1456 /* 2337 */ GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(2360), // Rule ID 24 //
1457 /* 2342 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1458 /* 2345 */ // MIs[0] dst
1459 /* 2345 */ // No operand predicates
1460 /* 2345 */ // MIs[0] lhs
1461 /* 2345 */ // No operand predicates
1462 /* 2345 */ // MIs[0] Operand 2
1463 /* 2345 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1464 /* 2349 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1465 /* 2354 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[7]]
1466 /* 2354 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1467 /* 2359 */ GIR_EraseRootFromParent_Done,
1468 /* 2360 */ // Label 95: @2360
1469 /* 2360 */ GIM_Reject,
1470 /* 2361 */ // Label 37: @2361
1471 /* 2361 */ GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(2382), // Rule ID 7 //
1472 /* 2366 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
1473 /* 2369 */ // MIs[0] dst
1474 /* 2369 */ // No operand predicates
1475 /* 2369 */ // MIs[0] src0
1476 /* 2369 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1477 /* 2373 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1478 /* 2377 */ // MIs[1] cst
1479 /* 2377 */ // No operand predicates
1480 /* 2377 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1481 /* 2379 */ // Combiner Rule #7: constant_fold_fceil
1482 /* 2379 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1483 /* 2382 */ // Label 96: @2382
1484 /* 2382 */ GIM_Reject,
1485 /* 2383 */ // Label 38: @2383
1486 /* 2383 */ GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(2404), // Rule ID 3 //
1487 /* 2388 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
1488 /* 2391 */ // MIs[0] dst
1489 /* 2391 */ // No operand predicates
1490 /* 2391 */ // MIs[0] src0
1491 /* 2391 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1492 /* 2395 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1493 /* 2399 */ // MIs[1] cst
1494 /* 2399 */ // No operand predicates
1495 /* 2399 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1496 /* 2401 */ // Combiner Rule #3: constant_fold_fsqrt
1497 /* 2401 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1498 /* 2404 */ // Label 97: @2404
1499 /* 2404 */ GIM_Reject,
1500 /* 2405 */ // Label 39: @2405
1501 /* 2405 */ GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(2426), // Rule ID 8 //
1502 /* 2410 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1503 /* 2413 */ // MIs[0] dst
1504 /* 2413 */ // No operand predicates
1505 /* 2413 */ // MIs[0] src0
1506 /* 2413 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1507 /* 2417 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1508 /* 2421 */ // MIs[1] cst
1509 /* 2421 */ // No operand predicates
1510 /* 2421 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1511 /* 2423 */ // Combiner Rule #8: constant_fold_ffloor
1512 /* 2423 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1513 /* 2426 */ // Label 98: @2426
1514 /* 2426 */ GIM_Reject,
1515 /* 2427 */ // Label 40: @2427
1516 /* 2427 */ GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(2448), // Rule ID 12 //
1517 /* 2432 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
1518 /* 2435 */ // MIs[0] dst
1519 /* 2435 */ // No operand predicates
1520 /* 2435 */ // MIs[0] src0
1521 /* 2435 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1522 /* 2439 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1523 /* 2443 */ // MIs[1] cst
1524 /* 2443 */ // No operand predicates
1525 /* 2443 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1526 /* 2445 */ // Combiner Rule #12: constant_fold_frint
1527 /* 2445 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1528 /* 2448 */ // Label 99: @2448
1529 /* 2448 */ GIM_Reject,
1530 /* 2449 */ // Label 41: @2449
1531 /* 2449 */ GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(2470), // Rule ID 13 //
1532 /* 2454 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
1533 /* 2457 */ // MIs[0] dst
1534 /* 2457 */ // No operand predicates
1535 /* 2457 */ // MIs[0] src0
1536 /* 2457 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1537 /* 2461 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1538 /* 2465 */ // MIs[1] cst
1539 /* 2465 */ // No operand predicates
1540 /* 2465 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1541 /* 2467 */ // Combiner Rule #13: constant_fold_fnearbyint
1542 /* 2467 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1543 /* 2470 */ // Label 100: @2470
1544 /* 2470 */ GIM_Reject,
1545 /* 2471 */ // Label 42: @2471
1546 /* 2471 */ GIM_Reject,
1547 /* 2472 */ }; // Size: 2472 bytes
1548 return MatchTable0;
1549}
1550#undef GIMT_Encode2
1551#undef GIMT_Encode4
1552#undef GIMT_Encode8
1553
1554
1555#endif // GET_GICOMBINER_IMPL
1556
1557#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
1558
1559AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
1560AvailableFunctionFeatures()
1561
1562#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
1563
1564#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
1565
1566, State(0),
1567ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
1568
1569#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
1570
1571