| 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
| 2 | |* *| |
| 3 | |* RISCVO0PreLegalizerCombinerImpl 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 RISCVO0PreLegalizerCombinerImplRuleConfig { |
| 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 9: // 1 string to match. |
| 42 | if (memcmp(RuleIdentifier.data()+0, "copy_prop" , 9) != 0) |
| 43 | break; |
| 44 | return 0; // "copy_prop" |
| 45 | case 10: // 2 strings to match. |
| 46 | switch (RuleIdentifier[0]) { |
| 47 | default: break; |
| 48 | case 'm': // 1 string to match. |
| 49 | if (memcmp(RuleIdentifier.data()+1, "ul_to_shl" , 9) != 0) |
| 50 | break; |
| 51 | return 1; // "mul_to_shl" |
| 52 | case 's': // 1 string to match. |
| 53 | if (memcmp(RuleIdentifier.data()+1, "ub_to_add" , 9) != 0) |
| 54 | break; |
| 55 | return 2; // "sub_to_add" |
| 56 | } |
| 57 | break; |
| 58 | case 12: // 1 string to match. |
| 59 | if (memcmp(RuleIdentifier.data()+0, "not_cmp_fold" , 12) != 0) |
| 60 | break; |
| 61 | return 9; // "not_cmp_fold" |
| 62 | case 13: // 1 string to match. |
| 63 | if (memcmp(RuleIdentifier.data()+0, "load_and_mask" , 13) != 0) |
| 64 | break; |
| 65 | return 8; // "load_and_mask" |
| 66 | case 14: // 1 string to match. |
| 67 | if (memcmp(RuleIdentifier.data()+0, "mul_by_neg_one" , 14) != 0) |
| 68 | break; |
| 69 | return 4; // "mul_by_neg_one" |
| 70 | case 15: // 2 strings to match. |
| 71 | switch (RuleIdentifier[0]) { |
| 72 | default: break; |
| 73 | case 'e': // 1 string to match. |
| 74 | if (memcmp(RuleIdentifier.data()+1, "xtending_loads" , 14) != 0) |
| 75 | break; |
| 76 | return 7; // "extending_loads" |
| 77 | case 'i': // 1 string to match. |
| 78 | if (memcmp(RuleIdentifier.data()+1, "dempotent_prop" , 14) != 0) |
| 79 | break; |
| 80 | return 5; // "idempotent_prop" |
| 81 | } |
| 82 | break; |
| 83 | case 17: // 1 string to match. |
| 84 | if (memcmp(RuleIdentifier.data()+0, "add_p2i_to_ptradd" , 17) != 0) |
| 85 | break; |
| 86 | return 3; // "add_p2i_to_ptradd" |
| 87 | case 19: // 1 string to match. |
| 88 | if (memcmp(RuleIdentifier.data()+0, "ptr_add_immed_chain" , 19) != 0) |
| 89 | break; |
| 90 | return 6; // "ptr_add_immed_chain" |
| 91 | case 21: // 1 string to match. |
| 92 | if (memcmp(RuleIdentifier.data()+0, "combine_concat_vector" , 21) != 0) |
| 93 | break; |
| 94 | return 11; // "combine_concat_vector" |
| 95 | case 28: // 1 string to match. |
| 96 | if (memcmp(RuleIdentifier.data()+0, "opt_brcond_by_inverting_cond" , 28) != 0) |
| 97 | break; |
| 98 | return 10; // "opt_brcond_by_inverting_cond" |
| 99 | } |
| 100 | #endif // ifndef NDEBUG |
| 101 | |
| 102 | return std::nullopt; |
| 103 | } |
| 104 | static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) { |
| 105 | std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-'); |
| 106 | if (!RangePair.second.empty()) { |
| 107 | const auto First = getRuleIdxForIdentifier(RangePair.first); |
| 108 | const auto Last = getRuleIdxForIdentifier(RangePair.second); |
| 109 | if (!First || !Last) |
| 110 | return std::nullopt; |
| 111 | if (First >= Last) |
| 112 | report_fatal_error("Beginning of range should be before end of range" ); |
| 113 | return {{*First, *Last + 1}}; |
| 114 | } |
| 115 | if (RangePair.first == "*" ) { |
| 116 | return {{0, 12}}; |
| 117 | } |
| 118 | const auto I = getRuleIdxForIdentifier(RangePair.first); |
| 119 | if (!I) |
| 120 | return std::nullopt; |
| 121 | return {{*I, *I + 1}}; |
| 122 | } |
| 123 | |
| 124 | bool RISCVO0PreLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) { |
| 125 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
| 126 | if (!MaybeRange) |
| 127 | return false; |
| 128 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
| 129 | DisabledRules.reset(I); |
| 130 | return true; |
| 131 | } |
| 132 | |
| 133 | bool RISCVO0PreLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) { |
| 134 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
| 135 | if (!MaybeRange) |
| 136 | return false; |
| 137 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
| 138 | DisabledRules.set(I); |
| 139 | return true; |
| 140 | } |
| 141 | |
| 142 | static std::vector<std::string> RISCVO0PreLegalizerCombinerOption; |
| 143 | static cl::list<std::string> RISCVO0PreLegalizerCombinerDisableOption( |
| 144 | "riscvo0prelegalizercombiner-disable-rule" , |
| 145 | cl::desc("Disable one or more combiner rules temporarily in the RISCVO0PreLegalizerCombiner pass" ), |
| 146 | cl::CommaSeparated, |
| 147 | cl::Hidden, |
| 148 | cl::cat(GICombinerOptionCategory), |
| 149 | cl::callback([](const std::string &Str) { |
| 150 | RISCVO0PreLegalizerCombinerOption.push_back(Str); |
| 151 | })); |
| 152 | static cl::list<std::string> RISCVO0PreLegalizerCombinerOnlyEnableOption( |
| 153 | "riscvo0prelegalizercombiner-only-enable-rule" , |
| 154 | cl::desc("Disable all rules in the RISCVO0PreLegalizerCombiner pass then re-enable the specified ones" ), |
| 155 | cl::Hidden, |
| 156 | cl::cat(GICombinerOptionCategory), |
| 157 | cl::callback([](const std::string &CommaSeparatedArg) { |
| 158 | StringRef Str = CommaSeparatedArg; |
| 159 | RISCVO0PreLegalizerCombinerOption.push_back("*" ); |
| 160 | do { |
| 161 | auto X = Str.split("," ); |
| 162 | RISCVO0PreLegalizerCombinerOption.push_back(("!" + X.first).str()); |
| 163 | Str = X.second; |
| 164 | } while (!Str.empty()); |
| 165 | })); |
| 166 | |
| 167 | |
| 168 | bool RISCVO0PreLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const { |
| 169 | return !DisabledRules.test(RuleID); |
| 170 | } |
| 171 | bool RISCVO0PreLegalizerCombinerImplRuleConfig::parseCommandLineOption() { |
| 172 | for (StringRef Identifier : RISCVO0PreLegalizerCombinerOption) { |
| 173 | bool Enabled = Identifier.consume_front("!" ); |
| 174 | if (Enabled && !setRuleEnabled(Identifier)) |
| 175 | return false; |
| 176 | if (!Enabled && !setRuleDisabled(Identifier)) |
| 177 | return false; |
| 178 | } |
| 179 | return true; |
| 180 | } |
| 181 | |
| 182 | |
| 183 | #endif // GET_GICOMBINER_TYPES |
| 184 | |
| 185 | #ifdef GET_GICOMBINER_TYPES |
| 186 | |
| 187 | const unsigned MAX_SUBTARGET_PREDICATES = 0; |
| 188 | using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>; |
| 189 | |
| 190 | #endif // GET_GICOMBINER_TYPES |
| 191 | |
| 192 | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
| 193 | |
| 194 | PredicateBitset AvailableModuleFeatures; |
| 195 | mutable PredicateBitset AvailableFunctionFeatures; |
| 196 | PredicateBitset getAvailableFeatures() const { |
| 197 | return AvailableModuleFeatures | AvailableFunctionFeatures; |
| 198 | } |
| 199 | PredicateBitset |
| 200 | computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const; |
| 201 | PredicateBitset |
| 202 | computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, |
| 203 | const MachineFunction *MF) const; |
| 204 | void setupGeneratedPerFunctionState(MachineFunction &MF) override; |
| 205 | |
| 206 | #endif // GET_GICOMBINER_CLASS_MEMBERS |
| 207 | |
| 208 | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
| 209 | |
| 210 | mutable MatcherState State; |
| 211 | typedef ComplexRendererFns(RISCVO0PreLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const; |
| 212 | typedef void(RISCVO0PreLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const; |
| 213 | const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo; |
| 214 | static RISCVO0PreLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[]; |
| 215 | static RISCVO0PreLegalizerCombinerImpl::CustomRendererFn CustomRenderers[]; |
| 216 | bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override; |
| 217 | bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override; |
| 218 | bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override; |
| 219 | const uint8_t *getMatchTable() const override; |
| 220 | bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override; |
| 221 | bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override; |
| 222 | bool testSimplePredicate(unsigned PredicateID) const override; |
| 223 | bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override; |
| 224 | |
| 225 | #endif // GET_GICOMBINER_CLASS_MEMBERS |
| 226 | |
| 227 | #ifdef GET_GICOMBINER_IMPL |
| 228 | |
| 229 | // LLT Objects. |
| 230 | enum { |
| 231 | GILLT_s1, |
| 232 | }; |
| 233 | const static size_t NumTypeObjects = 1; |
| 234 | const static LLT TypeObjects[] = { |
| 235 | LLT::scalar(1), |
| 236 | }; |
| 237 | |
| 238 | // Bits for subtarget features that participate in instruction matching. |
| 239 | enum SubtargetFeatureBits : uint8_t { |
| 240 | }; |
| 241 | |
| 242 | PredicateBitset RISCVO0PreLegalizerCombinerImpl:: |
| 243 | computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const { |
| 244 | PredicateBitset Features{}; |
| 245 | return Features; |
| 246 | } |
| 247 | |
| 248 | void RISCVO0PreLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) { |
| 249 | AvailableFunctionFeatures = computeAvailableFunctionFeatures((const RISCVSubtarget *)&MF.getSubtarget(), &MF); |
| 250 | } |
| 251 | PredicateBitset RISCVO0PreLegalizerCombinerImpl:: |
| 252 | computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, const MachineFunction *MF) const { |
| 253 | PredicateBitset Features{}; |
| 254 | return Features; |
| 255 | } |
| 256 | |
| 257 | // Feature bitsets. |
| 258 | enum { |
| 259 | GIFBS_Invalid, |
| 260 | }; |
| 261 | constexpr static PredicateBitset FeatureBitsets[] { |
| 262 | {}, // GIFBS_Invalid |
| 263 | }; |
| 264 | |
| 265 | // ComplexPattern predicates. |
| 266 | enum { |
| 267 | GICP_Invalid, |
| 268 | }; |
| 269 | // See constructor for table contents |
| 270 | |
| 271 | RISCVO0PreLegalizerCombinerImpl::ComplexMatcherMemFn |
| 272 | RISCVO0PreLegalizerCombinerImpl::ComplexPredicateFns[] = { |
| 273 | nullptr, // GICP_Invalid |
| 274 | }; |
| 275 | |
| 276 | bool RISCVO0PreLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const { |
| 277 | llvm_unreachable("Unknown predicate" ); |
| 278 | return false; |
| 279 | } |
| 280 | bool RISCVO0PreLegalizerCombinerImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const { |
| 281 | llvm_unreachable("Unknown predicate" ); |
| 282 | return false; |
| 283 | } |
| 284 | bool RISCVO0PreLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const { |
| 285 | llvm_unreachable("Unknown predicate" ); |
| 286 | return false; |
| 287 | } |
| 288 | bool RISCVO0PreLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const { |
| 289 | llvm_unreachable("Unknown predicate" ); |
| 290 | return false; |
| 291 | } |
| 292 | bool RISCVO0PreLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const { |
| 293 | llvm_unreachable("Unknown predicate" ); |
| 294 | return false; |
| 295 | } |
| 296 | enum { |
| 297 | GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1, |
| 298 | GICXXPred_Simple_IsRule1Enabled, |
| 299 | GICXXPred_Simple_IsRule2Enabled, |
| 300 | GICXXPred_Simple_IsRule3Enabled, |
| 301 | GICXXPred_Simple_IsRule4Enabled, |
| 302 | GICXXPred_Simple_IsRule5Enabled, |
| 303 | GICXXPred_Simple_IsRule6Enabled, |
| 304 | GICXXPred_Simple_IsRule7Enabled, |
| 305 | GICXXPred_Simple_IsRule8Enabled, |
| 306 | GICXXPred_Simple_IsRule9Enabled, |
| 307 | GICXXPred_Simple_IsRule10Enabled, |
| 308 | GICXXPred_Simple_IsRule11Enabled, |
| 309 | }; |
| 310 | |
| 311 | bool RISCVO0PreLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const { |
| 312 | return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1); |
| 313 | } |
| 314 | // Custom renderers. |
| 315 | enum { |
| 316 | GICR_Invalid, |
| 317 | }; |
| 318 | RISCVO0PreLegalizerCombinerImpl::CustomRendererFn |
| 319 | RISCVO0PreLegalizerCombinerImpl::CustomRenderers[] = { |
| 320 | nullptr, // GICR_Invalid |
| 321 | }; |
| 322 | |
| 323 | bool RISCVO0PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &I) const { |
| 324 | const TargetSubtargetInfo &ST = MF.getSubtarget(); |
| 325 | const PredicateBitset AvailableFeatures = getAvailableFeatures(); |
| 326 | B.setInstrAndDebugLoc(I); |
| 327 | State.MIs.clear(); |
| 328 | State.MIs.push_back(&I); |
| 329 | if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, /*CoverageInfo*/ nullptr)) { |
| 330 | return true; |
| 331 | } |
| 332 | |
| 333 | return false; |
| 334 | } |
| 335 | |
| 336 | enum { |
| 337 | GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1, |
| 338 | GICXXCustomAction_GICombiner1, |
| 339 | GICXXCustomAction_GICombiner2, |
| 340 | GICXXCustomAction_GICombiner3, |
| 341 | GICXXCustomAction_GICombiner4, |
| 342 | GICXXCustomAction_GICombiner5, |
| 343 | GICXXCustomAction_GICombiner6, |
| 344 | GICXXCustomAction_GICombiner7, |
| 345 | GICXXCustomAction_GICombiner8, |
| 346 | GICXXCustomAction_GICombiner9, |
| 347 | }; |
| 348 | bool RISCVO0PreLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const { |
| 349 | Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]); |
| 350 | switch(ApplyID) { |
| 351 | case GICXXCustomAction_GICombiner0:{ |
| 352 | // Match Patterns |
| 353 | if(![&](){return Helper.matchCombineCopy(*State.MIs[0]);}()) { |
| 354 | return false; |
| 355 | } |
| 356 | // Apply Patterns |
| 357 | Helper.applyCombineCopy(*State.MIs[0]); |
| 358 | return true; |
| 359 | } |
| 360 | case GICXXCustomAction_GICombiner1:{ |
| 361 | unsigned GIMatchData_matchinfo; |
| 362 | // Match Patterns |
| 363 | if(![&](){return Helper.matchCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 364 | return false; |
| 365 | } |
| 366 | // Apply Patterns |
| 367 | Helper.applyCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo); |
| 368 | return true; |
| 369 | } |
| 370 | case GICXXCustomAction_GICombiner2:{ |
| 371 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
| 372 | // Match Patterns |
| 373 | if(![&](){return Helper.matchCombineSubToAdd(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 374 | return false; |
| 375 | } |
| 376 | // Apply Patterns |
| 377 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo); |
| 378 | return true; |
| 379 | } |
| 380 | case GICXXCustomAction_GICombiner3:{ |
| 381 | std::pair<Register, bool> GIMatchData_info; |
| 382 | // Match Patterns |
| 383 | if(![&](){return Helper.matchCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info);}()) { |
| 384 | return false; |
| 385 | } |
| 386 | // Apply Patterns |
| 387 | Helper.applyCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info); |
| 388 | return true; |
| 389 | } |
| 390 | case GICXXCustomAction_GICombiner4:{ |
| 391 | PtrAddChain GIMatchData_matchinfo; |
| 392 | // Match Patterns |
| 393 | if(![&](){return Helper.matchPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 394 | return false; |
| 395 | } |
| 396 | // Apply Patterns |
| 397 | Helper.applyPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo); |
| 398 | return true; |
| 399 | } |
| 400 | case GICXXCustomAction_GICombiner5:{ |
| 401 | PreferredTuple GIMatchData_matchinfo; |
| 402 | // Match Patterns |
| 403 | if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 404 | return false; |
| 405 | } |
| 406 | // Apply Patterns |
| 407 | Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo); |
| 408 | return true; |
| 409 | } |
| 410 | case GICXXCustomAction_GICombiner6:{ |
| 411 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
| 412 | // Match Patterns |
| 413 | if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 414 | return false; |
| 415 | } |
| 416 | // Apply Patterns |
| 417 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
| 418 | return true; |
| 419 | } |
| 420 | case GICXXCustomAction_GICombiner7:{ |
| 421 | SmallVector<Register> GIMatchData_info; |
| 422 | // Match Patterns |
| 423 | if(![&](){return Helper.matchNotCmp(*State.MIs[0], GIMatchData_info);}()) { |
| 424 | return false; |
| 425 | } |
| 426 | // Apply Patterns |
| 427 | Helper.applyNotCmp(*State.MIs[0], GIMatchData_info); |
| 428 | return true; |
| 429 | } |
| 430 | case GICXXCustomAction_GICombiner8:{ |
| 431 | MachineInstr * GIMatchData_matchinfo; |
| 432 | // Match Patterns |
| 433 | if(![&](){return Helper.matchOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 434 | return false; |
| 435 | } |
| 436 | // Apply Patterns |
| 437 | Helper.applyOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo); |
| 438 | return true; |
| 439 | } |
| 440 | case GICXXCustomAction_GICombiner9:{ |
| 441 | SmallVector<Register> GIMatchData_matchinfo; |
| 442 | // Match Patterns |
| 443 | if(![&](){return Helper.matchCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 444 | return false; |
| 445 | } |
| 446 | // Apply Patterns |
| 447 | Helper.applyCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo); |
| 448 | return true; |
| 449 | } |
| 450 | } |
| 451 | llvm_unreachable("Unknown Apply Action" ); |
| 452 | } |
| 453 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
| 454 | #define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8) |
| 455 | #define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24) |
| 456 | #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) |
| 457 | #else |
| 458 | #define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val) |
| 459 | #define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val) |
| 460 | #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) |
| 461 | #endif |
| 462 | const uint8_t *RISCVO0PreLegalizerCombinerImpl::getMatchTable() const { |
| 463 | constexpr static uint8_t MatchTable0[] = { |
| 464 | /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(20), GIMT_Encode2(248), /*)*//*default:*//*Label 15*/ GIMT_Encode4(1206), |
| 465 | /* 10 */ /*TargetOpcode::COPY*//*Label 0*/ GIMT_Encode4(922), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 466 | /* 150 */ /*TargetOpcode::G_ADD*//*Label 1*/ GIMT_Encode4(934), |
| 467 | /* 154 */ /*TargetOpcode::G_SUB*//*Label 2*/ GIMT_Encode4(946), |
| 468 | /* 158 */ /*TargetOpcode::G_MUL*//*Label 3*/ GIMT_Encode4(968), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 469 | /* 186 */ /*TargetOpcode::G_AND*//*Label 4*/ GIMT_Encode4(1020), GIMT_Encode4(0), |
| 470 | /* 194 */ /*TargetOpcode::G_XOR*//*Label 5*/ GIMT_Encode4(1032), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 471 | /* 270 */ /*TargetOpcode::G_CONCAT_VECTORS*//*Label 6*/ GIMT_Encode4(1044), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 472 | /* 286 */ /*TargetOpcode::G_FREEZE*//*Label 7*/ GIMT_Encode4(1056), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 473 | /* 326 */ /*TargetOpcode::G_LOAD*//*Label 8*/ GIMT_Encode4(1086), |
| 474 | /* 330 */ /*TargetOpcode::G_SEXTLOAD*//*Label 9*/ GIMT_Encode4(1098), |
| 475 | /* 334 */ /*TargetOpcode::G_ZEXTLOAD*//*Label 10*/ GIMT_Encode4(1110), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 476 | /* 802 */ /*TargetOpcode::G_FABS*//*Label 11*/ GIMT_Encode4(1122), GIMT_Encode4(0), GIMT_Encode4(0), |
| 477 | /* 814 */ /*TargetOpcode::G_FCANONICALIZE*//*Label 12*/ GIMT_Encode4(1152), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 478 | /* 882 */ /*TargetOpcode::G_PTR_ADD*//*Label 13*/ GIMT_Encode4(1182), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 479 | /* 918 */ /*TargetOpcode::G_BR*//*Label 14*/ GIMT_Encode4(1194), |
| 480 | /* 922 */ // Label 0: @922 |
| 481 | /* 922 */ GIM_Try, /*On fail goto*//*Label 16*/ GIMT_Encode4(933), // Rule ID 0 // |
| 482 | /* 927 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled), |
| 483 | /* 930 */ // MIs[0] d |
| 484 | /* 930 */ // No operand predicates |
| 485 | /* 930 */ // MIs[0] s |
| 486 | /* 930 */ // No operand predicates |
| 487 | /* 930 */ // Combiner Rule #0: copy_prop |
| 488 | /* 930 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0), |
| 489 | /* 933 */ // Label 16: @933 |
| 490 | /* 933 */ GIM_Reject, |
| 491 | /* 934 */ // Label 1: @934 |
| 492 | /* 934 */ GIM_Try, /*On fail goto*//*Label 17*/ GIMT_Encode4(945), // Rule ID 3 // |
| 493 | /* 939 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled), |
| 494 | /* 942 */ // Combiner Rule #3: add_p2i_to_ptradd; wip_match_opcode 'G_ADD' |
| 495 | /* 942 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3), |
| 496 | /* 945 */ // Label 17: @945 |
| 497 | /* 945 */ GIM_Reject, |
| 498 | /* 946 */ // Label 2: @946 |
| 499 | /* 946 */ GIM_Try, /*On fail goto*//*Label 18*/ GIMT_Encode4(967), // Rule ID 2 // |
| 500 | /* 951 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled), |
| 501 | /* 954 */ // MIs[0] d |
| 502 | /* 954 */ // No operand predicates |
| 503 | /* 954 */ // MIs[0] op1 |
| 504 | /* 954 */ // No operand predicates |
| 505 | /* 954 */ // MIs[0] c |
| 506 | /* 954 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
| 507 | /* 958 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 508 | /* 962 */ // MIs[1] imm |
| 509 | /* 962 */ // No operand predicates |
| 510 | /* 962 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 511 | /* 964 */ // Combiner Rule #2: sub_to_add |
| 512 | /* 964 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2), |
| 513 | /* 967 */ // Label 18: @967 |
| 514 | /* 967 */ GIM_Reject, |
| 515 | /* 968 */ // Label 3: @968 |
| 516 | /* 968 */ GIM_Try, /*On fail goto*//*Label 19*/ GIMT_Encode4(1008), // Rule ID 4 // |
| 517 | /* 973 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled), |
| 518 | /* 976 */ // MIs[0] dst |
| 519 | /* 976 */ GIM_RecordRegType, /*MI*/0, /*Op*/0, /*TempTypeIdx*/255, |
| 520 | /* 980 */ // MIs[0] x |
| 521 | /* 980 */ // No operand predicates |
| 522 | /* 980 */ // MIs[0] Operand 2 |
| 523 | /* 980 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 255, |
| 524 | /* 984 */ GIR_MakeTempReg, /*TempRegID*/0, /*TypeID*/255, |
| 525 | /* 987 */ GIR_BuildConstant, /*TempRegID*/0, /*Val*/GIMT_Encode8(0), |
| 526 | /* 997 */ // Combiner Rule #4: mul_by_neg_one |
| 527 | /* 997 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_SUB), |
| 528 | /* 1000 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst |
| 529 | /* 1002 */ GIR_AddSimpleTempRegister, /*InsnID*/0, /*TempRegID*/0, |
| 530 | /* 1005 */ GIR_RootToRootCopy, /*OpIdx*/1, // x |
| 531 | /* 1007 */ GIR_EraseRootFromParent_Done, |
| 532 | /* 1008 */ // Label 19: @1008 |
| 533 | /* 1008 */ GIM_Try, /*On fail goto*//*Label 20*/ GIMT_Encode4(1019), // Rule ID 1 // |
| 534 | /* 1013 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled), |
| 535 | /* 1016 */ // MIs[0] d |
| 536 | /* 1016 */ // No operand predicates |
| 537 | /* 1016 */ // MIs[0] op1 |
| 538 | /* 1016 */ // No operand predicates |
| 539 | /* 1016 */ // MIs[0] op2 |
| 540 | /* 1016 */ // No operand predicates |
| 541 | /* 1016 */ // Combiner Rule #1: mul_to_shl |
| 542 | /* 1016 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1), |
| 543 | /* 1019 */ // Label 20: @1019 |
| 544 | /* 1019 */ GIM_Reject, |
| 545 | /* 1020 */ // Label 4: @1020 |
| 546 | /* 1020 */ GIM_Try, /*On fail goto*//*Label 21*/ GIMT_Encode4(1031), // Rule ID 12 // |
| 547 | /* 1025 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled), |
| 548 | /* 1028 */ // Combiner Rule #8: load_and_mask; wip_match_opcode 'G_AND' |
| 549 | /* 1028 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
| 550 | /* 1031 */ // Label 21: @1031 |
| 551 | /* 1031 */ GIM_Reject, |
| 552 | /* 1032 */ // Label 5: @1032 |
| 553 | /* 1032 */ GIM_Try, /*On fail goto*//*Label 22*/ GIMT_Encode4(1043), // Rule ID 13 // |
| 554 | /* 1037 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled), |
| 555 | /* 1040 */ // Combiner Rule #9: not_cmp_fold; wip_match_opcode 'G_XOR' |
| 556 | /* 1040 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
| 557 | /* 1043 */ // Label 22: @1043 |
| 558 | /* 1043 */ GIM_Reject, |
| 559 | /* 1044 */ // Label 6: @1044 |
| 560 | /* 1044 */ GIM_Try, /*On fail goto*//*Label 23*/ GIMT_Encode4(1055), // Rule ID 15 // |
| 561 | /* 1049 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled), |
| 562 | /* 1052 */ // Combiner Rule #11: combine_concat_vector; wip_match_opcode 'G_CONCAT_VECTORS' |
| 563 | /* 1052 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9), |
| 564 | /* 1055 */ // Label 23: @1055 |
| 565 | /* 1055 */ GIM_Reject, |
| 566 | /* 1056 */ // Label 7: @1056 |
| 567 | /* 1056 */ GIM_Try, /*On fail goto*//*Label 24*/ GIMT_Encode4(1085), // Rule ID 5 // |
| 568 | /* 1061 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 569 | /* 1064 */ // MIs[0] dst |
| 570 | /* 1064 */ // No operand predicates |
| 571 | /* 1064 */ // MIs[0] src |
| 572 | /* 1064 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 573 | /* 1068 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FREEZE), |
| 574 | /* 1072 */ // MIs[1] __idempotent_prop_match_0.x |
| 575 | /* 1072 */ // No operand predicates |
| 576 | /* 1072 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 577 | /* 1077 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 578 | /* 1079 */ // Combiner Rule #5: idempotent_prop @ [__idempotent_prop_match_0[0]] |
| 579 | /* 1079 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 580 | /* 1084 */ GIR_EraseRootFromParent_Done, |
| 581 | /* 1085 */ // Label 24: @1085 |
| 582 | /* 1085 */ GIM_Reject, |
| 583 | /* 1086 */ // Label 8: @1086 |
| 584 | /* 1086 */ GIM_Try, /*On fail goto*//*Label 25*/ GIMT_Encode4(1097), // Rule ID 9 // |
| 585 | /* 1091 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 586 | /* 1094 */ // Combiner Rule #7: extending_loads; wip_match_opcode 'G_LOAD' |
| 587 | /* 1094 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5), |
| 588 | /* 1097 */ // Label 25: @1097 |
| 589 | /* 1097 */ GIM_Reject, |
| 590 | /* 1098 */ // Label 9: @1098 |
| 591 | /* 1098 */ GIM_Try, /*On fail goto*//*Label 26*/ GIMT_Encode4(1109), // Rule ID 10 // |
| 592 | /* 1103 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 593 | /* 1106 */ // Combiner Rule #7: extending_loads; wip_match_opcode 'G_SEXTLOAD' |
| 594 | /* 1106 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5), |
| 595 | /* 1109 */ // Label 26: @1109 |
| 596 | /* 1109 */ GIM_Reject, |
| 597 | /* 1110 */ // Label 10: @1110 |
| 598 | /* 1110 */ GIM_Try, /*On fail goto*//*Label 27*/ GIMT_Encode4(1121), // Rule ID 11 // |
| 599 | /* 1115 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 600 | /* 1118 */ // Combiner Rule #7: extending_loads; wip_match_opcode 'G_ZEXTLOAD' |
| 601 | /* 1118 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5), |
| 602 | /* 1121 */ // Label 27: @1121 |
| 603 | /* 1121 */ GIM_Reject, |
| 604 | /* 1122 */ // Label 11: @1122 |
| 605 | /* 1122 */ GIM_Try, /*On fail goto*//*Label 28*/ GIMT_Encode4(1151), // Rule ID 6 // |
| 606 | /* 1127 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 607 | /* 1130 */ // MIs[0] dst |
| 608 | /* 1130 */ // No operand predicates |
| 609 | /* 1130 */ // MIs[0] src |
| 610 | /* 1130 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 611 | /* 1134 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FABS), |
| 612 | /* 1138 */ // MIs[1] __idempotent_prop_match_0.x |
| 613 | /* 1138 */ // No operand predicates |
| 614 | /* 1138 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 615 | /* 1143 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 616 | /* 1145 */ // Combiner Rule #5: idempotent_prop @ [__idempotent_prop_match_0[1]] |
| 617 | /* 1145 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 618 | /* 1150 */ GIR_EraseRootFromParent_Done, |
| 619 | /* 1151 */ // Label 28: @1151 |
| 620 | /* 1151 */ GIM_Reject, |
| 621 | /* 1152 */ // Label 12: @1152 |
| 622 | /* 1152 */ GIM_Try, /*On fail goto*//*Label 29*/ GIMT_Encode4(1181), // Rule ID 7 // |
| 623 | /* 1157 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 624 | /* 1160 */ // MIs[0] dst |
| 625 | /* 1160 */ // No operand predicates |
| 626 | /* 1160 */ // MIs[0] src |
| 627 | /* 1160 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 628 | /* 1164 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FCANONICALIZE), |
| 629 | /* 1168 */ // MIs[1] __idempotent_prop_match_0.x |
| 630 | /* 1168 */ // No operand predicates |
| 631 | /* 1168 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 632 | /* 1173 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 633 | /* 1175 */ // Combiner Rule #5: idempotent_prop @ [__idempotent_prop_match_0[2]] |
| 634 | /* 1175 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 635 | /* 1180 */ GIR_EraseRootFromParent_Done, |
| 636 | /* 1181 */ // Label 29: @1181 |
| 637 | /* 1181 */ GIM_Reject, |
| 638 | /* 1182 */ // Label 13: @1182 |
| 639 | /* 1182 */ GIM_Try, /*On fail goto*//*Label 30*/ GIMT_Encode4(1193), // Rule ID 8 // |
| 640 | /* 1187 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled), |
| 641 | /* 1190 */ // Combiner Rule #6: ptr_add_immed_chain; wip_match_opcode 'G_PTR_ADD' |
| 642 | /* 1190 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4), |
| 643 | /* 1193 */ // Label 30: @1193 |
| 644 | /* 1193 */ GIM_Reject, |
| 645 | /* 1194 */ // Label 14: @1194 |
| 646 | /* 1194 */ GIM_Try, /*On fail goto*//*Label 31*/ GIMT_Encode4(1205), // Rule ID 14 // |
| 647 | /* 1199 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled), |
| 648 | /* 1202 */ // Combiner Rule #10: opt_brcond_by_inverting_cond; wip_match_opcode 'G_BR' |
| 649 | /* 1202 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8), |
| 650 | /* 1205 */ // Label 31: @1205 |
| 651 | /* 1205 */ GIM_Reject, |
| 652 | /* 1206 */ // Label 15: @1206 |
| 653 | /* 1206 */ GIM_Reject, |
| 654 | /* 1207 */ }; // Size: 1207 bytes |
| 655 | return MatchTable0; |
| 656 | } |
| 657 | #undef GIMT_Encode2 |
| 658 | #undef GIMT_Encode4 |
| 659 | #undef GIMT_Encode8 |
| 660 | |
| 661 | |
| 662 | #endif // GET_GICOMBINER_IMPL |
| 663 | |
| 664 | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
| 665 | |
| 666 | AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)), |
| 667 | AvailableFunctionFeatures() |
| 668 | |
| 669 | #endif // GET_GICOMBINER_CONSTRUCTOR_INITS |
| 670 | |
| 671 | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
| 672 | |
| 673 | , State(0), |
| 674 | ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers) |
| 675 | |
| 676 | #endif // GET_GICOMBINER_CONSTRUCTOR_INITS |
| 677 | |
| 678 | |