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