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