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