1/*===- TableGen'erated file -------------------------------------*- C++ -*-===*\
2|* *|
3|* AArch64PostLegalizerLoweringImpl 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 AArch64PostLegalizerLoweringImplRuleConfig {
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 3: // 6 strings to match.
42 switch (RuleIdentifier[0]) {
43 default: break;
44 case 'd': // 1 string to match.
45 if (memcmp(RuleIdentifier.data()+1, "up", 2) != 0)
46 break;
47 return 0; // "dup"
48 case 'e': // 1 string to match.
49 if (memcmp(RuleIdentifier.data()+1, "xt", 2) != 0)
50 break;
51 return 3; // "ext"
52 case 'r': // 1 string to match.
53 if (memcmp(RuleIdentifier.data()+1, "ev", 2) != 0)
54 break;
55 return 2; // "rev"
56 case 't': // 1 string to match.
57 if (memcmp(RuleIdentifier.data()+1, "rn", 2) != 0)
58 break;
59 return 6; // "trn"
60 case 'u': // 1 string to match.
61 if (memcmp(RuleIdentifier.data()+1, "zp", 2) != 0)
62 break;
63 return 5; // "uzp"
64 case 'z': // 1 string to match.
65 if (memcmp(RuleIdentifier.data()+1, "ip", 2) != 0)
66 break;
67 return 4; // "zip"
68 }
69 break;
70 case 7: // 1 string to match.
71 if (memcmp(RuleIdentifier.data()+0, "fullrev", 7) != 0)
72 break;
73 return 7; // "fullrev"
74 case 11: // 1 string to match.
75 if (memcmp(RuleIdentifier.data()+0, "shuf_to_ins", 11) != 0)
76 break;
77 return 8; // "shuf_to_ins"
78 case 12: // 1 string to match.
79 if (memcmp(RuleIdentifier.data()+0, "form_duplane", 12) != 0)
80 break;
81 return 1; // "form_duplane"
82 case 14: // 1 string to match.
83 if (memcmp(RuleIdentifier.data()+0, "lower_mulv2s64", 14) != 0)
84 break;
85 return 19; // "lower_mulv2s64"
86 case 15: // 3 strings to match.
87 switch (RuleIdentifier[0]) {
88 default: break;
89 case 'a': // 1 string to match.
90 if (memcmp(RuleIdentifier.data()+1, "djust_icmp_imm", 14) != 0)
91 break;
92 return 10; // "adjust_icmp_imm"
93 case 'f': // 1 string to match.
94 if (memcmp(RuleIdentifier.data()+1, "orm_truncstore", 14) != 0)
95 break;
96 return 15; // "form_truncstore"
97 case 'v': // 1 string to match.
98 if (memcmp(RuleIdentifier.data()+1, "ashr_vlshr_imm", 14) != 0)
99 break;
100 return 9; // "vashr_vlshr_imm"
101 }
102 break;
103 case 16: // 1 string to match.
104 if (memcmp(RuleIdentifier.data()+0, "unmerge_duplane8", 16) != 0)
105 break;
106 return 22; // "unmerge_duplane8"
107 case 17: // 3 strings to match.
108 switch (RuleIdentifier[0]) {
109 default: break;
110 case 'l': // 1 string to match.
111 if (memcmp(RuleIdentifier.data()+1, "ower_vector_fcmp", 16) != 0)
112 break;
113 return 14; // "lower_vector_fcmp"
114 case 'u': // 2 strings to match.
115 if (memcmp(RuleIdentifier.data()+1, "nmerge_duplane", 14) != 0)
116 break;
117 switch (RuleIdentifier[15]) {
118 default: break;
119 case '1': // 1 string to match.
120 if (RuleIdentifier[16] != '6')
121 break;
122 return 23; // "unmerge_duplane16"
123 case '3': // 1 string to match.
124 if (RuleIdentifier[16] != '2')
125 break;
126 return 24; // "unmerge_duplane32"
127 }
128 break;
129 }
130 break;
131 case 18: // 2 strings to match.
132 switch (RuleIdentifier[0]) {
133 default: break;
134 case 'i': // 1 string to match.
135 if (memcmp(RuleIdentifier.data()+1, "nsertelt_nonconst", 17) != 0)
136 break;
137 return 21; // "insertelt_nonconst"
138 case 's': // 1 string to match.
139 if (memcmp(RuleIdentifier.data()+1, "wap_icmp_operands", 17) != 0)
140 break;
141 return 11; // "swap_icmp_operands"
142 }
143 break;
144 case 19: // 1 string to match.
145 if (memcmp(RuleIdentifier.data()+0, "build_vector_to_dup", 19) != 0)
146 break;
147 return 12; // "build_vector_to_dup"
148 case 21: // 1 string to match.
149 if (memcmp(RuleIdentifier.data()+0, "fconstant_to_constant", 21) != 0)
150 break;
151 return 16; // "fconstant_to_constant"
152 case 22: // 1 string to match.
153 if (memcmp(RuleIdentifier.data()+0, "unmerge_ext_to_unmerge", 22) != 0)
154 break;
155 return 18; // "unmerge_ext_to_unmerge"
156 case 23: // 1 string to match.
157 if (memcmp(RuleIdentifier.data()+0, "vector_unmerge_lowering", 23) != 0)
158 break;
159 return 20; // "vector_unmerge_lowering"
160 case 26: // 1 string to match.
161 if (memcmp(RuleIdentifier.data()+0, "vector_sext_inreg_to_shift", 26) != 0)
162 break;
163 return 17; // "vector_sext_inreg_to_shift"
164 case 29: // 1 string to match.
165 if (memcmp(RuleIdentifier.data()+0, "build_vector_to_vector_insert", 29) != 0)
166 break;
167 return 13; // "build_vector_to_vector_insert"
168 }
169#endif // ifndef NDEBUG
170
171 return std::nullopt;
172}
173static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
174 std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
175 if (!RangePair.second.empty()) {
176 const auto First = getRuleIdxForIdentifier(RangePair.first);
177 const auto Last = getRuleIdxForIdentifier(RangePair.second);
178 if (!First || !Last)
179 return std::nullopt;
180 if (First >= Last)
181 report_fatal_error("Beginning of range should be before end of range");
182 return {{*First, *Last + 1}};
183 }
184 if (RangePair.first == "*") {
185 return {{0, 25}};
186 }
187 const auto I = getRuleIdxForIdentifier(RangePair.first);
188 if (!I)
189 return std::nullopt;
190 return {{*I, *I + 1}};
191}
192
193bool AArch64PostLegalizerLoweringImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
194 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
195 if (!MaybeRange)
196 return false;
197 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
198 DisabledRules.reset(I);
199 return true;
200}
201
202bool AArch64PostLegalizerLoweringImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
203 auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
204 if (!MaybeRange)
205 return false;
206 for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
207 DisabledRules.set(I);
208 return true;
209}
210
211static std::vector<std::string> AArch64PostLegalizerLoweringOption;
212static cl::list<std::string> AArch64PostLegalizerLoweringDisableOption(
213 "aarch64postlegalizerlowering-disable-rule",
214 cl::desc("Disable one or more combiner rules temporarily in the AArch64PostLegalizerLowering pass"),
215 cl::CommaSeparated,
216 cl::Hidden,
217 cl::cat(GICombinerOptionCategory),
218 cl::callback([](const std::string &Str) {
219 AArch64PostLegalizerLoweringOption.push_back(Str);
220 }));
221static cl::list<std::string> AArch64PostLegalizerLoweringOnlyEnableOption(
222 "aarch64postlegalizerlowering-only-enable-rule",
223 cl::desc("Disable all rules in the AArch64PostLegalizerLowering pass then re-enable the specified ones"),
224 cl::Hidden,
225 cl::cat(GICombinerOptionCategory),
226 cl::callback([](const std::string &CommaSeparatedArg) {
227 StringRef Str = CommaSeparatedArg;
228 AArch64PostLegalizerLoweringOption.push_back("*");
229 do {
230 auto X = Str.split(",");
231 AArch64PostLegalizerLoweringOption.push_back(("!" + X.first).str());
232 Str = X.second;
233 } while (!Str.empty());
234 }));
235
236
237bool AArch64PostLegalizerLoweringImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
238 return !DisabledRules.test(RuleID);
239}
240bool AArch64PostLegalizerLoweringImplRuleConfig::parseCommandLineOption() {
241 for (StringRef Identifier : AArch64PostLegalizerLoweringOption) {
242 bool Enabled = Identifier.consume_front("!");
243 if (Enabled && !setRuleEnabled(Identifier))
244 return false;
245 if (!Enabled && !setRuleDisabled(Identifier))
246 return false;
247 }
248 return true;
249}
250
251
252#endif // GET_GICOMBINER_TYPES
253
254#ifdef GET_GICOMBINER_TYPES
255
256const unsigned MAX_SUBTARGET_PREDICATES = 0;
257using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
258
259#endif // GET_GICOMBINER_TYPES
260
261#ifdef GET_GICOMBINER_CLASS_MEMBERS
262
263PredicateBitset AvailableModuleFeatures;
264mutable PredicateBitset AvailableFunctionFeatures;
265PredicateBitset getAvailableFeatures() const {
266 return AvailableModuleFeatures | AvailableFunctionFeatures;
267}
268PredicateBitset
269computeAvailableModuleFeatures(const AArch64Subtarget *Subtarget) const;
270PredicateBitset
271computeAvailableFunctionFeatures(const AArch64Subtarget *Subtarget,
272 const MachineFunction *MF) const;
273void setupGeneratedPerFunctionState(MachineFunction &MF) override;
274
275#endif // GET_GICOMBINER_CLASS_MEMBERS
276
277#ifdef GET_GICOMBINER_CLASS_MEMBERS
278
279 mutable MatcherState State;
280 typedef ComplexRendererFns(AArch64PostLegalizerLoweringImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
281 typedef void(AArch64PostLegalizerLoweringImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
282 const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
283 static AArch64PostLegalizerLoweringImpl::ComplexMatcherMemFn ComplexPredicateFns[];
284 static AArch64PostLegalizerLoweringImpl::CustomRendererFn CustomRenderers[];
285 bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
286 bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
287 bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
288 const uint8_t *getMatchTable() const override;
289 bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
290 bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override;
291 bool testSimplePredicate(unsigned PredicateID) const override;
292 bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
293
294#endif // GET_GICOMBINER_CLASS_MEMBERS
295
296#ifdef GET_GICOMBINER_IMPL
297
298// LLT Objects.
299enum {
300 GILLT_s1,
301};
302const static size_t NumTypeObjects = 1;
303const static LLT TypeObjects[] = {
304 LLT::scalar(1),
305};
306
307// Bits for subtarget features that participate in instruction matching.
308enum SubtargetFeatureBits : uint8_t {
309};
310
311PredicateBitset AArch64PostLegalizerLoweringImpl::
312computeAvailableModuleFeatures(const AArch64Subtarget *Subtarget) const {
313 PredicateBitset Features{};
314 return Features;
315}
316
317void AArch64PostLegalizerLoweringImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
318 AvailableFunctionFeatures = computeAvailableFunctionFeatures((const AArch64Subtarget *)&MF.getSubtarget(), &MF);
319}
320PredicateBitset AArch64PostLegalizerLoweringImpl::
321computeAvailableFunctionFeatures(const AArch64Subtarget *Subtarget, const MachineFunction *MF) const {
322 PredicateBitset Features{};
323 return Features;
324}
325
326// Feature bitsets.
327enum {
328 GIFBS_Invalid,
329};
330constexpr static PredicateBitset FeatureBitsets[] {
331 {}, // GIFBS_Invalid
332};
333
334// ComplexPattern predicates.
335enum {
336 GICP_Invalid,
337};
338// See constructor for table contents
339
340AArch64PostLegalizerLoweringImpl::ComplexMatcherMemFn
341AArch64PostLegalizerLoweringImpl::ComplexPredicateFns[] = {
342 nullptr, // GICP_Invalid
343};
344
345enum {
346 GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1,
347};
348bool AArch64PostLegalizerLoweringImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
349 switch (PredicateID) {
350 case GICXXPred_MI_Predicate_GICombiner0: {
351 return MRI.getType(State.MIs[0]->getOperand(0).getReg()).getSizeInBits() == 64;
352 }
353 }
354 llvm_unreachable("Unknown predicate");
355 return false;
356}
357bool AArch64PostLegalizerLoweringImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const {
358 llvm_unreachable("Unknown predicate");
359 return false;
360}
361bool AArch64PostLegalizerLoweringImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
362 llvm_unreachable("Unknown predicate");
363 return false;
364}
365bool AArch64PostLegalizerLoweringImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
366 llvm_unreachable("Unknown predicate");
367 return false;
368}
369bool AArch64PostLegalizerLoweringImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
370 llvm_unreachable("Unknown predicate");
371 return false;
372}
373enum {
374 GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
375 GICXXPred_Simple_IsRule1Enabled,
376 GICXXPred_Simple_IsRule2Enabled,
377 GICXXPred_Simple_IsRule3Enabled,
378 GICXXPred_Simple_IsRule4Enabled,
379 GICXXPred_Simple_IsRule5Enabled,
380 GICXXPred_Simple_IsRule6Enabled,
381 GICXXPred_Simple_IsRule7Enabled,
382 GICXXPred_Simple_IsRule8Enabled,
383 GICXXPred_Simple_IsRule9Enabled,
384 GICXXPred_Simple_IsRule10Enabled,
385 GICXXPred_Simple_IsRule11Enabled,
386 GICXXPred_Simple_IsRule12Enabled,
387 GICXXPred_Simple_IsRule13Enabled,
388 GICXXPred_Simple_IsRule14Enabled,
389 GICXXPred_Simple_IsRule15Enabled,
390 GICXXPred_Simple_IsRule16Enabled,
391 GICXXPred_Simple_IsRule17Enabled,
392 GICXXPred_Simple_IsRule18Enabled,
393 GICXXPred_Simple_IsRule19Enabled,
394 GICXXPred_Simple_IsRule20Enabled,
395 GICXXPred_Simple_IsRule21Enabled,
396 GICXXPred_Simple_IsRule22Enabled,
397 GICXXPred_Simple_IsRule23Enabled,
398 GICXXPred_Simple_IsRule24Enabled,
399};
400
401bool AArch64PostLegalizerLoweringImpl::testSimplePredicate(unsigned Predicate) const {
402 return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
403}
404// Custom renderers.
405enum {
406 GICR_Invalid,
407};
408AArch64PostLegalizerLoweringImpl::CustomRendererFn
409AArch64PostLegalizerLoweringImpl::CustomRenderers[] = {
410 nullptr, // GICR_Invalid
411};
412
413bool AArch64PostLegalizerLoweringImpl::tryCombineAll(MachineInstr &I) const {
414 const TargetSubtargetInfo &ST = MF.getSubtarget();
415 const PredicateBitset AvailableFeatures = getAvailableFeatures();
416 B.setInstrAndDebugLoc(I);
417 State.MIs.clear();
418 State.MIs.push_back(&I);
419 if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, /*CoverageInfo*/ nullptr)) {
420 return true;
421 }
422
423 return false;
424}
425
426enum {
427 GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
428 GICXXCustomAction_GICombiner1,
429 GICXXCustomAction_GICombiner2,
430 GICXXCustomAction_GICombiner3,
431 GICXXCustomAction_GICombiner4,
432 GICXXCustomAction_GICombiner5,
433 GICXXCustomAction_GICombiner6,
434 GICXXCustomAction_GICombiner7,
435 GICXXCustomAction_GICombiner8,
436 GICXXCustomAction_GICombiner9,
437 GICXXCustomAction_GICombiner10,
438 GICXXCustomAction_GICombiner11,
439 GICXXCustomAction_GICombiner12,
440 GICXXCustomAction_GICombiner13,
441 GICXXCustomAction_GICombiner14,
442 GICXXCustomAction_GICombiner15,
443 GICXXCustomAction_GICombiner16,
444 GICXXCustomAction_GICombiner17,
445 GICXXCustomAction_GICombiner18,
446 GICXXCustomAction_GICombiner19,
447 GICXXCustomAction_GICombiner20,
448 GICXXCustomAction_GICombiner21,
449};
450bool AArch64PostLegalizerLoweringImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
451 Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
452 switch(ApplyID) {
453 case GICXXCustomAction_GICombiner0:{
454 ShuffleVectorPseudo GIMatchData_matchinfo;
455 // Match Patterns
456 if(![&](){return matchDup(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
457 return false;
458 }
459 // Apply Patterns
460 applyShuffleVectorPseudo(*State.MIs[0], GIMatchData_matchinfo);
461 return true;
462 }
463 case GICXXCustomAction_GICombiner1:{
464 std::pair<unsigned, int> GIMatchData_matchinfo;
465 // Match Patterns
466 if(![&](){return matchDupLane(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
467 return false;
468 }
469 // Apply Patterns
470 applyDupLane(*State.MIs[0], MRI, B, GIMatchData_matchinfo);
471 return true;
472 }
473 case GICXXCustomAction_GICombiner2:{
474 ShuffleVectorPseudo GIMatchData_matchinfo;
475 // Match Patterns
476 if(![&](){return matchREV(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
477 return false;
478 }
479 // Apply Patterns
480 applyShuffleVectorPseudo(*State.MIs[0], GIMatchData_matchinfo);
481 return true;
482 }
483 case GICXXCustomAction_GICombiner3:{
484 ShuffleVectorPseudo GIMatchData_matchinfo;
485 // Match Patterns
486 if(![&](){return matchEXT(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
487 return false;
488 }
489 // Apply Patterns
490 applyEXT(*State.MIs[0], GIMatchData_matchinfo);
491 return true;
492 }
493 case GICXXCustomAction_GICombiner4:{
494 ShuffleVectorPseudo GIMatchData_matchinfo;
495 // Match Patterns
496 if(![&](){return matchZip(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
497 return false;
498 }
499 // Apply Patterns
500 applyShuffleVectorPseudo(*State.MIs[0], GIMatchData_matchinfo);
501 return true;
502 }
503 case GICXXCustomAction_GICombiner5:{
504 ShuffleVectorPseudo GIMatchData_matchinfo;
505 // Match Patterns
506 if(![&](){return matchUZP(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
507 return false;
508 }
509 // Apply Patterns
510 applyShuffleVectorPseudo(*State.MIs[0], GIMatchData_matchinfo);
511 return true;
512 }
513 case GICXXCustomAction_GICombiner6:{
514 ShuffleVectorPseudo GIMatchData_matchinfo;
515 // Match Patterns
516 if(![&](){return matchTRN(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
517 return false;
518 }
519 // Apply Patterns
520 applyShuffleVectorPseudo(*State.MIs[0], GIMatchData_matchinfo);
521 return true;
522 }
523 case GICXXCustomAction_GICombiner7:{
524 ShuffleVectorPseudo GIMatchData_matchinfo;
525 // Match Patterns
526 if(![&](){return ShuffleVectorInst::isReverseMask(State.MIs[0]->getOperand(3).getShuffleMask(),
527 State.MIs[0]->getOperand(3).getShuffleMask().size());}()) {
528 return false;
529 }
530 // Apply Patterns
531 applyFullRev(*State.MIs[0], MRI);
532 return true;
533 }
534 case GICXXCustomAction_GICombiner8:{
535 std::tuple<Register, int, Register, int> GIMatchData_matchinfo;
536 // Match Patterns
537 if(![&](){return matchINS(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
538 return false;
539 }
540 // Apply Patterns
541 applyINS(*State.MIs[0], MRI, B, GIMatchData_matchinfo);
542 return true;
543 }
544 case GICXXCustomAction_GICombiner9:{
545 int64_t GIMatchData_matchinfo;
546 // Match Patterns
547 if(![&](){return matchVAshrLshrImm(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
548 return false;
549 }
550 // Apply Patterns
551 applyVAshrLshrImm(*State.MIs[0], MRI, GIMatchData_matchinfo);
552 return true;
553 }
554 case GICXXCustomAction_GICombiner10:{
555 std::pair<uint64_t, CmpInst::Predicate> GIMatchData_matchinfo;
556 // Match Patterns
557 if(![&](){return matchAdjustICmpImmAndPred(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
558 return false;
559 }
560 // Apply Patterns
561 applyAdjustICmpImmAndPred(*State.MIs[0], GIMatchData_matchinfo, B, Observer);
562 return true;
563 }
564 case GICXXCustomAction_GICombiner11:{
565 // Match Patterns
566 if(![&](){return trySwapICmpOperands(*State.MIs[0], MRI);}()) {
567 return false;
568 }
569 // Apply Patterns
570 applySwapICmpOperands(*State.MIs[0], Observer);
571 return true;
572 }
573 case GICXXCustomAction_GICombiner12:{
574 // Match Patterns
575 if(![&](){return matchBuildVectorToDup(*State.MIs[0], MRI);}()) {
576 return false;
577 }
578 // Apply Patterns
579 applyBuildVectorToDup(*State.MIs[0], MRI, B);
580 return true;
581 }
582 case GICXXCustomAction_GICombiner13:{
583 // Match Patterns
584 if(![&](){return matchLowerBuildToInsertVecElt(*State.MIs[0], MRI);}()) {
585 return false;
586 }
587 // Apply Patterns
588 applyLowerBuildToInsertVecElt(*State.MIs[0], MRI, B);
589 return true;
590 }
591 case GICXXCustomAction_GICombiner14:{
592 // Match Patterns
593 if(![&](){return matchLowerVectorFCMP(*State.MIs[0], MRI, B);}()) {
594 return false;
595 }
596 // Apply Patterns
597 applyLowerVectorFCMP(*State.MIs[0], MRI, B);
598 return true;
599 }
600 case GICXXCustomAction_GICombiner15:{
601 Register GIMatchData_matchinfo;
602 // Match Patterns
603 if(![&](){return matchFormTruncstore(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
604 return false;
605 }
606 // Apply Patterns
607 applyFormTruncstore(*State.MIs[0], MRI, B, Observer, GIMatchData_matchinfo);
608 return true;
609 }
610 case GICXXCustomAction_GICombiner16:{
611 // Match Patterns
612 if(![&](){return matchFConstantToConstant(*State.MIs[0], MRI);}()) {
613 return false;
614 }
615 // Apply Patterns
616 applyFConstantToConstant(*State.MIs[0]);
617 return true;
618 }
619 case GICXXCustomAction_GICombiner17:{
620 // Match Patterns
621 if(![&](){return matchVectorSextInReg(*State.MIs[0], MRI);}()) {
622 return false;
623 }
624 // Apply Patterns
625 applyVectorSextInReg(*State.MIs[0], MRI, B, Observer);
626 return true;
627 }
628 case GICXXCustomAction_GICombiner18:{
629 Register GIMatchData_matchinfo;
630 // Match Patterns
631 if(![&](){return matchUnmergeExtToUnmerge(*State.MIs[0], MRI, GIMatchData_matchinfo);}()) {
632 return false;
633 }
634 // Apply Patterns
635 applyUnmergeExtToUnmerge(*State.MIs[0], MRI, B, Observer, GIMatchData_matchinfo);
636 return true;
637 }
638 case GICXXCustomAction_GICombiner19:{
639 // Match Patterns
640 if(![&](){return matchMulv2s64(*State.MIs[0], MRI);}()) {
641 return false;
642 }
643 // Apply Patterns
644 applyMulv2s64(*State.MIs[0], MRI, B, Observer);
645 return true;
646 }
647 case GICXXCustomAction_GICombiner20:{
648 // Match Patterns
649 if(![&](){return matchScalarizeVectorUnmerge(*State.MIs[0], MRI);}()) {
650 return false;
651 }
652 // Apply Patterns
653 applyScalarizeVectorUnmerge(*State.MIs[0], MRI, B);
654 return true;
655 }
656 case GICXXCustomAction_GICombiner21:{
657 ShuffleVectorPseudo GIMatchData_matchinfo;
658 // Match Patterns
659 if(![&](){return matchNonConstInsert(*State.MIs[0], MRI);}()) {
660 return false;
661 }
662 // Apply Patterns
663 applyNonConstInsert(*State.MIs[0], MRI, B);
664 return true;
665 }
666 }
667 llvm_unreachable("Unknown Apply Action");
668}
669#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
670#define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8)
671#define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24)
672#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)
673#else
674#define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val)
675#define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val)
676#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)
677#endif
678const uint8_t *AArch64PostLegalizerLoweringImpl::getMatchTable() const {
679 constexpr static uint8_t MatchTable0[] = {
680 /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(57), GIMT_Encode2(253), /*)*//*default:*//*Label 12*/ GIMT_Encode4(1211),
681 /* 10 */ /*TargetOpcode::G_MUL*//*Label 0*/ GIMT_Encode4(794), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
682 /* 102 */ /*TargetOpcode::G_UNMERGE_VALUES*//*Label 1*/ GIMT_Encode4(806), GIMT_Encode4(0), GIMT_Encode4(0),
683 /* 114 */ /*TargetOpcode::G_BUILD_VECTOR*//*Label 2*/ GIMT_Encode4(968), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
684 /* 202 */ /*TargetOpcode::G_STORE*//*Label 3*/ GIMT_Encode4(994), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 362 */ /*TargetOpcode::G_FCONSTANT*//*Label 4*/ GIMT_Encode4(1006), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
686 /* 378 */ /*TargetOpcode::G_SEXT_INREG*//*Label 5*/ GIMT_Encode4(1018), GIMT_Encode4(0), GIMT_Encode4(0),
687 /* 390 */ /*TargetOpcode::G_LSHR*//*Label 6*/ GIMT_Encode4(1030),
688 /* 394 */ /*TargetOpcode::G_ASHR*//*Label 7*/ GIMT_Encode4(1042), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
689 /* 414 */ /*TargetOpcode::G_ICMP*//*Label 8*/ GIMT_Encode4(1054),
690 /* 418 */ /*TargetOpcode::G_FCMP*//*Label 9*/ GIMT_Encode4(1077), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), 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 /* 782 */ /*TargetOpcode::G_INSERT_VECTOR_ELT*//*Label 10*/ GIMT_Encode4(1089), GIMT_Encode4(0),
692 /* 790 */ /*TargetOpcode::G_SHUFFLE_VECTOR*//*Label 11*/ GIMT_Encode4(1101),
693 /* 794 */ // Label 0: @794
694 /* 794 */ GIM_Try, /*On fail goto*//*Label 13*/ GIMT_Encode4(805), // Rule ID 20 //
695 /* 799 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled),
696 /* 802 */ // MIs[0] dst
697 /* 802 */ // No operand predicates
698 /* 802 */ // MIs[0] src1
699 /* 802 */ // No operand predicates
700 /* 802 */ // MIs[0] src2
701 /* 802 */ // No operand predicates
702 /* 802 */ // Combiner Rule #19: lower_mulv2s64
703 /* 802 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner19),
704 /* 805 */ // Label 13: @805
705 /* 805 */ GIM_Reject,
706 /* 806 */ // Label 1: @806
707 /* 806 */ GIM_Try, /*On fail goto*//*Label 14*/ GIMT_Encode4(817), // Rule ID 19 //
708 /* 811 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled),
709 /* 814 */ // Combiner Rule #18: unmerge_ext_to_unmerge; wip_match_opcode 'G_UNMERGE_VALUES'
710 /* 814 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner18),
711 /* 817 */ // Label 14: @817
712 /* 817 */ GIM_Try, /*On fail goto*//*Label 15*/ GIMT_Encode4(828), // Rule ID 21 //
713 /* 822 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled),
714 /* 825 */ // Combiner Rule #20: vector_unmerge_lowering; wip_match_opcode 'G_UNMERGE_VALUES'
715 /* 825 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner20),
716 /* 828 */ // Label 15: @828
717 /* 828 */ GIM_Try, /*On fail goto*//*Label 16*/ GIMT_Encode4(967),
718 /* 833 */ GIM_CheckNumOperands, /*MI*/0, /*Expected*/3,
719 /* 836 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0),
720 /* 840 */ GIM_Try, /*On fail goto*//*Label 17*/ GIMT_Encode4(882), // Rule ID 24 //
721 /* 845 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled),
722 /* 848 */ // MIs[0] d1
723 /* 848 */ // No operand predicates
724 /* 848 */ // MIs[0] d2
725 /* 848 */ // No operand predicates
726 /* 848 */ // MIs[0] a
727 /* 848 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
728 /* 852 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(AArch64::G_DUPLANE16),
729 /* 856 */ // MIs[1] src
730 /* 856 */ // No operand predicates
731 /* 856 */ // MIs[1] c
732 /* 856 */ // No operand predicates
733 /* 856 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/1, /*NewInsnId*/0, /*NewOpIdx*/0,
734 /* 861 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
735 /* 863 */ // Combiner Rule #23: unmerge_duplane16
736 /* 863 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(AArch64::G_DUPLANE16),
737 /* 866 */ GIR_RootToRootCopy, /*OpIdx*/0, // d1
738 /* 868 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src
739 /* 872 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // c
740 /* 876 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/1, /*NewInsnId*/0, /*NewOpIdx*/0,
741 /* 881 */ GIR_EraseRootFromParent_Done,
742 /* 882 */ // Label 17: @882
743 /* 882 */ GIM_Try, /*On fail goto*//*Label 18*/ GIMT_Encode4(924), // Rule ID 25 //
744 /* 887 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled),
745 /* 890 */ // MIs[0] d1
746 /* 890 */ // No operand predicates
747 /* 890 */ // MIs[0] d2
748 /* 890 */ // No operand predicates
749 /* 890 */ // MIs[0] a
750 /* 890 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
751 /* 894 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(AArch64::G_DUPLANE32),
752 /* 898 */ // MIs[1] src
753 /* 898 */ // No operand predicates
754 /* 898 */ // MIs[1] c
755 /* 898 */ // No operand predicates
756 /* 898 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/1, /*NewInsnId*/0, /*NewOpIdx*/0,
757 /* 903 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
758 /* 905 */ // Combiner Rule #24: unmerge_duplane32
759 /* 905 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(AArch64::G_DUPLANE32),
760 /* 908 */ GIR_RootToRootCopy, /*OpIdx*/0, // d1
761 /* 910 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src
762 /* 914 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // c
763 /* 918 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/1, /*NewInsnId*/0, /*NewOpIdx*/0,
764 /* 923 */ GIR_EraseRootFromParent_Done,
765 /* 924 */ // Label 18: @924
766 /* 924 */ GIM_Try, /*On fail goto*//*Label 19*/ GIMT_Encode4(966), // Rule ID 23 //
767 /* 929 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled),
768 /* 932 */ // MIs[0] d1
769 /* 932 */ // No operand predicates
770 /* 932 */ // MIs[0] d2
771 /* 932 */ // No operand predicates
772 /* 932 */ // MIs[0] a
773 /* 932 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
774 /* 936 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(AArch64::G_DUPLANE8),
775 /* 940 */ // MIs[1] src
776 /* 940 */ // No operand predicates
777 /* 940 */ // MIs[1] c
778 /* 940 */ // No operand predicates
779 /* 940 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/1, /*NewInsnId*/0, /*NewOpIdx*/0,
780 /* 945 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
781 /* 947 */ // Combiner Rule #22: unmerge_duplane8
782 /* 947 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(AArch64::G_DUPLANE8),
783 /* 950 */ GIR_RootToRootCopy, /*OpIdx*/0, // d1
784 /* 952 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/1, // src
785 /* 956 */ GIR_Copy, /*NewInsnID*/0, /*OldInsnID*/1, /*OpIdx*/2, // c
786 /* 960 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/1, /*NewInsnId*/0, /*NewOpIdx*/0,
787 /* 965 */ GIR_EraseRootFromParent_Done,
788 /* 966 */ // Label 19: @966
789 /* 966 */ GIM_Reject,
790 /* 967 */ // Label 16: @967
791 /* 967 */ GIM_Reject,
792 /* 968 */ // Label 2: @968
793 /* 968 */ GIM_Try, /*On fail goto*//*Label 20*/ GIMT_Encode4(979), // Rule ID 13 //
794 /* 973 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled),
795 /* 976 */ // Combiner Rule #12: build_vector_to_dup; wip_match_opcode 'G_BUILD_VECTOR'
796 /* 976 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12),
797 /* 979 */ // Label 20: @979
798 /* 979 */ GIM_Try, /*On fail goto*//*Label 21*/ GIMT_Encode4(993), // Rule ID 14 //
799 /* 984 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled),
800 /* 987 */ GIM_CheckNumOperandsGE, /*MI*/0, /*Expected*/2,
801 /* 990 */ // MIs[0] dst
802 /* 990 */ // No operand predicates
803 /* 990 */ // MIs[0] unused
804 /* 990 */ // No operand predicates
805 /* 990 */ // Combiner Rule #13: build_vector_to_vector_insert
806 /* 990 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13),
807 /* 993 */ // Label 21: @993
808 /* 993 */ GIM_Reject,
809 /* 994 */ // Label 3: @994
810 /* 994 */ GIM_Try, /*On fail goto*//*Label 22*/ GIMT_Encode4(1005), // Rule ID 16 //
811 /* 999 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled),
812 /* 1002 */ // MIs[0] src
813 /* 1002 */ // No operand predicates
814 /* 1002 */ // MIs[0] addr
815 /* 1002 */ // No operand predicates
816 /* 1002 */ // Combiner Rule #15: form_truncstore
817 /* 1002 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner15),
818 /* 1005 */ // Label 22: @1005
819 /* 1005 */ GIM_Reject,
820 /* 1006 */ // Label 4: @1006
821 /* 1006 */ GIM_Try, /*On fail goto*//*Label 23*/ GIMT_Encode4(1017), // Rule ID 17 //
822 /* 1011 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled),
823 /* 1014 */ // MIs[0] dst
824 /* 1014 */ // No operand predicates
825 /* 1014 */ // MIs[0] src
826 /* 1014 */ // No operand predicates
827 /* 1014 */ // Combiner Rule #16: fconstant_to_constant
828 /* 1014 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner16),
829 /* 1017 */ // Label 23: @1017
830 /* 1017 */ GIM_Reject,
831 /* 1018 */ // Label 5: @1018
832 /* 1018 */ GIM_Try, /*On fail goto*//*Label 24*/ GIMT_Encode4(1029), // Rule ID 18 //
833 /* 1023 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled),
834 /* 1026 */ // Combiner Rule #17: vector_sext_inreg_to_shift; wip_match_opcode 'G_SEXT_INREG'
835 /* 1026 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner17),
836 /* 1029 */ // Label 24: @1029
837 /* 1029 */ GIM_Reject,
838 /* 1030 */ // Label 6: @1030
839 /* 1030 */ GIM_Try, /*On fail goto*//*Label 25*/ GIMT_Encode4(1041), // Rule ID 10 //
840 /* 1035 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
841 /* 1038 */ // Combiner Rule #9: vashr_vlshr_imm; wip_match_opcode 'G_LSHR'
842 /* 1038 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
843 /* 1041 */ // Label 25: @1041
844 /* 1041 */ GIM_Reject,
845 /* 1042 */ // Label 7: @1042
846 /* 1042 */ GIM_Try, /*On fail goto*//*Label 26*/ GIMT_Encode4(1053), // Rule ID 9 //
847 /* 1047 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
848 /* 1050 */ // Combiner Rule #9: vashr_vlshr_imm; wip_match_opcode 'G_ASHR'
849 /* 1050 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9),
850 /* 1053 */ // Label 26: @1053
851 /* 1053 */ GIM_Reject,
852 /* 1054 */ // Label 8: @1054
853 /* 1054 */ GIM_Try, /*On fail goto*//*Label 27*/ GIMT_Encode4(1065), // Rule ID 11 //
854 /* 1059 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
855 /* 1062 */ // MIs[0] dst
856 /* 1062 */ // No operand predicates
857 /* 1062 */ // MIs[0] tst
858 /* 1062 */ // No operand predicates
859 /* 1062 */ // MIs[0] src1
860 /* 1062 */ // No operand predicates
861 /* 1062 */ // MIs[0] src2
862 /* 1062 */ // No operand predicates
863 /* 1062 */ // Combiner Rule #10: adjust_icmp_imm
864 /* 1062 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10),
865 /* 1065 */ // Label 27: @1065
866 /* 1065 */ GIM_Try, /*On fail goto*//*Label 28*/ GIMT_Encode4(1076), // Rule ID 12 //
867 /* 1070 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled),
868 /* 1073 */ // MIs[0] dst
869 /* 1073 */ // No operand predicates
870 /* 1073 */ // MIs[0] tst
871 /* 1073 */ // No operand predicates
872 /* 1073 */ // MIs[0] src1
873 /* 1073 */ // No operand predicates
874 /* 1073 */ // MIs[0] src2
875 /* 1073 */ // No operand predicates
876 /* 1073 */ // Combiner Rule #11: swap_icmp_operands
877 /* 1073 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11),
878 /* 1076 */ // Label 28: @1076
879 /* 1076 */ GIM_Reject,
880 /* 1077 */ // Label 9: @1077
881 /* 1077 */ GIM_Try, /*On fail goto*//*Label 29*/ GIMT_Encode4(1088), // Rule ID 15 //
882 /* 1082 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled),
883 /* 1085 */ // MIs[0] dst
884 /* 1085 */ // No operand predicates
885 /* 1085 */ // MIs[0] tst
886 /* 1085 */ // No operand predicates
887 /* 1085 */ // MIs[0] src1
888 /* 1085 */ // No operand predicates
889 /* 1085 */ // MIs[0] src2
890 /* 1085 */ // No operand predicates
891 /* 1085 */ // Combiner Rule #14: lower_vector_fcmp
892 /* 1085 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14),
893 /* 1088 */ // Label 29: @1088
894 /* 1088 */ GIM_Reject,
895 /* 1089 */ // Label 10: @1089
896 /* 1089 */ GIM_Try, /*On fail goto*//*Label 30*/ GIMT_Encode4(1100), // Rule ID 22 //
897 /* 1094 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled),
898 /* 1097 */ // Combiner Rule #21: insertelt_nonconst; wip_match_opcode 'G_INSERT_VECTOR_ELT'
899 /* 1097 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner21),
900 /* 1100 */ // Label 30: @1100
901 /* 1100 */ GIM_Reject,
902 /* 1101 */ // Label 11: @1101
903 /* 1101 */ GIM_Try, /*On fail goto*//*Label 31*/ GIMT_Encode4(1112), // Rule ID 0 //
904 /* 1106 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
905 /* 1109 */ // Combiner Rule #0: dup; wip_match_opcode 'G_SHUFFLE_VECTOR'
906 /* 1109 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0),
907 /* 1112 */ // Label 31: @1112
908 /* 1112 */ GIM_Try, /*On fail goto*//*Label 32*/ GIMT_Encode4(1123), // Rule ID 1 //
909 /* 1117 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
910 /* 1120 */ // Combiner Rule #1: form_duplane; wip_match_opcode 'G_SHUFFLE_VECTOR'
911 /* 1120 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1),
912 /* 1123 */ // Label 32: @1123
913 /* 1123 */ GIM_Try, /*On fail goto*//*Label 33*/ GIMT_Encode4(1134), // Rule ID 2 //
914 /* 1128 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
915 /* 1131 */ // Combiner Rule #2: rev; wip_match_opcode 'G_SHUFFLE_VECTOR'
916 /* 1131 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2),
917 /* 1134 */ // Label 33: @1134
918 /* 1134 */ GIM_Try, /*On fail goto*//*Label 34*/ GIMT_Encode4(1145), // Rule ID 3 //
919 /* 1139 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
920 /* 1142 */ // Combiner Rule #3: ext; wip_match_opcode 'G_SHUFFLE_VECTOR'
921 /* 1142 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3),
922 /* 1145 */ // Label 34: @1145
923 /* 1145 */ GIM_Try, /*On fail goto*//*Label 35*/ GIMT_Encode4(1156), // Rule ID 4 //
924 /* 1150 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
925 /* 1153 */ // Combiner Rule #4: zip; wip_match_opcode 'G_SHUFFLE_VECTOR'
926 /* 1153 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4),
927 /* 1156 */ // Label 35: @1156
928 /* 1156 */ GIM_Try, /*On fail goto*//*Label 36*/ GIMT_Encode4(1167), // Rule ID 5 //
929 /* 1161 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
930 /* 1164 */ // Combiner Rule #5: uzp; wip_match_opcode 'G_SHUFFLE_VECTOR'
931 /* 1164 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5),
932 /* 1167 */ // Label 36: @1167
933 /* 1167 */ GIM_Try, /*On fail goto*//*Label 37*/ GIMT_Encode4(1178), // Rule ID 6 //
934 /* 1172 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
935 /* 1175 */ // Combiner Rule #6: trn; wip_match_opcode 'G_SHUFFLE_VECTOR'
936 /* 1175 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6),
937 /* 1178 */ // Label 37: @1178
938 /* 1178 */ GIM_Try, /*On fail goto*//*Label 38*/ GIMT_Encode4(1189), // Rule ID 8 //
939 /* 1183 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
940 /* 1186 */ // Combiner Rule #8: shuf_to_ins; wip_match_opcode 'G_SHUFFLE_VECTOR'
941 /* 1186 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8),
942 /* 1189 */ // Label 38: @1189
943 /* 1189 */ GIM_Try, /*On fail goto*//*Label 39*/ GIMT_Encode4(1210), // Rule ID 7 //
944 /* 1194 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
945 /* 1197 */ // MIs[0] src
946 /* 1197 */ // No operand predicates
947 /* 1197 */ // MIs[0] src1
948 /* 1197 */ // No operand predicates
949 /* 1197 */ // MIs[0] src2
950 /* 1197 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1]
951 /* 1201 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_IMPLICIT_DEF),
952 /* 1205 */ // MIs[0] mask
953 /* 1205 */ // No operand predicates
954 /* 1205 */ GIM_CheckIsSafeToFold, /*NumInsns*/1,
955 /* 1207 */ // Combiner Rule #7: fullrev
956 /* 1207 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7),
957 /* 1210 */ // Label 39: @1210
958 /* 1210 */ GIM_Reject,
959 /* 1211 */ // Label 12: @1211
960 /* 1211 */ GIM_Reject,
961 /* 1212 */ }; // Size: 1212 bytes
962 return MatchTable0;
963}
964#undef GIMT_Encode2
965#undef GIMT_Encode4
966#undef GIMT_Encode8
967
968
969#endif // GET_GICOMBINER_IMPL
970
971#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
972
973AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
974AvailableFunctionFeatures()
975
976#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
977
978#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
979
980, State(0),
981ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
982
983#endif // GET_GICOMBINER_CONSTRUCTOR_INITS
984
985