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(282), /*)*//*default:*//*Label 42*/ GIMT_Encode4(2479),
683 /* 10 */ /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(1058), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
684 /* 150 */ /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(1070),
685 /* 154 */ /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(1162),
686 /* 158 */ /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(1225),
687 /* 162 */ /*TargetOpcode::G_SDIV*//*Label 4*/ GIMT_Encode4(1312),
688 /* 166 */ /*TargetOpcode::G_UDIV*//*Label 5*/ GIMT_Encode4(1353),
689 /* 170 */ /*TargetOpcode::G_SREM*//*Label 6*/ GIMT_Encode4(1394),
690 /* 174 */ /*TargetOpcode::G_UREM*//*Label 7*/ GIMT_Encode4(1435), GIMT_Encode4(0), GIMT_Encode4(0),
691 /* 186 */ /*TargetOpcode::G_AND*//*Label 8*/ GIMT_Encode4(1476),
692 /* 190 */ /*TargetOpcode::G_OR*//*Label 9*/ GIMT_Encode4(1501),
693 /* 194 */ /*TargetOpcode::G_XOR*//*Label 10*/ GIMT_Encode4(1560), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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(1623),
695 /* 266 */ /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 12*/ GIMT_Encode4(1635), GIMT_Encode4(0),
696 /* 274 */ /*TargetOpcode::G_PTRTOINT*//*Label 13*/ GIMT_Encode4(1647),
697 /* 278 */ /*TargetOpcode::G_INTTOPTR*//*Label 14*/ GIMT_Encode4(1669),
698 /* 282 */ /*TargetOpcode::G_BITCAST*//*Label 15*/ GIMT_Encode4(1681), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
699 /* 298 */ /*TargetOpcode::G_INTRINSIC_TRUNC*//*Label 16*/ GIMT_Encode4(1703),
700 /* 302 */ /*TargetOpcode::G_INTRINSIC_ROUND*//*Label 17*/ GIMT_Encode4(1725), GIMT_Encode4(0), GIMT_Encode4(0),
701 /* 314 */ /*TargetOpcode::G_INTRINSIC_ROUNDEVEN*//*Label 18*/ GIMT_Encode4(1747), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 494 */ /*TargetOpcode::G_ANYEXT*//*Label 19*/ GIMT_Encode4(1769),
703 /* 498 */ /*TargetOpcode::G_TRUNC*//*Label 20*/ GIMT_Encode4(1781), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 542 */ /*TargetOpcode::G_SHL*//*Label 21*/ GIMT_Encode4(1804),
705 /* 546 */ /*TargetOpcode::G_LSHR*//*Label 22*/ GIMT_Encode4(1868),
706 /* 550 */ /*TargetOpcode::G_ASHR*//*Label 23*/ GIMT_Encode4(1932), GIMT_Encode4(0), GIMT_Encode4(0),
707 /* 562 */ /*TargetOpcode::G_ROTR*//*Label 24*/ GIMT_Encode4(1996),
708 /* 566 */ /*TargetOpcode::G_ROTL*//*Label 25*/ GIMT_Encode4(2020), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
709 /* 586 */ /*TargetOpcode::G_SELECT*//*Label 26*/ GIMT_Encode4(2044), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 694 */ /*TargetOpcode::G_FADD*//*Label 27*/ GIMT_Encode4(2056), GIMT_Encode4(0),
711 /* 702 */ /*TargetOpcode::G_FMUL*//*Label 28*/ GIMT_Encode4(2109), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 750 */ /*TargetOpcode::G_FLOG2*//*Label 29*/ GIMT_Encode4(2153), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
713 /* 766 */ /*TargetOpcode::G_FNEG*//*Label 30*/ GIMT_Encode4(2175),
714 /* 770 */ /*TargetOpcode::G_FPEXT*//*Label 31*/ GIMT_Encode4(2226),
715 /* 774 */ /*TargetOpcode::G_FPTRUNC*//*Label 32*/ GIMT_Encode4(2248), GIMT_Encode4(0), GIMT_Encode4(0),
716 /* 786 */ /*TargetOpcode::G_SITOFP*//*Label 33*/ GIMT_Encode4(2291),
717 /* 790 */ /*TargetOpcode::G_UITOFP*//*Label 34*/ GIMT_Encode4(2307), GIMT_Encode4(0), GIMT_Encode4(0),
718 /* 802 */ /*TargetOpcode::G_FABS*//*Label 35*/ GIMT_Encode4(2323), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 882 */ /*TargetOpcode::G_PTR_ADD*//*Label 36*/ GIMT_Encode4(2345), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 994 */ /*TargetOpcode::G_FCEIL*//*Label 37*/ GIMT_Encode4(2369), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 1042 */ /*TargetOpcode::G_FSQRT*//*Label 38*/ GIMT_Encode4(2391),
722 /* 1046 */ /*TargetOpcode::G_FFLOOR*//*Label 39*/ GIMT_Encode4(2413),
723 /* 1050 */ /*TargetOpcode::G_FRINT*//*Label 40*/ GIMT_Encode4(2435),
724 /* 1054 */ /*TargetOpcode::G_FNEARBYINT*//*Label 41*/ GIMT_Encode4(2457),
725 /* 1058 */ // Label 0: @1058
726 /* 1058 */ GIM_Try, /*On fail goto*//*Label 43*/ GIMT_Encode4(1069), // Rule ID 57 //
727 /* 1063 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule37Enabled),
728 /* 1066 */ // MIs[0] d
729 /* 1066 */ // No operand predicates
730 /* 1066 */ // MIs[0] s
731 /* 1066 */ // No operand predicates
732 /* 1066 */ // Combiner Rule #37: copy_prop
733 /* 1066 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
734 /* 1069 */ // Label 43: @1069
735 /* 1069 */ GIM_Reject,
736 /* 1070 */ // Label 1: @1070
737 /* 1070 */ GIM_Try, /*On fail goto*//*Label 44*/ GIMT_Encode4(1104), // Rule ID 47 //
738 /* 1075 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
739 /* 1078 */ // MIs[0] dst
740 /* 1078 */ // No operand predicates
741 /* 1078 */ // MIs[0] __add_sub_reg_match_0.tmp
742 /* 1078 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
743 /* 1082 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
744 /* 1086 */ // MIs[1] src
745 /* 1086 */ // No operand predicates
746 /* 1086 */ // MIs[1] __add_sub_reg_match_0.x
747 /* 1086 */ // No operand predicates
748 /* 1086 */ // MIs[0] __add_sub_reg_match_0.x
749 /* 1086 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2,
750 /* 1091 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
751 /* 1096 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
752 /* 1098 */ // Combiner Rule #28: add_sub_reg @ [__add_sub_reg_match_0[1]]
753 /* 1098 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
754 /* 1103 */ GIR_EraseRootFromParent_Done,
755 /* 1104 */ // Label 44: @1104
756 /* 1104 */ GIM_Try, /*On fail goto*//*Label 45*/ GIMT_Encode4(1138), // Rule ID 46 //
757 /* 1109 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled),
758 /* 1112 */ // MIs[0] dst
759 /* 1112 */ // No operand predicates
760 /* 1112 */ // MIs[0] __add_sub_reg_match_0.x
761 /* 1112 */ // No operand predicates
762 /* 1112 */ // MIs[0] __add_sub_reg_match_0.tmp
763 /* 1112 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
764 /* 1116 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB),
765 /* 1120 */ // MIs[1] src
766 /* 1120 */ // No operand predicates
767 /* 1120 */ // MIs[1] __add_sub_reg_match_0.x
768 /* 1120 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
769 /* 1125 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
770 /* 1130 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
771 /* 1132 */ // Combiner Rule #28: add_sub_reg @ [__add_sub_reg_match_0[0]]
772 /* 1132 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
773 /* 1137 */ GIR_EraseRootFromParent_Done,
774 /* 1138 */ // Label 45: @1138
775 /* 1138 */ GIM_Try, /*On fail goto*//*Label 46*/ GIMT_Encode4(1161), // Rule ID 18 //
776 /* 1143 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
777 /* 1146 */ // MIs[0] dst
778 /* 1146 */ // No operand predicates
779 /* 1146 */ // MIs[0] lhs
780 /* 1146 */ // No operand predicates
781 /* 1146 */ // MIs[0] Operand 2
782 /* 1146 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
783 /* 1150 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
784 /* 1155 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[1]]
785 /* 1155 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
786 /* 1160 */ GIR_EraseRootFromParent_Done,
787 /* 1161 */ // Label 46: @1161
788 /* 1161 */ GIM_Reject,
789 /* 1162 */ // Label 2: @1162
790 /* 1162 */ GIM_Try, /*On fail goto*//*Label 47*/ GIMT_Encode4(1201), // Rule ID 29 //
791 /* 1167 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
792 /* 1170 */ // MIs[0] dst
793 /* 1170 */ // No operand predicates
794 /* 1170 */ // MIs[0] x
795 /* 1170 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
796 /* 1174 */ // MIs[0] x
797 /* 1174 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
798 /* 1179 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
799 /* 1182 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
800 /* 1192 */ // Combiner Rule #19: same_val_zero @ [__same_val_zero_match_0[0]]
801 /* 1192 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
802 /* 1195 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
803 /* 1197 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
804 /* 1200 */ GIR_EraseRootFromParent_Done,
805 /* 1201 */ // Label 47: @1201
806 /* 1201 */ GIM_Try, /*On fail goto*//*Label 48*/ GIMT_Encode4(1224), // Rule ID 17 //
807 /* 1206 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
808 /* 1209 */ // MIs[0] dst
809 /* 1209 */ // No operand predicates
810 /* 1209 */ // MIs[0] lhs
811 /* 1209 */ // No operand predicates
812 /* 1209 */ // MIs[0] Operand 2
813 /* 1209 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
814 /* 1213 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
815 /* 1218 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[0]]
816 /* 1218 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
817 /* 1223 */ GIR_EraseRootFromParent_Done,
818 /* 1224 */ // Label 48: @1224
819 /* 1224 */ GIM_Reject,
820 /* 1225 */ // Label 3: @1225
821 /* 1225 */ GIM_Try, /*On fail goto*//*Label 49*/ GIMT_Encode4(1265), // Rule ID 38 //
822 /* 1230 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
823 /* 1233 */ // MIs[0] dst
824 /* 1233 */ // No operand predicates
825 /* 1233 */ // MIs[0] zero
826 /* 1233 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
827 /* 1237 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
828 /* 1241 */ // MIs[1] Operand 1
829 /* 1241 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
830 /* 1252 */ // MIs[0] rhs
831 /* 1252 */ // No operand predicates
832 /* 1252 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
833 /* 1257 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
834 /* 1259 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[7]]
835 /* 1259 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
836 /* 1264 */ GIR_EraseRootFromParent_Done,
837 /* 1265 */ // Label 49: @1265
838 /* 1265 */ GIM_Try, /*On fail goto*//*Label 50*/ GIMT_Encode4(1288), // Rule ID 39 //
839 /* 1270 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
840 /* 1273 */ // MIs[0] dst
841 /* 1273 */ // No operand predicates
842 /* 1273 */ // MIs[0] lhs
843 /* 1273 */ // No operand predicates
844 /* 1273 */ // MIs[0] zero
845 /* 1273 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
846 /* 1277 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
847 /* 1282 */ // Combiner Rule #21: binop_right_to_zero
848 /* 1282 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2,
849 /* 1287 */ GIR_EraseRootFromParent_Done,
850 /* 1288 */ // Label 50: @1288
851 /* 1288 */ GIM_Try, /*On fail goto*//*Label 51*/ GIMT_Encode4(1311), // Rule ID 44 //
852 /* 1293 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled),
853 /* 1296 */ // MIs[0] dst
854 /* 1296 */ // No operand predicates
855 /* 1296 */ // MIs[0] x
856 /* 1296 */ // No operand predicates
857 /* 1296 */ // MIs[0] Operand 2
858 /* 1296 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1,
859 /* 1300 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
860 /* 1305 */ // Combiner Rule #26: right_identity_one_int
861 /* 1305 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
862 /* 1310 */ GIR_EraseRootFromParent_Done,
863 /* 1311 */ // Label 51: @1311
864 /* 1311 */ GIM_Reject,
865 /* 1312 */ // Label 4: @1312
866 /* 1312 */ GIM_Try, /*On fail goto*//*Label 52*/ GIMT_Encode4(1352), // Rule ID 34 //
867 /* 1317 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
868 /* 1320 */ // MIs[0] dst
869 /* 1320 */ // No operand predicates
870 /* 1320 */ // MIs[0] zero
871 /* 1320 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
872 /* 1324 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
873 /* 1328 */ // MIs[1] Operand 1
874 /* 1328 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
875 /* 1339 */ // MIs[0] rhs
876 /* 1339 */ // No operand predicates
877 /* 1339 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
878 /* 1344 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
879 /* 1346 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[3]]
880 /* 1346 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
881 /* 1351 */ GIR_EraseRootFromParent_Done,
882 /* 1352 */ // Label 52: @1352
883 /* 1352 */ GIM_Reject,
884 /* 1353 */ // Label 5: @1353
885 /* 1353 */ GIM_Try, /*On fail goto*//*Label 53*/ GIMT_Encode4(1393), // Rule ID 35 //
886 /* 1358 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
887 /* 1361 */ // MIs[0] dst
888 /* 1361 */ // No operand predicates
889 /* 1361 */ // MIs[0] zero
890 /* 1361 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
891 /* 1365 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
892 /* 1369 */ // MIs[1] Operand 1
893 /* 1369 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
894 /* 1380 */ // MIs[0] rhs
895 /* 1380 */ // No operand predicates
896 /* 1380 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
897 /* 1385 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
898 /* 1387 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[4]]
899 /* 1387 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
900 /* 1392 */ GIR_EraseRootFromParent_Done,
901 /* 1393 */ // Label 53: @1393
902 /* 1393 */ GIM_Reject,
903 /* 1394 */ // Label 6: @1394
904 /* 1394 */ GIM_Try, /*On fail goto*//*Label 54*/ GIMT_Encode4(1434), // Rule ID 36 //
905 /* 1399 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
906 /* 1402 */ // MIs[0] dst
907 /* 1402 */ // No operand predicates
908 /* 1402 */ // MIs[0] zero
909 /* 1402 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
910 /* 1406 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
911 /* 1410 */ // MIs[1] Operand 1
912 /* 1410 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
913 /* 1421 */ // MIs[0] rhs
914 /* 1421 */ // No operand predicates
915 /* 1421 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
916 /* 1426 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
917 /* 1428 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[5]]
918 /* 1428 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
919 /* 1433 */ GIR_EraseRootFromParent_Done,
920 /* 1434 */ // Label 54: @1434
921 /* 1434 */ GIM_Reject,
922 /* 1435 */ // Label 7: @1435
923 /* 1435 */ GIM_Try, /*On fail goto*//*Label 55*/ GIMT_Encode4(1475), // Rule ID 37 //
924 /* 1440 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
925 /* 1443 */ // MIs[0] dst
926 /* 1443 */ // No operand predicates
927 /* 1443 */ // MIs[0] zero
928 /* 1443 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
929 /* 1447 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
930 /* 1451 */ // MIs[1] Operand 1
931 /* 1451 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
932 /* 1462 */ // MIs[0] rhs
933 /* 1462 */ // No operand predicates
934 /* 1462 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
935 /* 1467 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
936 /* 1469 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[6]]
937 /* 1469 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
938 /* 1474 */ GIR_EraseRootFromParent_Done,
939 /* 1475 */ // Label 55: @1475
940 /* 1475 */ GIM_Reject,
941 /* 1476 */ // Label 8: @1476
942 /* 1476 */ GIM_Try, /*On fail goto*//*Label 56*/ GIMT_Encode4(1500), // Rule ID 27 //
943 /* 1481 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
944 /* 1484 */ // MIs[0] dst
945 /* 1484 */ // No operand predicates
946 /* 1484 */ // MIs[0] src
947 /* 1484 */ // No operand predicates
948 /* 1484 */ // MIs[0] src
949 /* 1484 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
950 /* 1489 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
951 /* 1494 */ // Combiner Rule #18: binop_same_val @ [__binop_same_val_match_0[0]]
952 /* 1494 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
953 /* 1499 */ GIR_EraseRootFromParent_Done,
954 /* 1500 */ // Label 56: @1500
955 /* 1500 */ GIM_Reject,
956 /* 1501 */ // Label 9: @1501
957 /* 1501 */ GIM_Try, /*On fail goto*//*Label 57*/ GIMT_Encode4(1512), // Rule ID 0 //
958 /* 1506 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
959 /* 1509 */ // Combiner Rule #0: redundant_or; wip_match_opcode 'G_OR'
960 /* 1509 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
961 /* 1512 */ // Label 57: @1512
962 /* 1512 */ GIM_Try, /*On fail goto*//*Label 58*/ GIMT_Encode4(1536), // Rule ID 28 //
963 /* 1517 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
964 /* 1520 */ // MIs[0] dst
965 /* 1520 */ // No operand predicates
966 /* 1520 */ // MIs[0] src
967 /* 1520 */ // No operand predicates
968 /* 1520 */ // MIs[0] src
969 /* 1520 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
970 /* 1525 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
971 /* 1530 */ // Combiner Rule #18: binop_same_val @ [__binop_same_val_match_0[1]]
972 /* 1530 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
973 /* 1535 */ GIR_EraseRootFromParent_Done,
974 /* 1536 */ // Label 58: @1536
975 /* 1536 */ GIM_Try, /*On fail goto*//*Label 59*/ GIMT_Encode4(1559), // Rule ID 19 //
976 /* 1541 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
977 /* 1544 */ // MIs[0] dst
978 /* 1544 */ // No operand predicates
979 /* 1544 */ // MIs[0] lhs
980 /* 1544 */ // No operand predicates
981 /* 1544 */ // MIs[0] Operand 2
982 /* 1544 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
983 /* 1548 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
984 /* 1553 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[2]]
985 /* 1553 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
986 /* 1558 */ GIR_EraseRootFromParent_Done,
987 /* 1559 */ // Label 59: @1559
988 /* 1559 */ GIM_Reject,
989 /* 1560 */ // Label 10: @1560
990 /* 1560 */ GIM_Try, /*On fail goto*//*Label 60*/ GIMT_Encode4(1599), // Rule ID 30 //
991 /* 1565 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
992 /* 1568 */ // MIs[0] dst
993 /* 1568 */ // No operand predicates
994 /* 1568 */ // MIs[0] x
995 /* 1568 */ GIM_RecordRegType, /*MI*/0, /*Op*/1, /*TempTypeIdx*/255,
996 /* 1572 */ // MIs[0] x
997 /* 1572 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1,
998 /* 1577 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255,
999 /* 1580 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0),
1000 /* 1590 */ // Combiner Rule #19: same_val_zero @ [__same_val_zero_match_0[1]]
1001 /* 1590 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::COPY),
1002 /* 1593 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1003 /* 1595 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0,
1004 /* 1598 */ GIR_EraseRootFromParent_Done,
1005 /* 1599 */ // Label 60: @1599
1006 /* 1599 */ GIM_Try, /*On fail goto*//*Label 61*/ GIMT_Encode4(1622), // Rule ID 20 //
1007 /* 1604 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1008 /* 1607 */ // MIs[0] dst
1009 /* 1607 */ // No operand predicates
1010 /* 1607 */ // MIs[0] lhs
1011 /* 1607 */ // No operand predicates
1012 /* 1607 */ // MIs[0] Operand 2
1013 /* 1607 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1014 /* 1611 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1015 /* 1616 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[3]]
1016 /* 1616 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1017 /* 1621 */ GIR_EraseRootFromParent_Done,
1018 /* 1622 */ // Label 61: @1622
1019 /* 1622 */ GIM_Reject,
1020 /* 1623 */ // Label 11: @1623
1021 /* 1623 */ GIM_Try, /*On fail goto*//*Label 62*/ GIMT_Encode4(1634), // Rule ID 49 //
1022 /* 1628 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
1023 /* 1631 */ // Combiner Rule #29: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR'
1024 /* 1631 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
1025 /* 1634 */ // Label 62: @1634
1026 /* 1634 */ GIM_Reject,
1027 /* 1635 */ // Label 12: @1635
1028 /* 1635 */ GIM_Try, /*On fail goto*//*Label 63*/ GIMT_Encode4(1646), // Rule ID 48 //
1029 /* 1640 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule29Enabled),
1030 /* 1643 */ // Combiner Rule #29: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC'
1031 /* 1643 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
1032 /* 1646 */ // Label 63: @1646
1033 /* 1646 */ GIM_Reject,
1034 /* 1647 */ // Label 13: @1647
1035 /* 1647 */ GIM_Try, /*On fail goto*//*Label 64*/ GIMT_Encode4(1668), // Rule ID 41 //
1036 /* 1652 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
1037 /* 1655 */ // MIs[0] dst
1038 /* 1655 */ // No operand predicates
1039 /* 1655 */ // MIs[0] t
1040 /* 1655 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1041 /* 1659 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR),
1042 /* 1663 */ // MIs[1] ptr
1043 /* 1663 */ // No operand predicates
1044 /* 1663 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1045 /* 1665 */ // Combiner Rule #23: i2p_to_p2i
1046 /* 1665 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
1047 /* 1668 */ // Label 64: @1668
1048 /* 1668 */ GIM_Reject,
1049 /* 1669 */ // Label 14: @1669
1050 /* 1669 */ GIM_Try, /*On fail goto*//*Label 65*/ GIMT_Encode4(1680), // Rule ID 40 //
1051 /* 1674 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
1052 /* 1677 */ // Combiner Rule #22: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR'
1053 /* 1677 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
1054 /* 1680 */ // Label 65: @1680
1055 /* 1680 */ GIM_Reject,
1056 /* 1681 */ // Label 15: @1681
1057 /* 1681 */ GIM_Try, /*On fail goto*//*Label 66*/ GIMT_Encode4(1702), // Rule ID 52 //
1058 /* 1686 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule32Enabled),
1059 /* 1689 */ // MIs[0] dst
1060 /* 1689 */ // No operand predicates
1061 /* 1689 */ // MIs[0] src1
1062 /* 1689 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1063 /* 1693 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST),
1064 /* 1697 */ // MIs[1] src0
1065 /* 1697 */ // No operand predicates
1066 /* 1697 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1067 /* 1699 */ // Combiner Rule #32: bitcast_bitcast_fold
1068 /* 1699 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
1069 /* 1702 */ // Label 66: @1702
1070 /* 1702 */ GIM_Reject,
1071 /* 1703 */ // Label 16: @1703
1072 /* 1703 */ GIM_Try, /*On fail goto*//*Label 67*/ GIMT_Encode4(1724), // Rule ID 9 //
1073 /* 1708 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
1074 /* 1711 */ // MIs[0] dst
1075 /* 1711 */ // No operand predicates
1076 /* 1711 */ // MIs[0] src0
1077 /* 1711 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1078 /* 1715 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1079 /* 1719 */ // MIs[1] cst
1080 /* 1719 */ // No operand predicates
1081 /* 1719 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1082 /* 1721 */ // Combiner Rule #9: constant_fold_intrinsic_trunc
1083 /* 1721 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1084 /* 1724 */ // Label 67: @1724
1085 /* 1724 */ GIM_Reject,
1086 /* 1725 */ // Label 17: @1725
1087 /* 1725 */ GIM_Try, /*On fail goto*//*Label 68*/ GIMT_Encode4(1746), // Rule ID 10 //
1088 /* 1730 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
1089 /* 1733 */ // MIs[0] dst
1090 /* 1733 */ // No operand predicates
1091 /* 1733 */ // MIs[0] src0
1092 /* 1733 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1093 /* 1737 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1094 /* 1741 */ // MIs[1] cst
1095 /* 1741 */ // No operand predicates
1096 /* 1741 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1097 /* 1743 */ // Combiner Rule #10: constant_fold_intrinsic_round
1098 /* 1743 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1099 /* 1746 */ // Label 68: @1746
1100 /* 1746 */ GIM_Reject,
1101 /* 1747 */ // Label 18: @1747
1102 /* 1747 */ GIM_Try, /*On fail goto*//*Label 69*/ GIMT_Encode4(1768), // Rule ID 11 //
1103 /* 1752 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
1104 /* 1755 */ // MIs[0] dst
1105 /* 1755 */ // No operand predicates
1106 /* 1755 */ // MIs[0] src0
1107 /* 1755 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1108 /* 1759 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1109 /* 1763 */ // MIs[1] cst
1110 /* 1763 */ // No operand predicates
1111 /* 1763 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1112 /* 1765 */ // Combiner Rule #11: constant_fold_intrinsic_roundeven
1113 /* 1765 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1114 /* 1768 */ // Label 69: @1768
1115 /* 1768 */ GIM_Reject,
1116 /* 1769 */ // Label 19: @1769
1117 /* 1769 */ GIM_Try, /*On fail goto*//*Label 70*/ GIMT_Encode4(1780), // Rule ID 42 //
1118 /* 1774 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
1119 /* 1777 */ // Combiner Rule #24: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT'
1120 /* 1777 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
1121 /* 1780 */ // Label 70: @1780
1122 /* 1780 */ GIM_Reject,
1123 /* 1781 */ // Label 20: @1781
1124 /* 1781 */ GIM_Try, /*On fail goto*//*Label 71*/ GIMT_Encode4(1792), // Rule ID 50 //
1125 /* 1786 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule30Enabled),
1126 /* 1789 */ // Combiner Rule #30: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC'
1127 /* 1789 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
1128 /* 1792 */ // Label 71: @1792
1129 /* 1792 */ GIM_Try, /*On fail goto*//*Label 72*/ GIMT_Encode4(1803), // Rule ID 51 //
1130 /* 1797 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule31Enabled),
1131 /* 1800 */ // Combiner Rule #31: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC'
1132 /* 1800 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
1133 /* 1803 */ // Label 72: @1803
1134 /* 1803 */ GIM_Reject,
1135 /* 1804 */ // Label 21: @1804
1136 /* 1804 */ GIM_Try, /*On fail goto*//*Label 73*/ GIMT_Encode4(1844), // Rule ID 31 //
1137 /* 1809 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1138 /* 1812 */ // MIs[0] dst
1139 /* 1812 */ // No operand predicates
1140 /* 1812 */ // MIs[0] zero
1141 /* 1812 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1142 /* 1816 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1143 /* 1820 */ // MIs[1] Operand 1
1144 /* 1820 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1145 /* 1831 */ // MIs[0] rhs
1146 /* 1831 */ // No operand predicates
1147 /* 1831 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1148 /* 1836 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1149 /* 1838 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[0]]
1150 /* 1838 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1151 /* 1843 */ GIR_EraseRootFromParent_Done,
1152 /* 1844 */ // Label 73: @1844
1153 /* 1844 */ GIM_Try, /*On fail goto*//*Label 74*/ GIMT_Encode4(1867), // Rule ID 21 //
1154 /* 1849 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1155 /* 1852 */ // MIs[0] dst
1156 /* 1852 */ // No operand predicates
1157 /* 1852 */ // MIs[0] lhs
1158 /* 1852 */ // No operand predicates
1159 /* 1852 */ // MIs[0] Operand 2
1160 /* 1852 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1161 /* 1856 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1162 /* 1861 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[4]]
1163 /* 1861 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1164 /* 1866 */ GIR_EraseRootFromParent_Done,
1165 /* 1867 */ // Label 74: @1867
1166 /* 1867 */ GIM_Reject,
1167 /* 1868 */ // Label 22: @1868
1168 /* 1868 */ GIM_Try, /*On fail goto*//*Label 75*/ GIMT_Encode4(1908), // Rule ID 32 //
1169 /* 1873 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1170 /* 1876 */ // MIs[0] dst
1171 /* 1876 */ // No operand predicates
1172 /* 1876 */ // MIs[0] zero
1173 /* 1876 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1174 /* 1880 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1175 /* 1884 */ // MIs[1] Operand 1
1176 /* 1884 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1177 /* 1895 */ // MIs[0] rhs
1178 /* 1895 */ // No operand predicates
1179 /* 1895 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1180 /* 1900 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1181 /* 1902 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[1]]
1182 /* 1902 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1183 /* 1907 */ GIR_EraseRootFromParent_Done,
1184 /* 1908 */ // Label 75: @1908
1185 /* 1908 */ GIM_Try, /*On fail goto*//*Label 76*/ GIMT_Encode4(1931), // Rule ID 23 //
1186 /* 1913 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1187 /* 1916 */ // MIs[0] dst
1188 /* 1916 */ // No operand predicates
1189 /* 1916 */ // MIs[0] lhs
1190 /* 1916 */ // No operand predicates
1191 /* 1916 */ // MIs[0] Operand 2
1192 /* 1916 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1193 /* 1920 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1194 /* 1925 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[6]]
1195 /* 1925 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1196 /* 1930 */ GIR_EraseRootFromParent_Done,
1197 /* 1931 */ // Label 76: @1931
1198 /* 1931 */ GIM_Reject,
1199 /* 1932 */ // Label 23: @1932
1200 /* 1932 */ GIM_Try, /*On fail goto*//*Label 77*/ GIMT_Encode4(1972), // Rule ID 33 //
1201 /* 1937 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
1202 /* 1940 */ // MIs[0] dst
1203 /* 1940 */ // No operand predicates
1204 /* 1940 */ // MIs[0] zero
1205 /* 1940 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1206 /* 1944 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT),
1207 /* 1948 */ // MIs[1] Operand 1
1208 /* 1948 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0),
1209 /* 1959 */ // MIs[0] rhs
1210 /* 1959 */ // No operand predicates
1211 /* 1959 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1212 /* 1964 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1213 /* 1966 */ // Combiner Rule #20: binop_left_to_zero @ [__binop_left_to_zero_match_0[2]]
1214 /* 1966 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1215 /* 1971 */ GIR_EraseRootFromParent_Done,
1216 /* 1972 */ // Label 77: @1972
1217 /* 1972 */ GIM_Try, /*On fail goto*//*Label 78*/ GIMT_Encode4(1995), // Rule ID 22 //
1218 /* 1977 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1219 /* 1980 */ // MIs[0] dst
1220 /* 1980 */ // No operand predicates
1221 /* 1980 */ // MIs[0] lhs
1222 /* 1980 */ // No operand predicates
1223 /* 1980 */ // MIs[0] Operand 2
1224 /* 1980 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1225 /* 1984 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1226 /* 1989 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[5]]
1227 /* 1989 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1228 /* 1994 */ GIR_EraseRootFromParent_Done,
1229 /* 1995 */ // Label 78: @1995
1230 /* 1995 */ GIM_Reject,
1231 /* 1996 */ // Label 24: @1996
1232 /* 1996 */ GIM_Try, /*On fail goto*//*Label 79*/ GIMT_Encode4(2019), // Rule ID 26 //
1233 /* 2001 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1234 /* 2004 */ // MIs[0] dst
1235 /* 2004 */ // No operand predicates
1236 /* 2004 */ // MIs[0] lhs
1237 /* 2004 */ // No operand predicates
1238 /* 2004 */ // MIs[0] Operand 2
1239 /* 2004 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1240 /* 2008 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1241 /* 2013 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[9]]
1242 /* 2013 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1243 /* 2018 */ GIR_EraseRootFromParent_Done,
1244 /* 2019 */ // Label 79: @2019
1245 /* 2019 */ GIM_Reject,
1246 /* 2020 */ // Label 25: @2020
1247 /* 2020 */ GIM_Try, /*On fail goto*//*Label 80*/ GIMT_Encode4(2043), // Rule ID 25 //
1248 /* 2025 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1249 /* 2028 */ // MIs[0] dst
1250 /* 2028 */ // No operand predicates
1251 /* 2028 */ // MIs[0] lhs
1252 /* 2028 */ // No operand predicates
1253 /* 2028 */ // MIs[0] Operand 2
1254 /* 2028 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1255 /* 2032 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1256 /* 2037 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[8]]
1257 /* 2037 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1258 /* 2042 */ GIR_EraseRootFromParent_Done,
1259 /* 2043 */ // Label 80: @2043
1260 /* 2043 */ GIM_Reject,
1261 /* 2044 */ // Label 26: @2044
1262 /* 2044 */ GIM_Try, /*On fail goto*//*Label 81*/ GIMT_Encode4(2055), // Rule ID 16 //
1263 /* 2049 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
1264 /* 2052 */ // Combiner Rule #16: select_same_val; wip_match_opcode 'G_SELECT'
1265 /* 2052 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
1266 /* 2055 */ // Label 81: @2055
1267 /* 2055 */ GIM_Reject,
1268 /* 2056 */ // Label 27: @2056
1269 /* 2056 */ GIM_Try, /*On fail goto*//*Label 82*/ GIMT_Encode4(2079), // Rule ID 54 //
1270 /* 2061 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule34Enabled),
1271 /* 2064 */ // MIs[0] dst
1272 /* 2064 */ // No operand predicates
1273 /* 2064 */ // MIs[0] x
1274 /* 2064 */ // No operand predicates
1275 /* 2064 */ // MIs[0] y
1276 /* 2064 */ // No operand predicates
1277 /* 2064 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1),
1278 /* 2068 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1279 /* 2073 */ // Combiner Rule #34: right_identity_neg_zero_fp
1280 /* 2073 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1281 /* 2078 */ GIR_EraseRootFromParent_Done,
1282 /* 2079 */ // Label 82: @2079
1283 /* 2079 */ GIM_Try, /*On fail goto*//*Label 83*/ GIMT_Encode4(2108), // Rule ID 55 //
1284 /* 2084 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule35Enabled),
1285 /* 2087 */ GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::FmNsz),
1286 /* 2093 */ // MIs[0] dst
1287 /* 2093 */ // No operand predicates
1288 /* 2093 */ // MIs[0] x
1289 /* 2093 */ // No operand predicates
1290 /* 2093 */ // MIs[0] y
1291 /* 2093 */ // No operand predicates
1292 /* 2093 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2),
1293 /* 2097 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1294 /* 2102 */ // Combiner Rule #35: right_identity_neg_zero_fp_nsz
1295 /* 2102 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1296 /* 2107 */ GIR_EraseRootFromParent_Done,
1297 /* 2108 */ // Label 83: @2108
1298 /* 2108 */ GIM_Reject,
1299 /* 2109 */ // Label 28: @2109
1300 /* 2109 */ GIM_Try, /*On fail goto*//*Label 84*/ GIMT_Encode4(2132), // Rule ID 45 //
1301 /* 2114 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled),
1302 /* 2117 */ // MIs[0] dst
1303 /* 2117 */ // No operand predicates
1304 /* 2117 */ // MIs[0] x
1305 /* 2117 */ // No operand predicates
1306 /* 2117 */ // MIs[0] y
1307 /* 2117 */ // No operand predicates
1308 /* 2117 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
1309 /* 2121 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1310 /* 2126 */ // Combiner Rule #27: right_identity_one_fp
1311 /* 2126 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1312 /* 2131 */ GIR_EraseRootFromParent_Done,
1313 /* 2132 */ // Label 84: @2132
1314 /* 2132 */ GIM_Try, /*On fail goto*//*Label 85*/ GIMT_Encode4(2152), // Rule ID 56 //
1315 /* 2137 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule36Enabled),
1316 /* 2140 */ // MIs[0] dst
1317 /* 2140 */ // No operand predicates
1318 /* 2140 */ // MIs[0] x
1319 /* 2140 */ // No operand predicates
1320 /* 2140 */ // MIs[0] y
1321 /* 2140 */ // No operand predicates
1322 /* 2140 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3),
1323 /* 2144 */ // Combiner Rule #36: right_identity_neg_one_fp
1324 /* 2144 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG),
1325 /* 2147 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst
1326 /* 2149 */ GIR_RootToRootCopy, /*OpIdx*/1, // x
1327 /* 2151 */ GIR_EraseRootFromParent_Done,
1328 /* 2152 */ // Label 85: @2152
1329 /* 2152 */ GIM_Reject,
1330 /* 2153 */ // Label 29: @2153
1331 /* 2153 */ GIM_Try, /*On fail goto*//*Label 86*/ GIMT_Encode4(2174), // Rule ID 4 //
1332 /* 2158 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
1333 /* 2161 */ // MIs[0] dst
1334 /* 2161 */ // No operand predicates
1335 /* 2161 */ // MIs[0] src0
1336 /* 2161 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1337 /* 2165 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1338 /* 2169 */ // MIs[1] cst
1339 /* 2169 */ // No operand predicates
1340 /* 2169 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1341 /* 2171 */ // Combiner Rule #4: constant_fold_flog2
1342 /* 2171 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1343 /* 2174 */ // Label 86: @2174
1344 /* 2174 */ GIM_Reject,
1345 /* 2175 */ // Label 30: @2175
1346 /* 2175 */ GIM_Try, /*On fail goto*//*Label 87*/ GIMT_Encode4(2196), // Rule ID 1 //
1347 /* 2180 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
1348 /* 2183 */ // MIs[0] dst
1349 /* 2183 */ // No operand predicates
1350 /* 2183 */ // MIs[0] src0
1351 /* 2183 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1352 /* 2187 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1353 /* 2191 */ // MIs[1] cst
1354 /* 2191 */ // No operand predicates
1355 /* 2191 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1356 /* 2193 */ // Combiner Rule #1: constant_fold_fneg
1357 /* 2193 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1358 /* 2196 */ // Label 87: @2196
1359 /* 2196 */ GIM_Try, /*On fail goto*//*Label 88*/ GIMT_Encode4(2225), // Rule ID 43 //
1360 /* 2201 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled),
1361 /* 2204 */ // MIs[0] dst
1362 /* 2204 */ // No operand predicates
1363 /* 2204 */ // MIs[0] t
1364 /* 2204 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1365 /* 2208 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG),
1366 /* 2212 */ // MIs[1] src
1367 /* 2212 */ // No operand predicates
1368 /* 2212 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1369 /* 2217 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1370 /* 2219 */ // Combiner Rule #25: fneg_fneg_fold
1371 /* 2219 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1,
1372 /* 2224 */ GIR_EraseRootFromParent_Done,
1373 /* 2225 */ // Label 88: @2225
1374 /* 2225 */ GIM_Reject,
1375 /* 2226 */ // Label 31: @2226
1376 /* 2226 */ GIM_Try, /*On fail goto*//*Label 89*/ GIMT_Encode4(2247), // Rule ID 6 //
1377 /* 2231 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
1378 /* 2234 */ // MIs[0] dst
1379 /* 2234 */ // No operand predicates
1380 /* 2234 */ // MIs[0] src0
1381 /* 2234 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1382 /* 2238 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1383 /* 2242 */ // MIs[1] cst
1384 /* 2242 */ // No operand predicates
1385 /* 2242 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1386 /* 2244 */ // Combiner Rule #6: constant_fold_fpext
1387 /* 2244 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1388 /* 2247 */ // Label 89: @2247
1389 /* 2247 */ GIM_Reject,
1390 /* 2248 */ // Label 32: @2248
1391 /* 2248 */ GIM_Try, /*On fail goto*//*Label 90*/ GIMT_Encode4(2269), // Rule ID 5 //
1392 /* 2253 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
1393 /* 2256 */ // MIs[0] dst
1394 /* 2256 */ // No operand predicates
1395 /* 2256 */ // MIs[0] src0
1396 /* 2256 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1397 /* 2260 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1398 /* 2264 */ // MIs[1] cst
1399 /* 2264 */ // No operand predicates
1400 /* 2264 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1401 /* 2266 */ // Combiner Rule #5: constant_fold_fptrunc
1402 /* 2266 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1403 /* 2269 */ // Label 90: @2269
1404 /* 2269 */ GIM_Try, /*On fail goto*//*Label 91*/ GIMT_Encode4(2290), // Rule ID 53 //
1405 /* 2274 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule33Enabled),
1406 /* 2277 */ // MIs[0] dst
1407 /* 2277 */ // No operand predicates
1408 /* 2277 */ // MIs[0] src1
1409 /* 2277 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1410 /* 2281 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT),
1411 /* 2285 */ // MIs[1] src0
1412 /* 2285 */ // No operand predicates
1413 /* 2285 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1414 /* 2287 */ // Combiner Rule #33: fptrunc_fpext_fold
1415 /* 2287 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
1416 /* 2290 */ // Label 91: @2290
1417 /* 2290 */ GIM_Reject,
1418 /* 2291 */ // Label 33: @2291
1419 /* 2291 */ GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(2306), // Rule ID 14 //
1420 /* 2296 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
1421 /* 2299 */ // MIs[0] dst
1422 /* 2299 */ // No operand predicates
1423 /* 2299 */ // MIs[0] Operand 1
1424 /* 2299 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
1425 /* 2303 */ // Combiner Rule #14: itof_const_zero_fold_si
1426 /* 2303 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
1427 /* 2306 */ // Label 92: @2306
1428 /* 2306 */ GIM_Reject,
1429 /* 2307 */ // Label 34: @2307
1430 /* 2307 */ GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(2322), // Rule ID 15 //
1431 /* 2312 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
1432 /* 2315 */ // MIs[0] dst
1433 /* 2315 */ // No operand predicates
1434 /* 2315 */ // MIs[0] Operand 1
1435 /* 2315 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/1, 0,
1436 /* 2319 */ // Combiner Rule #15: itof_const_zero_fold_ui
1437 /* 2319 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
1438 /* 2322 */ // Label 93: @2322
1439 /* 2322 */ GIM_Reject,
1440 /* 2323 */ // Label 35: @2323
1441 /* 2323 */ GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(2344), // Rule ID 2 //
1442 /* 2328 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
1443 /* 2331 */ // MIs[0] dst
1444 /* 2331 */ // No operand predicates
1445 /* 2331 */ // MIs[0] src0
1446 /* 2331 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1447 /* 2335 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1448 /* 2339 */ // MIs[1] cst
1449 /* 2339 */ // No operand predicates
1450 /* 2339 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1451 /* 2341 */ // Combiner Rule #2: constant_fold_fabs
1452 /* 2341 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1453 /* 2344 */ // Label 94: @2344
1454 /* 2344 */ GIM_Reject,
1455 /* 2345 */ // Label 36: @2345
1456 /* 2345 */ GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(2368), // Rule ID 24 //
1457 /* 2350 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
1458 /* 2353 */ // MIs[0] dst
1459 /* 2353 */ // No operand predicates
1460 /* 2353 */ // MIs[0] lhs
1461 /* 2353 */ // No operand predicates
1462 /* 2353 */ // MIs[0] Operand 2
1463 /* 2353 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0,
1464 /* 2357 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1465 /* 2362 */ // Combiner Rule #17: right_identity_zero @ [__right_identity_zero_match_0[7]]
1466 /* 2362 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1,
1467 /* 2367 */ GIR_EraseRootFromParent_Done,
1468 /* 2368 */ // Label 95: @2368
1469 /* 2368 */ GIM_Reject,
1470 /* 2369 */ // Label 37: @2369
1471 /* 2369 */ GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(2390), // Rule ID 7 //
1472 /* 2374 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
1473 /* 2377 */ // MIs[0] dst
1474 /* 2377 */ // No operand predicates
1475 /* 2377 */ // MIs[0] src0
1476 /* 2377 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1477 /* 2381 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1478 /* 2385 */ // MIs[1] cst
1479 /* 2385 */ // No operand predicates
1480 /* 2385 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1481 /* 2387 */ // Combiner Rule #7: constant_fold_fceil
1482 /* 2387 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1483 /* 2390 */ // Label 96: @2390
1484 /* 2390 */ GIM_Reject,
1485 /* 2391 */ // Label 38: @2391
1486 /* 2391 */ GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(2412), // Rule ID 3 //
1487 /* 2396 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
1488 /* 2399 */ // MIs[0] dst
1489 /* 2399 */ // No operand predicates
1490 /* 2399 */ // MIs[0] src0
1491 /* 2399 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1492 /* 2403 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1493 /* 2407 */ // MIs[1] cst
1494 /* 2407 */ // No operand predicates
1495 /* 2407 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1496 /* 2409 */ // Combiner Rule #3: constant_fold_fsqrt
1497 /* 2409 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1498 /* 2412 */ // Label 97: @2412
1499 /* 2412 */ GIM_Reject,
1500 /* 2413 */ // Label 39: @2413
1501 /* 2413 */ GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(2434), // Rule ID 8 //
1502 /* 2418 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
1503 /* 2421 */ // MIs[0] dst
1504 /* 2421 */ // No operand predicates
1505 /* 2421 */ // MIs[0] src0
1506 /* 2421 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1507 /* 2425 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1508 /* 2429 */ // MIs[1] cst
1509 /* 2429 */ // No operand predicates
1510 /* 2429 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1511 /* 2431 */ // Combiner Rule #8: constant_fold_ffloor
1512 /* 2431 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1513 /* 2434 */ // Label 98: @2434
1514 /* 2434 */ GIM_Reject,
1515 /* 2435 */ // Label 40: @2435
1516 /* 2435 */ GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(2456), // Rule ID 12 //
1517 /* 2440 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
1518 /* 2443 */ // MIs[0] dst
1519 /* 2443 */ // No operand predicates
1520 /* 2443 */ // MIs[0] src0
1521 /* 2443 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1522 /* 2447 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1523 /* 2451 */ // MIs[1] cst
1524 /* 2451 */ // No operand predicates
1525 /* 2451 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1526 /* 2453 */ // Combiner Rule #12: constant_fold_frint
1527 /* 2453 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1528 /* 2456 */ // Label 99: @2456
1529 /* 2456 */ GIM_Reject,
1530 /* 2457 */ // Label 41: @2457
1531 /* 2457 */ GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(2478), // Rule ID 13 //
1532 /* 2462 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
1533 /* 2465 */ // MIs[0] dst
1534 /* 2465 */ // No operand predicates
1535 /* 2465 */ // MIs[0] src0
1536 /* 2465 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1]
1537 /* 2469 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCONSTANT),
1538 /* 2473 */ // MIs[1] cst
1539 /* 2473 */ // No operand predicates
1540 /* 2473 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
1541 /* 2475 */ // Combiner Rule #13: constant_fold_fnearbyint
1542 /* 2475 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
1543 /* 2478 */ // Label 100: @2478
1544 /* 2478 */ GIM_Reject,
1545 /* 2479 */ // Label 42: @2479
1546 /* 2479 */ GIM_Reject,
1547 /* 2480 */ }; // Size: 2480 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