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