| 1 | /*===- TableGen'erated file -------------------------------------*- C++ -*-===*\ |
| 2 | |* *| |
| 3 | |* RISCVPostLegalizerCombinerImpl Combiner Match Table *| |
| 4 | |* *| |
| 5 | |* Automatically generated file, do not edit! *| |
| 6 | |* *| |
| 7 | \*===----------------------------------------------------------------------===*/ |
| 8 | |
| 9 | #ifdef GET_GICOMBINER_DEPS |
| 10 | #include "llvm/ADT/SparseBitVector.h" |
| 11 | namespace llvm { |
| 12 | extern cl::OptionCategory GICombinerOptionCategory; |
| 13 | } // end namespace llvm |
| 14 | #endif // ifdef GET_GICOMBINER_DEPS |
| 15 | |
| 16 | #ifdef GET_GICOMBINER_TYPES |
| 17 | struct RISCVPostLegalizerCombinerImplRuleConfig { |
| 18 | SparseBitVector<> DisabledRules; |
| 19 | |
| 20 | bool isRuleEnabled(unsigned RuleID) const; |
| 21 | bool parseCommandLineOption(); |
| 22 | bool setRuleEnabled(StringRef RuleIdentifier); |
| 23 | bool setRuleDisabled(StringRef RuleIdentifier); |
| 24 | }; |
| 25 | |
| 26 | static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) { |
| 27 | uint64_t I; |
| 28 | // getAtInteger(...) returns false on success |
| 29 | bool Parsed = !RuleIdentifier.getAsInteger(0, I); |
| 30 | if (Parsed) |
| 31 | return I; |
| 32 | |
| 33 | #ifndef NDEBUG |
| 34 | switch (RuleIdentifier.size()) { |
| 35 | default: break; |
| 36 | case 10: // 3 strings to match. |
| 37 | switch (RuleIdentifier[0]) { |
| 38 | default: break; |
| 39 | case 'i': // 1 string to match. |
| 40 | if (memcmp(RuleIdentifier.data()+1, "2p_to_p2i" , 9) != 0) |
| 41 | break; |
| 42 | return 10; // "i2p_to_p2i" |
| 43 | case 'p': // 1 string to match. |
| 44 | if (memcmp(RuleIdentifier.data()+1, "2i_to_i2p" , 9) != 0) |
| 45 | break; |
| 46 | return 9; // "p2i_to_i2p" |
| 47 | case 's': // 1 string to match. |
| 48 | if (memcmp(RuleIdentifier.data()+1, "ub_to_add" , 9) != 0) |
| 49 | break; |
| 50 | return 0; // "sub_to_add" |
| 51 | } |
| 52 | break; |
| 53 | case 11: // 1 string to match. |
| 54 | if (memcmp(RuleIdentifier.data()+0, "add_sub_reg" , 11) != 0) |
| 55 | break; |
| 56 | return 15; // "add_sub_reg" |
| 57 | case 13: // 2 strings to match. |
| 58 | switch (RuleIdentifier[0]) { |
| 59 | default: break; |
| 60 | case 'l': // 1 string to match. |
| 61 | if (memcmp(RuleIdentifier.data()+1, "oad_and_mask" , 12) != 0) |
| 62 | break; |
| 63 | return 2; // "load_and_mask" |
| 64 | case 'r': // 1 string to match. |
| 65 | if (memcmp(RuleIdentifier.data()+1, "edundant_and" , 12) != 0) |
| 66 | break; |
| 67 | return 3; // "redundant_and" |
| 68 | } |
| 69 | break; |
| 70 | case 14: // 2 strings to match. |
| 71 | switch (RuleIdentifier[0]) { |
| 72 | default: break; |
| 73 | case 'b': // 1 string to match. |
| 74 | if (memcmp(RuleIdentifier.data()+1, "inop_same_val" , 13) != 0) |
| 75 | break; |
| 76 | return 6; // "binop_same_val" |
| 77 | case 'f': // 1 string to match. |
| 78 | if (memcmp(RuleIdentifier.data()+1, "neg_fneg_fold" , 13) != 0) |
| 79 | break; |
| 80 | return 12; // "fneg_fneg_fold" |
| 81 | } |
| 82 | break; |
| 83 | case 15: // 2 strings to match. |
| 84 | switch (RuleIdentifier[0]) { |
| 85 | default: break; |
| 86 | case 'e': // 1 string to match. |
| 87 | if (memcmp(RuleIdentifier.data()+1, "xtending_loads" , 14) != 0) |
| 88 | break; |
| 89 | return 1; // "extending_loads" |
| 90 | case 's': // 1 string to match. |
| 91 | if (memcmp(RuleIdentifier.data()+1, "elect_same_val" , 14) != 0) |
| 92 | break; |
| 93 | return 4; // "select_same_val" |
| 94 | } |
| 95 | break; |
| 96 | case 17: // 2 strings to match. |
| 97 | switch (RuleIdentifier[0]) { |
| 98 | default: break; |
| 99 | case 'a': // 1 string to match. |
| 100 | if (memcmp(RuleIdentifier.data()+1, "nyext_trunc_fold" , 16) != 0) |
| 101 | break; |
| 102 | return 11; // "anyext_trunc_fold" |
| 103 | case 's': // 1 string to match. |
| 104 | if (memcmp(RuleIdentifier.data()+1, "hift_immed_chain" , 16) != 0) |
| 105 | break; |
| 106 | return 24; // "shift_immed_chain" |
| 107 | } |
| 108 | break; |
| 109 | case 18: // 3 strings to match. |
| 110 | switch (RuleIdentifier[0]) { |
| 111 | default: break; |
| 112 | case 'b': // 1 string to match. |
| 113 | if (memcmp(RuleIdentifier.data()+1, "inop_left_to_zero" , 17) != 0) |
| 114 | break; |
| 115 | return 7; // "binop_left_to_zero" |
| 116 | case 'f': // 2 strings to match. |
| 117 | switch (RuleIdentifier[1]) { |
| 118 | default: break; |
| 119 | case 'o': // 1 string to match. |
| 120 | if (memcmp(RuleIdentifier.data()+2, "ld_fp_zero_store" , 16) != 0) |
| 121 | break; |
| 122 | return 28; // "fold_fp_zero_store" |
| 123 | case 'p': // 1 string to match. |
| 124 | if (memcmp(RuleIdentifier.data()+2, "trunc_fpext_fold" , 16) != 0) |
| 125 | break; |
| 126 | return 20; // "fptrunc_fpext_fold" |
| 127 | } |
| 128 | break; |
| 129 | } |
| 130 | break; |
| 131 | case 19: // 3 strings to match. |
| 132 | switch (RuleIdentifier[0]) { |
| 133 | default: break; |
| 134 | case 'b': // 1 string to match. |
| 135 | if (memcmp(RuleIdentifier.data()+1, "inop_right_to_zero" , 18) != 0) |
| 136 | break; |
| 137 | return 8; // "binop_right_to_zero" |
| 138 | case 'r': // 1 string to match. |
| 139 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_zero" , 18) != 0) |
| 140 | break; |
| 141 | return 5; // "right_identity_zero" |
| 142 | case 's': // 1 string to match. |
| 143 | if (memcmp(RuleIdentifier.data()+1, "implify_neg_minmax" , 18) != 0) |
| 144 | break; |
| 145 | return 27; // "simplify_neg_minmax" |
| 146 | } |
| 147 | break; |
| 148 | case 20: // 1 string to match. |
| 149 | if (memcmp(RuleIdentifier.data()+0, "bitcast_bitcast_fold" , 20) != 0) |
| 150 | break; |
| 151 | return 19; // "bitcast_bitcast_fold" |
| 152 | case 21: // 1 string to match. |
| 153 | if (memcmp(RuleIdentifier.data()+0, "right_identity_one_fp" , 21) != 0) |
| 154 | break; |
| 155 | return 14; // "right_identity_one_fp" |
| 156 | case 22: // 2 strings to match. |
| 157 | switch (RuleIdentifier[0]) { |
| 158 | default: break; |
| 159 | case 'r': // 1 string to match. |
| 160 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_one_int" , 21) != 0) |
| 161 | break; |
| 162 | return 13; // "right_identity_one_int" |
| 163 | case 't': // 1 string to match. |
| 164 | if (memcmp(RuleIdentifier.data()+1, "runc_buildvector_fold" , 21) != 0) |
| 165 | break; |
| 166 | return 17; // "trunc_buildvector_fold" |
| 167 | } |
| 168 | break; |
| 169 | case 25: // 2 strings to match. |
| 170 | switch (RuleIdentifier[0]) { |
| 171 | default: break; |
| 172 | case 'b': // 1 string to match. |
| 173 | if (memcmp(RuleIdentifier.data()+1, "uildvector_identity_fold" , 24) != 0) |
| 174 | break; |
| 175 | return 16; // "buildvector_identity_fold" |
| 176 | case 'r': // 1 string to match. |
| 177 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_one_fp" , 24) != 0) |
| 178 | break; |
| 179 | return 23; // "right_identity_neg_one_fp" |
| 180 | } |
| 181 | break; |
| 182 | case 26: // 2 strings to match. |
| 183 | switch (RuleIdentifier[0]) { |
| 184 | default: break; |
| 185 | case 'c': // 1 string to match. |
| 186 | if (memcmp(RuleIdentifier.data()+1, "ommute_fp_constant_to_rhs" , 25) != 0) |
| 187 | break; |
| 188 | return 26; // "commute_fp_constant_to_rhs" |
| 189 | case 'r': // 1 string to match. |
| 190 | if (memcmp(RuleIdentifier.data()+1, "ight_identity_neg_zero_fp" , 25) != 0) |
| 191 | break; |
| 192 | return 21; // "right_identity_neg_zero_fp" |
| 193 | } |
| 194 | break; |
| 195 | case 27: // 2 strings to match. |
| 196 | switch (RuleIdentifier[0]) { |
| 197 | default: break; |
| 198 | case 'c': // 1 string to match. |
| 199 | if (memcmp(RuleIdentifier.data()+1, "ommute_int_constant_to_rhs" , 26) != 0) |
| 200 | break; |
| 201 | return 25; // "commute_int_constant_to_rhs" |
| 202 | case 't': // 1 string to match. |
| 203 | if (memcmp(RuleIdentifier.data()+1, "runc_lshr_buildvector_fold" , 26) != 0) |
| 204 | break; |
| 205 | return 18; // "trunc_lshr_buildvector_fold" |
| 206 | } |
| 207 | break; |
| 208 | case 30: // 1 string to match. |
| 209 | if (memcmp(RuleIdentifier.data()+0, "right_identity_neg_zero_fp_nsz" , 30) != 0) |
| 210 | break; |
| 211 | return 22; // "right_identity_neg_zero_fp_nsz" |
| 212 | } |
| 213 | #endif // ifndef NDEBUG |
| 214 | |
| 215 | return std::nullopt; |
| 216 | } |
| 217 | static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) { |
| 218 | std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-'); |
| 219 | if (!RangePair.second.empty()) { |
| 220 | const auto First = getRuleIdxForIdentifier(RangePair.first); |
| 221 | const auto Last = getRuleIdxForIdentifier(RangePair.second); |
| 222 | if (!First || !Last) |
| 223 | return std::nullopt; |
| 224 | if (First >= Last) |
| 225 | report_fatal_error("Beginning of range should be before end of range" ); |
| 226 | return {{*First, *Last + 1}}; |
| 227 | } |
| 228 | if (RangePair.first == "*" ) { |
| 229 | return {{0, 29}}; |
| 230 | } |
| 231 | const auto I = getRuleIdxForIdentifier(RangePair.first); |
| 232 | if (!I) |
| 233 | return std::nullopt; |
| 234 | return {{*I, *I + 1}}; |
| 235 | } |
| 236 | |
| 237 | bool RISCVPostLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) { |
| 238 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
| 239 | if (!MaybeRange) |
| 240 | return false; |
| 241 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
| 242 | DisabledRules.reset(I); |
| 243 | return true; |
| 244 | } |
| 245 | |
| 246 | bool RISCVPostLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) { |
| 247 | auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier); |
| 248 | if (!MaybeRange) |
| 249 | return false; |
| 250 | for (auto I = MaybeRange->first; I < MaybeRange->second; ++I) |
| 251 | DisabledRules.set(I); |
| 252 | return true; |
| 253 | } |
| 254 | |
| 255 | static std::vector<std::string> RISCVPostLegalizerCombinerOption; |
| 256 | static cl::list<std::string> RISCVPostLegalizerCombinerDisableOption( |
| 257 | "riscvpostlegalizercombiner-disable-rule" , |
| 258 | cl::desc("Disable one or more combiner rules temporarily in the RISCVPostLegalizerCombiner pass" ), |
| 259 | cl::CommaSeparated, |
| 260 | cl::Hidden, |
| 261 | cl::cat(GICombinerOptionCategory), |
| 262 | cl::callback([](const std::string &Str) { |
| 263 | RISCVPostLegalizerCombinerOption.push_back(Str); |
| 264 | })); |
| 265 | static cl::list<std::string> RISCVPostLegalizerCombinerOnlyEnableOption( |
| 266 | "riscvpostlegalizercombiner-only-enable-rule" , |
| 267 | cl::desc("Disable all rules in the RISCVPostLegalizerCombiner pass then re-enable the specified ones" ), |
| 268 | cl::Hidden, |
| 269 | cl::cat(GICombinerOptionCategory), |
| 270 | cl::callback([](const std::string &CommaSeparatedArg) { |
| 271 | StringRef Str = CommaSeparatedArg; |
| 272 | RISCVPostLegalizerCombinerOption.push_back("*" ); |
| 273 | do { |
| 274 | auto X = Str.split("," ); |
| 275 | RISCVPostLegalizerCombinerOption.push_back(("!" + X.first).str()); |
| 276 | Str = X.second; |
| 277 | } while (!Str.empty()); |
| 278 | })); |
| 279 | |
| 280 | |
| 281 | bool RISCVPostLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const { |
| 282 | return !DisabledRules.test(RuleID); |
| 283 | } |
| 284 | bool RISCVPostLegalizerCombinerImplRuleConfig::parseCommandLineOption() { |
| 285 | for (StringRef Identifier : RISCVPostLegalizerCombinerOption) { |
| 286 | bool Enabled = Identifier.consume_front("!" ); |
| 287 | if (Enabled && !setRuleEnabled(Identifier)) |
| 288 | return false; |
| 289 | if (!Enabled && !setRuleDisabled(Identifier)) |
| 290 | return false; |
| 291 | } |
| 292 | return true; |
| 293 | } |
| 294 | |
| 295 | #endif // ifdef GET_GICOMBINER_TYPES |
| 296 | |
| 297 | #ifdef GET_GICOMBINER_TYPES |
| 298 | const unsigned MAX_SUBTARGET_PREDICATES = 0; |
| 299 | using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>; |
| 300 | #endif // ifdef GET_GICOMBINER_TYPES |
| 301 | |
| 302 | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
| 303 | PredicateBitset AvailableModuleFeatures; |
| 304 | mutable PredicateBitset AvailableFunctionFeatures; |
| 305 | PredicateBitset getAvailableFeatures() const { |
| 306 | return AvailableModuleFeatures | AvailableFunctionFeatures; |
| 307 | } |
| 308 | PredicateBitset |
| 309 | computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const; |
| 310 | PredicateBitset |
| 311 | computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, |
| 312 | const MachineFunction *MF) const; |
| 313 | void setupGeneratedPerFunctionState(MachineFunction &MF) override; |
| 314 | #endif // ifdef GET_GICOMBINER_CLASS_MEMBERS |
| 315 | #ifdef GET_GICOMBINER_CLASS_MEMBERS |
| 316 | mutable MatcherState State; |
| 317 | typedef ComplexRendererFns(RISCVPostLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const; |
| 318 | typedef void(RISCVPostLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const; |
| 319 | const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo; |
| 320 | static RISCVPostLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[]; |
| 321 | static RISCVPostLegalizerCombinerImpl::CustomRendererFn CustomRenderers[]; |
| 322 | bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override; |
| 323 | bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override; |
| 324 | bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override; |
| 325 | const uint8_t *getMatchTable() const override; |
| 326 | bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override; |
| 327 | bool testMOPredicate_MO(unsigned PredicateID, const MachineOperand &MO, const MatcherState &State) const override; |
| 328 | bool testSimplePredicate(unsigned PredicateID) const override; |
| 329 | bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override; |
| 330 | #endif // ifdef GET_GICOMBINER_CLASS_MEMBERS |
| 331 | |
| 332 | #ifdef GET_GICOMBINER_IMPL |
| 333 | // LLT Objects. |
| 334 | enum { |
| 335 | GILLT_s1, |
| 336 | }; |
| 337 | const static size_t NumTypeObjects = 1; |
| 338 | const static LLT TypeObjects[] = { |
| 339 | LLT::scalar(1), |
| 340 | }; |
| 341 | |
| 342 | // Bits for subtarget features that participate in instruction matching. |
| 343 | enum SubtargetFeatureBits : uint8_t { |
| 344 | }; |
| 345 | |
| 346 | PredicateBitset RISCVPostLegalizerCombinerImpl:: |
| 347 | computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const { |
| 348 | PredicateBitset Features{}; |
| 349 | return Features; |
| 350 | } |
| 351 | |
| 352 | void RISCVPostLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) { |
| 353 | AvailableFunctionFeatures = computeAvailableFunctionFeatures((const RISCVSubtarget *)&MF.getSubtarget(), &MF); |
| 354 | } |
| 355 | PredicateBitset RISCVPostLegalizerCombinerImpl:: |
| 356 | computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, const MachineFunction *MF) const { |
| 357 | PredicateBitset Features{}; |
| 358 | return Features; |
| 359 | } |
| 360 | |
| 361 | // Feature bitsets. |
| 362 | enum { |
| 363 | GIFBS_Invalid, |
| 364 | }; |
| 365 | constexpr static PredicateBitset FeatureBitsets[] { |
| 366 | {}, // GIFBS_Invalid |
| 367 | }; |
| 368 | |
| 369 | // ComplexPattern predicates. |
| 370 | enum { |
| 371 | GICP_Invalid, |
| 372 | }; |
| 373 | // See constructor for table contents |
| 374 | |
| 375 | RISCVPostLegalizerCombinerImpl::ComplexMatcherMemFn |
| 376 | RISCVPostLegalizerCombinerImpl::ComplexPredicateFns[] = { |
| 377 | nullptr, // GICP_Invalid |
| 378 | }; |
| 379 | |
| 380 | enum { |
| 381 | GICXXPred_MI_Predicate_GICombiner0 = GICXXPred_Invalid + 1, |
| 382 | GICXXPred_MI_Predicate_GICombiner1, |
| 383 | GICXXPred_MI_Predicate_GICombiner2, |
| 384 | GICXXPred_MI_Predicate_GICombiner3, |
| 385 | }; |
| 386 | bool RISCVPostLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const { |
| 387 | switch (PredicateID) { |
| 388 | case GICXXPred_MI_Predicate_GICombiner0: { |
| 389 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 1.0); |
| 390 | } |
| 391 | case GICXXPred_MI_Predicate_GICombiner1: { |
| 392 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -0.0); |
| 393 | } |
| 394 | case GICXXPred_MI_Predicate_GICombiner2: { |
| 395 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), 0.0); |
| 396 | } |
| 397 | case GICXXPred_MI_Predicate_GICombiner3: { |
| 398 | return Helper.matchConstantFPOp(State.MIs[0]->getOperand(2), -1.0); |
| 399 | } |
| 400 | } |
| 401 | llvm_unreachable("Unknown predicate" ); |
| 402 | return false; |
| 403 | } |
| 404 | bool RISCVPostLegalizerCombinerImpl::testMOPredicate_MO(unsigned PredicateID, const MachineOperand & MO, const MatcherState &State) const { |
| 405 | llvm_unreachable("Unknown predicate" ); |
| 406 | return false; |
| 407 | } |
| 408 | bool RISCVPostLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const { |
| 409 | llvm_unreachable("Unknown predicate" ); |
| 410 | return false; |
| 411 | } |
| 412 | bool RISCVPostLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const { |
| 413 | llvm_unreachable("Unknown predicate" ); |
| 414 | return false; |
| 415 | } |
| 416 | bool RISCVPostLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const { |
| 417 | llvm_unreachable("Unknown predicate" ); |
| 418 | return false; |
| 419 | } |
| 420 | enum { |
| 421 | GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1, |
| 422 | GICXXPred_Simple_IsRule1Enabled, |
| 423 | GICXXPred_Simple_IsRule2Enabled, |
| 424 | GICXXPred_Simple_IsRule3Enabled, |
| 425 | GICXXPred_Simple_IsRule4Enabled, |
| 426 | GICXXPred_Simple_IsRule5Enabled, |
| 427 | GICXXPred_Simple_IsRule6Enabled, |
| 428 | GICXXPred_Simple_IsRule7Enabled, |
| 429 | GICXXPred_Simple_IsRule8Enabled, |
| 430 | GICXXPred_Simple_IsRule9Enabled, |
| 431 | GICXXPred_Simple_IsRule10Enabled, |
| 432 | GICXXPred_Simple_IsRule11Enabled, |
| 433 | GICXXPred_Simple_IsRule12Enabled, |
| 434 | GICXXPred_Simple_IsRule13Enabled, |
| 435 | GICXXPred_Simple_IsRule14Enabled, |
| 436 | GICXXPred_Simple_IsRule15Enabled, |
| 437 | GICXXPred_Simple_IsRule16Enabled, |
| 438 | GICXXPred_Simple_IsRule17Enabled, |
| 439 | GICXXPred_Simple_IsRule18Enabled, |
| 440 | GICXXPred_Simple_IsRule19Enabled, |
| 441 | GICXXPred_Simple_IsRule20Enabled, |
| 442 | GICXXPred_Simple_IsRule21Enabled, |
| 443 | GICXXPred_Simple_IsRule22Enabled, |
| 444 | GICXXPred_Simple_IsRule23Enabled, |
| 445 | GICXXPred_Simple_IsRule24Enabled, |
| 446 | GICXXPred_Simple_IsRule25Enabled, |
| 447 | GICXXPred_Simple_IsRule26Enabled, |
| 448 | GICXXPred_Simple_IsRule27Enabled, |
| 449 | GICXXPred_Simple_IsRule28Enabled, |
| 450 | }; |
| 451 | |
| 452 | bool RISCVPostLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const { |
| 453 | return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1); |
| 454 | } |
| 455 | // Custom renderers. |
| 456 | enum { |
| 457 | GICR_Invalid, |
| 458 | }; |
| 459 | RISCVPostLegalizerCombinerImpl::CustomRendererFn |
| 460 | RISCVPostLegalizerCombinerImpl::CustomRenderers[] = { |
| 461 | nullptr, // GICR_Invalid |
| 462 | }; |
| 463 | |
| 464 | bool RISCVPostLegalizerCombinerImpl::tryCombineAll(MachineInstr &I) const { |
| 465 | const TargetSubtargetInfo &ST = MF.getSubtarget(); |
| 466 | const PredicateBitset AvailableFeatures = getAvailableFeatures(); |
| 467 | B.setInstrAndDebugLoc(I); |
| 468 | State.MIs.clear(); |
| 469 | State.MIs.push_back(&I); |
| 470 | if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, /*CoverageInfo*/ nullptr)) { |
| 471 | return true; |
| 472 | } |
| 473 | |
| 474 | return false; |
| 475 | } |
| 476 | |
| 477 | enum { |
| 478 | GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1, |
| 479 | GICXXCustomAction_GICombiner1, |
| 480 | GICXXCustomAction_GICombiner2, |
| 481 | GICXXCustomAction_GICombiner3, |
| 482 | GICXXCustomAction_GICombiner4, |
| 483 | GICXXCustomAction_GICombiner5, |
| 484 | GICXXCustomAction_GICombiner6, |
| 485 | GICXXCustomAction_GICombiner7, |
| 486 | GICXXCustomAction_GICombiner8, |
| 487 | GICXXCustomAction_GICombiner9, |
| 488 | GICXXCustomAction_GICombiner10, |
| 489 | GICXXCustomAction_GICombiner11, |
| 490 | GICXXCustomAction_GICombiner12, |
| 491 | GICXXCustomAction_GICombiner13, |
| 492 | GICXXCustomAction_GICombiner14, |
| 493 | GICXXCustomAction_GICombiner15, |
| 494 | GICXXCustomAction_GICombiner16, |
| 495 | }; |
| 496 | bool RISCVPostLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const { |
| 497 | Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]); |
| 498 | switch(ApplyID) { |
| 499 | case GICXXCustomAction_GICombiner0:{ |
| 500 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
| 501 | // Match Patterns |
| 502 | if(![&](){return Helper.matchCombineSubToAdd(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 503 | return false; |
| 504 | } |
| 505 | // Apply Patterns |
| 506 | Helper.applyBuildFnNoErase(*State.MIs[0], GIMatchData_matchinfo); |
| 507 | return true; |
| 508 | } |
| 509 | case GICXXCustomAction_GICombiner1:{ |
| 510 | PreferredTuple GIMatchData_matchinfo; |
| 511 | // Match Patterns |
| 512 | if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 513 | return false; |
| 514 | } |
| 515 | // Apply Patterns |
| 516 | Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo); |
| 517 | return true; |
| 518 | } |
| 519 | case GICXXCustomAction_GICombiner2:{ |
| 520 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
| 521 | // Match Patterns |
| 522 | if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 523 | return false; |
| 524 | } |
| 525 | // Apply Patterns |
| 526 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
| 527 | return true; |
| 528 | } |
| 529 | case GICXXCustomAction_GICombiner3:{ |
| 530 | Register GIMatchData_matchinfo; |
| 531 | // Match Patterns |
| 532 | if(![&](){return Helper.matchRedundantAnd(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 533 | return false; |
| 534 | } |
| 535 | // Apply Patterns |
| 536 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
| 537 | return true; |
| 538 | } |
| 539 | case GICXXCustomAction_GICombiner4:{ |
| 540 | // Match Patterns |
| 541 | if(![&](){return Helper.matchSelectSameVal(*State.MIs[0]);}()) { |
| 542 | return false; |
| 543 | } |
| 544 | // Apply Patterns |
| 545 | Helper.replaceSingleDefInstWithOperand(*State.MIs[0], 2); |
| 546 | return true; |
| 547 | } |
| 548 | case GICXXCustomAction_GICombiner5:{ |
| 549 | Register GIMatchData_info; |
| 550 | // Match Patterns |
| 551 | if(![&](){return Helper.matchCombineI2PToP2I(*State.MIs[0], GIMatchData_info);}()) { |
| 552 | return false; |
| 553 | } |
| 554 | // Apply Patterns |
| 555 | Helper.applyCombineI2PToP2I(*State.MIs[0], GIMatchData_info); |
| 556 | return true; |
| 557 | } |
| 558 | case GICXXCustomAction_GICombiner6:{ |
| 559 | Register GIMatchData_info; |
| 560 | // Match Patterns |
| 561 | if(![&](){GIMatchData_info = State.MIs[1]->getOperand(1).getReg(); return true;}()) { |
| 562 | return false; |
| 563 | } |
| 564 | // Apply Patterns |
| 565 | Helper.applyCombineP2IToI2P(*State.MIs[0], GIMatchData_info); |
| 566 | return true; |
| 567 | } |
| 568 | case GICXXCustomAction_GICombiner7:{ |
| 569 | Register GIMatchData_matchinfo; |
| 570 | // Match Patterns |
| 571 | if(![&](){return Helper.matchCombineAnyExtTrunc(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 572 | return false; |
| 573 | } |
| 574 | // Apply Patterns |
| 575 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
| 576 | return true; |
| 577 | } |
| 578 | case GICXXCustomAction_GICombiner8:{ |
| 579 | Register GIMatchData_matchinfo; |
| 580 | // Match Patterns |
| 581 | if(![&](){return Helper.matchBuildVectorIdentityFold(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 582 | return false; |
| 583 | } |
| 584 | // Apply Patterns |
| 585 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
| 586 | return true; |
| 587 | } |
| 588 | case GICXXCustomAction_GICombiner9:{ |
| 589 | Register GIMatchData_matchinfo; |
| 590 | // Match Patterns |
| 591 | if(![&](){return Helper.matchTruncBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 592 | return false; |
| 593 | } |
| 594 | // Apply Patterns |
| 595 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
| 596 | return true; |
| 597 | } |
| 598 | case GICXXCustomAction_GICombiner10:{ |
| 599 | Register GIMatchData_matchinfo; |
| 600 | // Match Patterns |
| 601 | if(![&](){return Helper.matchTruncLshrBuildVectorFold(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 602 | return false; |
| 603 | } |
| 604 | // Apply Patterns |
| 605 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], GIMatchData_matchinfo); |
| 606 | return true; |
| 607 | } |
| 608 | case GICXXCustomAction_GICombiner11:{ |
| 609 | // Match Patterns |
| 610 | if(![&](){return MRI.getType(State.MIs[1]->getOperand(1).getReg()) == MRI.getType(State.MIs[0]->getOperand(0).getReg());}()) { |
| 611 | return false; |
| 612 | } |
| 613 | // Apply Patterns |
| 614 | Helper.replaceSingleDefInstWithReg(*State.MIs[0], State.MIs[1]->getOperand(1).getReg()); |
| 615 | return true; |
| 616 | } |
| 617 | case GICXXCustomAction_GICombiner12:{ |
| 618 | RegisterImmPair GIMatchData_matchinfo; |
| 619 | // Match Patterns |
| 620 | if(![&](){return Helper.matchShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 621 | return false; |
| 622 | } |
| 623 | // Apply Patterns |
| 624 | Helper.applyShiftImmedChain(*State.MIs[0], GIMatchData_matchinfo); |
| 625 | return true; |
| 626 | } |
| 627 | case GICXXCustomAction_GICombiner13:{ |
| 628 | // Match Patterns |
| 629 | if(![&](){return Helper.matchCommuteConstantToRHS(*State.MIs[0]);}()) { |
| 630 | return false; |
| 631 | } |
| 632 | // Apply Patterns |
| 633 | Helper.applyCommuteBinOpOperands(*State.MIs[0]); |
| 634 | return true; |
| 635 | } |
| 636 | case GICXXCustomAction_GICombiner14:{ |
| 637 | // Match Patterns |
| 638 | if(![&](){return Helper.matchCommuteFPConstantToRHS(*State.MIs[0]);}()) { |
| 639 | return false; |
| 640 | } |
| 641 | // Apply Patterns |
| 642 | Helper.applyCommuteBinOpOperands(*State.MIs[0]); |
| 643 | return true; |
| 644 | } |
| 645 | case GICXXCustomAction_GICombiner15:{ |
| 646 | std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo; |
| 647 | // Match Patterns |
| 648 | if(![&](){return Helper.matchSimplifyNegMinMax(*State.MIs[0], GIMatchData_matchinfo);}()) { |
| 649 | return false; |
| 650 | } |
| 651 | // Apply Patterns |
| 652 | Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo); |
| 653 | return true; |
| 654 | } |
| 655 | case GICXXCustomAction_GICombiner16:{ |
| 656 | Register GIMatchData_matchinfo; |
| 657 | // Match Patterns |
| 658 | if(![&](){return matchFoldFPZeroStore(*State.MIs[0], MRI, STI, GIMatchData_matchinfo);}()) { |
| 659 | return false; |
| 660 | } |
| 661 | // Apply Patterns |
| 662 | applyFoldFPZeroStore(*State.MIs[0], MRI, B, STI, GIMatchData_matchinfo); |
| 663 | return true; |
| 664 | } |
| 665 | } |
| 666 | llvm_unreachable("Unknown Apply Action" ); |
| 667 | } |
| 668 | #if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__ |
| 669 | #define GIMT_Encode2(Val) uint8_t(Val), uint8_t((Val) >> 8) |
| 670 | #define GIMT_Encode4(Val) uint8_t(Val), uint8_t((Val) >> 8), uint8_t((Val) >> 16), uint8_t((Val) >> 24) |
| 671 | #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) |
| 672 | #else |
| 673 | #define GIMT_Encode2(Val) uint8_t((Val) >> 8), uint8_t(Val) |
| 674 | #define GIMT_Encode4(Val) uint8_t((Val) >> 24), uint8_t((Val) >> 16), uint8_t((Val) >> 8), uint8_t(Val) |
| 675 | #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) |
| 676 | #endif |
| 677 | const uint8_t *RISCVPostLegalizerCombinerImpl::getMatchTable() const { |
| 678 | constexpr static uint8_t MatchTable0[] = { |
| 679 | /* 0 */ GIM_SwitchOpcode, /*MI*/0, /*[*/GIMT_Encode2(55), GIMT_Encode2(242), /*)*//*default:*//*Label 56*/ GIMT_Encode4(2262), |
| 680 | /* 10 */ /*TargetOpcode::G_ADD*//*Label 0*/ GIMT_Encode4(758), |
| 681 | /* 14 */ /*TargetOpcode::G_SUB*//*Label 1*/ GIMT_Encode4(861), |
| 682 | /* 18 */ /*TargetOpcode::G_MUL*//*Label 2*/ GIMT_Encode4(917), |
| 683 | /* 22 */ /*TargetOpcode::G_SDIV*//*Label 3*/ GIMT_Encode4(1015), |
| 684 | /* 26 */ /*TargetOpcode::G_UDIV*//*Label 4*/ GIMT_Encode4(1056), |
| 685 | /* 30 */ /*TargetOpcode::G_SREM*//*Label 5*/ GIMT_Encode4(1097), |
| 686 | /* 34 */ /*TargetOpcode::G_UREM*//*Label 6*/ GIMT_Encode4(1138), GIMT_Encode4(0), GIMT_Encode4(0), |
| 687 | /* 46 */ /*TargetOpcode::G_AND*//*Label 7*/ GIMT_Encode4(1179), |
| 688 | /* 50 */ /*TargetOpcode::G_OR*//*Label 8*/ GIMT_Encode4(1237), |
| 689 | /* 54 */ /*TargetOpcode::G_XOR*//*Label 9*/ GIMT_Encode4(1296), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 690 | /* 122 */ /*TargetOpcode::G_BUILD_VECTOR*//*Label 10*/ GIMT_Encode4(1331), |
| 691 | /* 126 */ /*TargetOpcode::G_BUILD_VECTOR_TRUNC*//*Label 11*/ GIMT_Encode4(1343), GIMT_Encode4(0), |
| 692 | /* 134 */ /*TargetOpcode::G_PTRTOINT*//*Label 12*/ GIMT_Encode4(1355), |
| 693 | /* 138 */ /*TargetOpcode::G_INTTOPTR*//*Label 13*/ GIMT_Encode4(1377), |
| 694 | /* 142 */ /*TargetOpcode::G_BITCAST*//*Label 14*/ GIMT_Encode4(1389), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 695 | /* 186 */ /*TargetOpcode::G_LOAD*//*Label 15*/ GIMT_Encode4(1411), |
| 696 | /* 190 */ /*TargetOpcode::G_SEXTLOAD*//*Label 16*/ GIMT_Encode4(1423), |
| 697 | /* 194 */ /*TargetOpcode::G_ZEXTLOAD*//*Label 17*/ GIMT_Encode4(1435), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 698 | /* 210 */ /*TargetOpcode::G_STORE*//*Label 18*/ GIMT_Encode4(1447), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 699 | /* 346 */ /*TargetOpcode::G_ANYEXT*//*Label 19*/ GIMT_Encode4(1459), |
| 700 | /* 350 */ /*TargetOpcode::G_TRUNC*//*Label 20*/ GIMT_Encode4(1471), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 701 | /* 394 */ /*TargetOpcode::G_SHL*//*Label 21*/ GIMT_Encode4(1494), |
| 702 | /* 398 */ /*TargetOpcode::G_LSHR*//*Label 22*/ GIMT_Encode4(1569), |
| 703 | /* 402 */ /*TargetOpcode::G_ASHR*//*Label 23*/ GIMT_Encode4(1644), GIMT_Encode4(0), GIMT_Encode4(0), |
| 704 | /* 414 */ /*TargetOpcode::G_ROTR*//*Label 24*/ GIMT_Encode4(1719), |
| 705 | /* 418 */ /*TargetOpcode::G_ROTL*//*Label 25*/ GIMT_Encode4(1743), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 706 | /* 438 */ /*TargetOpcode::G_SELECT*//*Label 26*/ GIMT_Encode4(1767), |
| 707 | /* 442 */ /*TargetOpcode::G_UADDO*//*Label 27*/ GIMT_Encode4(1779), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 708 | /* 458 */ /*TargetOpcode::G_SADDO*//*Label 28*/ GIMT_Encode4(1791), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 709 | /* 474 */ /*TargetOpcode::G_UMULO*//*Label 29*/ GIMT_Encode4(1803), |
| 710 | /* 478 */ /*TargetOpcode::G_SMULO*//*Label 30*/ GIMT_Encode4(1815), |
| 711 | /* 482 */ /*TargetOpcode::G_UMULH*//*Label 31*/ GIMT_Encode4(1827), |
| 712 | /* 486 */ /*TargetOpcode::G_SMULH*//*Label 32*/ GIMT_Encode4(1839), |
| 713 | /* 490 */ /*TargetOpcode::G_UADDSAT*//*Label 33*/ GIMT_Encode4(1851), |
| 714 | /* 494 */ /*TargetOpcode::G_SADDSAT*//*Label 34*/ GIMT_Encode4(1863), GIMT_Encode4(0), GIMT_Encode4(0), |
| 715 | /* 506 */ /*TargetOpcode::G_USHLSAT*//*Label 35*/ GIMT_Encode4(1875), |
| 716 | /* 510 */ /*TargetOpcode::G_SSHLSAT*//*Label 36*/ GIMT_Encode4(1887), |
| 717 | /* 514 */ /*TargetOpcode::G_SMULFIX*//*Label 37*/ GIMT_Encode4(1899), |
| 718 | /* 518 */ /*TargetOpcode::G_UMULFIX*//*Label 38*/ GIMT_Encode4(1911), |
| 719 | /* 522 */ /*TargetOpcode::G_SMULFIXSAT*//*Label 39*/ GIMT_Encode4(1923), |
| 720 | /* 526 */ /*TargetOpcode::G_UMULFIXSAT*//*Label 40*/ GIMT_Encode4(1935), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 721 | /* 546 */ /*TargetOpcode::G_FADD*//*Label 41*/ GIMT_Encode4(1947), GIMT_Encode4(0), |
| 722 | /* 554 */ /*TargetOpcode::G_FMUL*//*Label 42*/ GIMT_Encode4(2011), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 723 | /* 618 */ /*TargetOpcode::G_FNEG*//*Label 43*/ GIMT_Encode4(2066), GIMT_Encode4(0), |
| 724 | /* 626 */ /*TargetOpcode::G_FPTRUNC*//*Label 44*/ GIMT_Encode4(2096), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 725 | /* 670 */ /*TargetOpcode::G_FMINNUM*//*Label 45*/ GIMT_Encode4(2118), |
| 726 | /* 674 */ /*TargetOpcode::G_FMAXNUM*//*Label 46*/ GIMT_Encode4(2130), |
| 727 | /* 678 */ /*TargetOpcode::G_FMINNUM_IEEE*//*Label 47*/ GIMT_Encode4(2142), |
| 728 | /* 682 */ /*TargetOpcode::G_FMAXNUM_IEEE*//*Label 48*/ GIMT_Encode4(2154), |
| 729 | /* 686 */ /*TargetOpcode::G_FMINIMUM*//*Label 49*/ GIMT_Encode4(2166), |
| 730 | /* 690 */ /*TargetOpcode::G_FMAXIMUM*//*Label 50*/ GIMT_Encode4(2178), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), |
| 731 | /* 734 */ /*TargetOpcode::G_PTR_ADD*//*Label 51*/ GIMT_Encode4(2190), GIMT_Encode4(0), |
| 732 | /* 742 */ /*TargetOpcode::G_SMIN*//*Label 52*/ GIMT_Encode4(2214), |
| 733 | /* 746 */ /*TargetOpcode::G_SMAX*//*Label 53*/ GIMT_Encode4(2226), |
| 734 | /* 750 */ /*TargetOpcode::G_UMIN*//*Label 54*/ GIMT_Encode4(2238), |
| 735 | /* 754 */ /*TargetOpcode::G_UMAX*//*Label 55*/ GIMT_Encode4(2250), |
| 736 | /* 758 */ // Label 0: @758 |
| 737 | /* 758 */ GIM_Try, /*On fail goto*//*Label 57*/ GIMT_Encode4(769), // Rule ID 50 // |
| 738 | /* 763 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 739 | /* 766 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_ADD' |
| 740 | /* 766 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 741 | /* 769 */ // Label 57: @769 |
| 742 | /* 769 */ GIM_Try, /*On fail goto*//*Label 58*/ GIMT_Encode4(803), // Rule ID 35 // |
| 743 | /* 774 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled), |
| 744 | /* 777 */ // MIs[0] dst |
| 745 | /* 777 */ // No operand predicates |
| 746 | /* 777 */ // MIs[0] __add_sub_reg_match_0.tmp |
| 747 | /* 777 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 748 | /* 781 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
| 749 | /* 785 */ // MIs[1] src |
| 750 | /* 785 */ // No operand predicates |
| 751 | /* 785 */ // MIs[1] __add_sub_reg_match_0.x |
| 752 | /* 785 */ // No operand predicates |
| 753 | /* 785 */ // MIs[0] __add_sub_reg_match_0.x |
| 754 | /* 785 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/1, /*OtherOpIdx*/2, |
| 755 | /* 790 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
| 756 | /* 795 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 757 | /* 797 */ // Combiner Rule #15: add_sub_reg @ [__add_sub_reg_match_0[1]] |
| 758 | /* 797 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
| 759 | /* 802 */ GIR_EraseRootFromParent_Done, |
| 760 | /* 803 */ // Label 58: @803 |
| 761 | /* 803 */ GIM_Try, /*On fail goto*//*Label 59*/ GIMT_Encode4(837), // Rule ID 34 // |
| 762 | /* 808 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule15Enabled), |
| 763 | /* 811 */ // MIs[0] dst |
| 764 | /* 811 */ // No operand predicates |
| 765 | /* 811 */ // MIs[0] __add_sub_reg_match_0.x |
| 766 | /* 811 */ // No operand predicates |
| 767 | /* 811 */ // MIs[0] __add_sub_reg_match_0.tmp |
| 768 | /* 811 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
| 769 | /* 815 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_SUB), |
| 770 | /* 819 */ // MIs[1] src |
| 771 | /* 819 */ // No operand predicates |
| 772 | /* 819 */ // MIs[1] __add_sub_reg_match_0.x |
| 773 | /* 819 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/1, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
| 774 | /* 824 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
| 775 | /* 829 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 776 | /* 831 */ // Combiner Rule #15: add_sub_reg @ [__add_sub_reg_match_0[0]] |
| 777 | /* 831 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
| 778 | /* 836 */ GIR_EraseRootFromParent_Done, |
| 779 | /* 837 */ // Label 59: @837 |
| 780 | /* 837 */ GIM_Try, /*On fail goto*//*Label 60*/ GIMT_Encode4(860), // Rule ID 8 // |
| 781 | /* 842 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 782 | /* 845 */ // MIs[0] dst |
| 783 | /* 845 */ // No operand predicates |
| 784 | /* 845 */ // MIs[0] lhs |
| 785 | /* 845 */ // No operand predicates |
| 786 | /* 845 */ // MIs[0] Operand 2 |
| 787 | /* 845 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 788 | /* 849 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 789 | /* 854 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[1]] |
| 790 | /* 854 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 791 | /* 859 */ GIR_EraseRootFromParent_Done, |
| 792 | /* 860 */ // Label 60: @860 |
| 793 | /* 860 */ GIM_Reject, |
| 794 | /* 861 */ // Label 1: @861 |
| 795 | /* 861 */ GIM_Try, /*On fail goto*//*Label 61*/ GIMT_Encode4(872), // Rule ID 79 // |
| 796 | /* 866 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule27Enabled), |
| 797 | /* 869 */ // Combiner Rule #27: simplify_neg_minmax; wip_match_opcode 'G_SUB' |
| 798 | /* 869 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner15), |
| 799 | /* 872 */ // Label 61: @872 |
| 800 | /* 872 */ GIM_Try, /*On fail goto*//*Label 62*/ GIMT_Encode4(895), // Rule ID 7 // |
| 801 | /* 877 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 802 | /* 880 */ // MIs[0] dst |
| 803 | /* 880 */ // No operand predicates |
| 804 | /* 880 */ // MIs[0] lhs |
| 805 | /* 880 */ // No operand predicates |
| 806 | /* 880 */ // MIs[0] Operand 2 |
| 807 | /* 880 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 808 | /* 884 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 809 | /* 889 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[0]] |
| 810 | /* 889 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 811 | /* 894 */ GIR_EraseRootFromParent_Done, |
| 812 | /* 895 */ // Label 62: @895 |
| 813 | /* 895 */ GIM_Try, /*On fail goto*//*Label 63*/ GIMT_Encode4(916), // Rule ID 0 // |
| 814 | /* 900 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled), |
| 815 | /* 903 */ // MIs[0] d |
| 816 | /* 903 */ // No operand predicates |
| 817 | /* 903 */ // MIs[0] op1 |
| 818 | /* 903 */ // No operand predicates |
| 819 | /* 903 */ // MIs[0] c |
| 820 | /* 903 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/2, // MIs[1] |
| 821 | /* 907 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 822 | /* 911 */ // MIs[1] imm |
| 823 | /* 911 */ // No operand predicates |
| 824 | /* 911 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 825 | /* 913 */ // Combiner Rule #0: sub_to_add |
| 826 | /* 913 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner0), |
| 827 | /* 916 */ // Label 63: @916 |
| 828 | /* 916 */ GIM_Reject, |
| 829 | /* 917 */ // Label 2: @917 |
| 830 | /* 917 */ GIM_Try, /*On fail goto*//*Label 64*/ GIMT_Encode4(928), // Rule ID 51 // |
| 831 | /* 922 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 832 | /* 925 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_MUL' |
| 833 | /* 925 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 834 | /* 928 */ // Label 64: @928 |
| 835 | /* 928 */ GIM_Try, /*On fail goto*//*Label 65*/ GIMT_Encode4(968), // Rule ID 26 // |
| 836 | /* 933 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 837 | /* 936 */ // MIs[0] dst |
| 838 | /* 936 */ // No operand predicates |
| 839 | /* 936 */ // MIs[0] zero |
| 840 | /* 936 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 841 | /* 940 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 842 | /* 944 */ // MIs[1] Operand 1 |
| 843 | /* 944 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 844 | /* 955 */ // MIs[0] rhs |
| 845 | /* 955 */ // No operand predicates |
| 846 | /* 955 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 847 | /* 960 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 848 | /* 962 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[7]] |
| 849 | /* 962 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 850 | /* 967 */ GIR_EraseRootFromParent_Done, |
| 851 | /* 968 */ // Label 65: @968 |
| 852 | /* 968 */ GIM_Try, /*On fail goto*//*Label 66*/ GIMT_Encode4(991), // Rule ID 27 // |
| 853 | /* 973 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled), |
| 854 | /* 976 */ // MIs[0] dst |
| 855 | /* 976 */ // No operand predicates |
| 856 | /* 976 */ // MIs[0] lhs |
| 857 | /* 976 */ // No operand predicates |
| 858 | /* 976 */ // MIs[0] zero |
| 859 | /* 976 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 860 | /* 980 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2, |
| 861 | /* 985 */ // Combiner Rule #8: binop_right_to_zero |
| 862 | /* 985 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/2, |
| 863 | /* 990 */ GIR_EraseRootFromParent_Done, |
| 864 | /* 991 */ // Label 66: @991 |
| 865 | /* 991 */ GIM_Try, /*On fail goto*//*Label 67*/ GIMT_Encode4(1014), // Rule ID 32 // |
| 866 | /* 996 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule13Enabled), |
| 867 | /* 999 */ // MIs[0] dst |
| 868 | /* 999 */ // No operand predicates |
| 869 | /* 999 */ // MIs[0] x |
| 870 | /* 999 */ // No operand predicates |
| 871 | /* 999 */ // MIs[0] Operand 2 |
| 872 | /* 999 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 1, |
| 873 | /* 1003 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 874 | /* 1008 */ // Combiner Rule #13: right_identity_one_int |
| 875 | /* 1008 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 876 | /* 1013 */ GIR_EraseRootFromParent_Done, |
| 877 | /* 1014 */ // Label 67: @1014 |
| 878 | /* 1014 */ GIM_Reject, |
| 879 | /* 1015 */ // Label 3: @1015 |
| 880 | /* 1015 */ GIM_Try, /*On fail goto*//*Label 68*/ GIMT_Encode4(1055), // Rule ID 22 // |
| 881 | /* 1020 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 882 | /* 1023 */ // MIs[0] dst |
| 883 | /* 1023 */ // No operand predicates |
| 884 | /* 1023 */ // MIs[0] zero |
| 885 | /* 1023 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 886 | /* 1027 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 887 | /* 1031 */ // MIs[1] Operand 1 |
| 888 | /* 1031 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 889 | /* 1042 */ // MIs[0] rhs |
| 890 | /* 1042 */ // No operand predicates |
| 891 | /* 1042 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 892 | /* 1047 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 893 | /* 1049 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[3]] |
| 894 | /* 1049 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 895 | /* 1054 */ GIR_EraseRootFromParent_Done, |
| 896 | /* 1055 */ // Label 68: @1055 |
| 897 | /* 1055 */ GIM_Reject, |
| 898 | /* 1056 */ // Label 4: @1056 |
| 899 | /* 1056 */ GIM_Try, /*On fail goto*//*Label 69*/ GIMT_Encode4(1096), // Rule ID 23 // |
| 900 | /* 1061 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 901 | /* 1064 */ // MIs[0] dst |
| 902 | /* 1064 */ // No operand predicates |
| 903 | /* 1064 */ // MIs[0] zero |
| 904 | /* 1064 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 905 | /* 1068 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 906 | /* 1072 */ // MIs[1] Operand 1 |
| 907 | /* 1072 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 908 | /* 1083 */ // MIs[0] rhs |
| 909 | /* 1083 */ // No operand predicates |
| 910 | /* 1083 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 911 | /* 1088 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 912 | /* 1090 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[4]] |
| 913 | /* 1090 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 914 | /* 1095 */ GIR_EraseRootFromParent_Done, |
| 915 | /* 1096 */ // Label 69: @1096 |
| 916 | /* 1096 */ GIM_Reject, |
| 917 | /* 1097 */ // Label 5: @1097 |
| 918 | /* 1097 */ GIM_Try, /*On fail goto*//*Label 70*/ GIMT_Encode4(1137), // Rule ID 24 // |
| 919 | /* 1102 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 920 | /* 1105 */ // MIs[0] dst |
| 921 | /* 1105 */ // No operand predicates |
| 922 | /* 1105 */ // MIs[0] zero |
| 923 | /* 1105 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 924 | /* 1109 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 925 | /* 1113 */ // MIs[1] Operand 1 |
| 926 | /* 1113 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 927 | /* 1124 */ // MIs[0] rhs |
| 928 | /* 1124 */ // No operand predicates |
| 929 | /* 1124 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 930 | /* 1129 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 931 | /* 1131 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[5]] |
| 932 | /* 1131 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 933 | /* 1136 */ GIR_EraseRootFromParent_Done, |
| 934 | /* 1137 */ // Label 70: @1137 |
| 935 | /* 1137 */ GIM_Reject, |
| 936 | /* 1138 */ // Label 6: @1138 |
| 937 | /* 1138 */ GIM_Try, /*On fail goto*//*Label 71*/ GIMT_Encode4(1178), // Rule ID 25 // |
| 938 | /* 1143 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 939 | /* 1146 */ // MIs[0] dst |
| 940 | /* 1146 */ // No operand predicates |
| 941 | /* 1146 */ // MIs[0] zero |
| 942 | /* 1146 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 943 | /* 1150 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 944 | /* 1154 */ // MIs[1] Operand 1 |
| 945 | /* 1154 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 946 | /* 1165 */ // MIs[0] rhs |
| 947 | /* 1165 */ // No operand predicates |
| 948 | /* 1165 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 949 | /* 1170 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 950 | /* 1172 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[6]] |
| 951 | /* 1172 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 952 | /* 1177 */ GIR_EraseRootFromParent_Done, |
| 953 | /* 1178 */ // Label 71: @1178 |
| 954 | /* 1178 */ GIM_Reject, |
| 955 | /* 1179 */ // Label 7: @1179 |
| 956 | /* 1179 */ GIM_Try, /*On fail goto*//*Label 72*/ GIMT_Encode4(1190), // Rule ID 4 // |
| 957 | /* 1184 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled), |
| 958 | /* 1187 */ // Combiner Rule #2: load_and_mask; wip_match_opcode 'G_AND' |
| 959 | /* 1187 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner2), |
| 960 | /* 1190 */ // Label 72: @1190 |
| 961 | /* 1190 */ GIM_Try, /*On fail goto*//*Label 73*/ GIMT_Encode4(1201), // Rule ID 5 // |
| 962 | /* 1195 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled), |
| 963 | /* 1198 */ // Combiner Rule #3: redundant_and; wip_match_opcode 'G_AND' |
| 964 | /* 1198 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner3), |
| 965 | /* 1201 */ // Label 73: @1201 |
| 966 | /* 1201 */ GIM_Try, /*On fail goto*//*Label 74*/ GIMT_Encode4(1212), // Rule ID 52 // |
| 967 | /* 1206 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 968 | /* 1209 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_AND' |
| 969 | /* 1209 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 970 | /* 1212 */ // Label 74: @1212 |
| 971 | /* 1212 */ GIM_Try, /*On fail goto*//*Label 75*/ GIMT_Encode4(1236), // Rule ID 17 // |
| 972 | /* 1217 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled), |
| 973 | /* 1220 */ // MIs[0] dst |
| 974 | /* 1220 */ // No operand predicates |
| 975 | /* 1220 */ // MIs[0] src |
| 976 | /* 1220 */ // No operand predicates |
| 977 | /* 1220 */ // MIs[0] src |
| 978 | /* 1220 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
| 979 | /* 1225 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 980 | /* 1230 */ // Combiner Rule #6: binop_same_val @ [__binop_same_val_match_0[0]] |
| 981 | /* 1230 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 982 | /* 1235 */ GIR_EraseRootFromParent_Done, |
| 983 | /* 1236 */ // Label 75: @1236 |
| 984 | /* 1236 */ GIM_Reject, |
| 985 | /* 1237 */ // Label 8: @1237 |
| 986 | /* 1237 */ GIM_Try, /*On fail goto*//*Label 76*/ GIMT_Encode4(1248), // Rule ID 53 // |
| 987 | /* 1242 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 988 | /* 1245 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_OR' |
| 989 | /* 1245 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 990 | /* 1248 */ // Label 76: @1248 |
| 991 | /* 1248 */ GIM_Try, /*On fail goto*//*Label 77*/ GIMT_Encode4(1272), // Rule ID 18 // |
| 992 | /* 1253 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled), |
| 993 | /* 1256 */ // MIs[0] dst |
| 994 | /* 1256 */ // No operand predicates |
| 995 | /* 1256 */ // MIs[0] src |
| 996 | /* 1256 */ // No operand predicates |
| 997 | /* 1256 */ // MIs[0] src |
| 998 | /* 1256 */ GIM_CheckIsSameOperandIgnoreCopies, /*MI*/0, /*OpIdx*/2, /*OtherMI*/0, /*OtherOpIdx*/1, |
| 999 | /* 1261 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1000 | /* 1266 */ // Combiner Rule #6: binop_same_val @ [__binop_same_val_match_0[1]] |
| 1001 | /* 1266 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1002 | /* 1271 */ GIR_EraseRootFromParent_Done, |
| 1003 | /* 1272 */ // Label 77: @1272 |
| 1004 | /* 1272 */ GIM_Try, /*On fail goto*//*Label 78*/ GIMT_Encode4(1295), // Rule ID 9 // |
| 1005 | /* 1277 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1006 | /* 1280 */ // MIs[0] dst |
| 1007 | /* 1280 */ // No operand predicates |
| 1008 | /* 1280 */ // MIs[0] lhs |
| 1009 | /* 1280 */ // No operand predicates |
| 1010 | /* 1280 */ // MIs[0] Operand 2 |
| 1011 | /* 1280 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1012 | /* 1284 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1013 | /* 1289 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[2]] |
| 1014 | /* 1289 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1015 | /* 1294 */ GIR_EraseRootFromParent_Done, |
| 1016 | /* 1295 */ // Label 78: @1295 |
| 1017 | /* 1295 */ GIM_Reject, |
| 1018 | /* 1296 */ // Label 9: @1296 |
| 1019 | /* 1296 */ GIM_Try, /*On fail goto*//*Label 79*/ GIMT_Encode4(1307), // Rule ID 54 // |
| 1020 | /* 1301 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1021 | /* 1304 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_XOR' |
| 1022 | /* 1304 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1023 | /* 1307 */ // Label 79: @1307 |
| 1024 | /* 1307 */ GIM_Try, /*On fail goto*//*Label 80*/ GIMT_Encode4(1330), // Rule ID 10 // |
| 1025 | /* 1312 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1026 | /* 1315 */ // MIs[0] dst |
| 1027 | /* 1315 */ // No operand predicates |
| 1028 | /* 1315 */ // MIs[0] lhs |
| 1029 | /* 1315 */ // No operand predicates |
| 1030 | /* 1315 */ // MIs[0] Operand 2 |
| 1031 | /* 1315 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1032 | /* 1319 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1033 | /* 1324 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[3]] |
| 1034 | /* 1324 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1035 | /* 1329 */ GIR_EraseRootFromParent_Done, |
| 1036 | /* 1330 */ // Label 80: @1330 |
| 1037 | /* 1330 */ GIM_Reject, |
| 1038 | /* 1331 */ // Label 10: @1331 |
| 1039 | /* 1331 */ GIM_Try, /*On fail goto*//*Label 81*/ GIMT_Encode4(1342), // Rule ID 37 // |
| 1040 | /* 1336 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled), |
| 1041 | /* 1339 */ // Combiner Rule #16: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR' |
| 1042 | /* 1339 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8), |
| 1043 | /* 1342 */ // Label 81: @1342 |
| 1044 | /* 1342 */ GIM_Reject, |
| 1045 | /* 1343 */ // Label 11: @1343 |
| 1046 | /* 1343 */ GIM_Try, /*On fail goto*//*Label 82*/ GIMT_Encode4(1354), // Rule ID 36 // |
| 1047 | /* 1348 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule16Enabled), |
| 1048 | /* 1351 */ // Combiner Rule #16: buildvector_identity_fold; wip_match_opcode 'G_BUILD_VECTOR_TRUNC' |
| 1049 | /* 1351 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner8), |
| 1050 | /* 1354 */ // Label 82: @1354 |
| 1051 | /* 1354 */ GIM_Reject, |
| 1052 | /* 1355 */ // Label 12: @1355 |
| 1053 | /* 1355 */ GIM_Try, /*On fail goto*//*Label 83*/ GIMT_Encode4(1376), // Rule ID 29 // |
| 1054 | /* 1360 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled), |
| 1055 | /* 1363 */ // MIs[0] dst |
| 1056 | /* 1363 */ // No operand predicates |
| 1057 | /* 1363 */ // MIs[0] t |
| 1058 | /* 1363 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 1059 | /* 1367 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_INTTOPTR), |
| 1060 | /* 1371 */ // MIs[1] ptr |
| 1061 | /* 1371 */ // No operand predicates |
| 1062 | /* 1371 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 1063 | /* 1373 */ // Combiner Rule #10: i2p_to_p2i |
| 1064 | /* 1373 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner6), |
| 1065 | /* 1376 */ // Label 83: @1376 |
| 1066 | /* 1376 */ GIM_Reject, |
| 1067 | /* 1377 */ // Label 13: @1377 |
| 1068 | /* 1377 */ GIM_Try, /*On fail goto*//*Label 84*/ GIMT_Encode4(1388), // Rule ID 28 // |
| 1069 | /* 1382 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled), |
| 1070 | /* 1385 */ // Combiner Rule #9: p2i_to_i2p; wip_match_opcode 'G_INTTOPTR' |
| 1071 | /* 1385 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner5), |
| 1072 | /* 1388 */ // Label 84: @1388 |
| 1073 | /* 1388 */ GIM_Reject, |
| 1074 | /* 1389 */ // Label 14: @1389 |
| 1075 | /* 1389 */ GIM_Try, /*On fail goto*//*Label 85*/ GIMT_Encode4(1410), // Rule ID 40 // |
| 1076 | /* 1394 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule19Enabled), |
| 1077 | /* 1397 */ // MIs[0] dst |
| 1078 | /* 1397 */ // No operand predicates |
| 1079 | /* 1397 */ // MIs[0] src1 |
| 1080 | /* 1397 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 1081 | /* 1401 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_BITCAST), |
| 1082 | /* 1405 */ // MIs[1] src0 |
| 1083 | /* 1405 */ // No operand predicates |
| 1084 | /* 1405 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 1085 | /* 1407 */ // Combiner Rule #19: bitcast_bitcast_fold |
| 1086 | /* 1407 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11), |
| 1087 | /* 1410 */ // Label 85: @1410 |
| 1088 | /* 1410 */ GIM_Reject, |
| 1089 | /* 1411 */ // Label 15: @1411 |
| 1090 | /* 1411 */ GIM_Try, /*On fail goto*//*Label 86*/ GIMT_Encode4(1422), // Rule ID 1 // |
| 1091 | /* 1416 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled), |
| 1092 | /* 1419 */ // Combiner Rule #1: extending_loads; wip_match_opcode 'G_LOAD' |
| 1093 | /* 1419 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1), |
| 1094 | /* 1422 */ // Label 86: @1422 |
| 1095 | /* 1422 */ GIM_Reject, |
| 1096 | /* 1423 */ // Label 16: @1423 |
| 1097 | /* 1423 */ GIM_Try, /*On fail goto*//*Label 87*/ GIMT_Encode4(1434), // Rule ID 2 // |
| 1098 | /* 1428 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled), |
| 1099 | /* 1431 */ // Combiner Rule #1: extending_loads; wip_match_opcode 'G_SEXTLOAD' |
| 1100 | /* 1431 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1), |
| 1101 | /* 1434 */ // Label 87: @1434 |
| 1102 | /* 1434 */ GIM_Reject, |
| 1103 | /* 1435 */ // Label 17: @1435 |
| 1104 | /* 1435 */ GIM_Try, /*On fail goto*//*Label 88*/ GIMT_Encode4(1446), // Rule ID 3 // |
| 1105 | /* 1440 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled), |
| 1106 | /* 1443 */ // Combiner Rule #1: extending_loads; wip_match_opcode 'G_ZEXTLOAD' |
| 1107 | /* 1443 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner1), |
| 1108 | /* 1446 */ // Label 88: @1446 |
| 1109 | /* 1446 */ GIM_Reject, |
| 1110 | /* 1447 */ // Label 18: @1447 |
| 1111 | /* 1447 */ GIM_Try, /*On fail goto*//*Label 89*/ GIMT_Encode4(1458), // Rule ID 80 // |
| 1112 | /* 1452 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule28Enabled), |
| 1113 | /* 1455 */ // MIs[0] src |
| 1114 | /* 1455 */ // No operand predicates |
| 1115 | /* 1455 */ // MIs[0] addr |
| 1116 | /* 1455 */ // No operand predicates |
| 1117 | /* 1455 */ // Combiner Rule #28: fold_fp_zero_store |
| 1118 | /* 1455 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner16), |
| 1119 | /* 1458 */ // Label 89: @1458 |
| 1120 | /* 1458 */ GIM_Reject, |
| 1121 | /* 1459 */ // Label 19: @1459 |
| 1122 | /* 1459 */ GIM_Try, /*On fail goto*//*Label 90*/ GIMT_Encode4(1470), // Rule ID 30 // |
| 1123 | /* 1464 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule11Enabled), |
| 1124 | /* 1467 */ // Combiner Rule #11: anyext_trunc_fold; wip_match_opcode 'G_ANYEXT' |
| 1125 | /* 1467 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner7), |
| 1126 | /* 1470 */ // Label 90: @1470 |
| 1127 | /* 1470 */ GIM_Reject, |
| 1128 | /* 1471 */ // Label 20: @1471 |
| 1129 | /* 1471 */ GIM_Try, /*On fail goto*//*Label 91*/ GIMT_Encode4(1482), // Rule ID 38 // |
| 1130 | /* 1476 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule17Enabled), |
| 1131 | /* 1479 */ // Combiner Rule #17: trunc_buildvector_fold; wip_match_opcode 'G_TRUNC' |
| 1132 | /* 1479 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner9), |
| 1133 | /* 1482 */ // Label 91: @1482 |
| 1134 | /* 1482 */ GIM_Try, /*On fail goto*//*Label 92*/ GIMT_Encode4(1493), // Rule ID 39 // |
| 1135 | /* 1487 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule18Enabled), |
| 1136 | /* 1490 */ // Combiner Rule #18: trunc_lshr_buildvector_fold; wip_match_opcode 'G_TRUNC' |
| 1137 | /* 1490 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner10), |
| 1138 | /* 1493 */ // Label 92: @1493 |
| 1139 | /* 1493 */ GIM_Reject, |
| 1140 | /* 1494 */ // Label 21: @1494 |
| 1141 | /* 1494 */ GIM_Try, /*On fail goto*//*Label 93*/ GIMT_Encode4(1505), // Rule ID 45 // |
| 1142 | /* 1499 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
| 1143 | /* 1502 */ // Combiner Rule #24: shift_immed_chain; wip_match_opcode 'G_SHL' |
| 1144 | /* 1502 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12), |
| 1145 | /* 1505 */ // Label 93: @1505 |
| 1146 | /* 1505 */ GIM_Try, /*On fail goto*//*Label 94*/ GIMT_Encode4(1545), // Rule ID 19 // |
| 1147 | /* 1510 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 1148 | /* 1513 */ // MIs[0] dst |
| 1149 | /* 1513 */ // No operand predicates |
| 1150 | /* 1513 */ // MIs[0] zero |
| 1151 | /* 1513 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 1152 | /* 1517 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 1153 | /* 1521 */ // MIs[1] Operand 1 |
| 1154 | /* 1521 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 1155 | /* 1532 */ // MIs[0] rhs |
| 1156 | /* 1532 */ // No operand predicates |
| 1157 | /* 1532 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1158 | /* 1537 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 1159 | /* 1539 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[0]] |
| 1160 | /* 1539 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1161 | /* 1544 */ GIR_EraseRootFromParent_Done, |
| 1162 | /* 1545 */ // Label 94: @1545 |
| 1163 | /* 1545 */ GIM_Try, /*On fail goto*//*Label 95*/ GIMT_Encode4(1568), // Rule ID 11 // |
| 1164 | /* 1550 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1165 | /* 1553 */ // MIs[0] dst |
| 1166 | /* 1553 */ // No operand predicates |
| 1167 | /* 1553 */ // MIs[0] lhs |
| 1168 | /* 1553 */ // No operand predicates |
| 1169 | /* 1553 */ // MIs[0] Operand 2 |
| 1170 | /* 1553 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1171 | /* 1557 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1172 | /* 1562 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[4]] |
| 1173 | /* 1562 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1174 | /* 1567 */ GIR_EraseRootFromParent_Done, |
| 1175 | /* 1568 */ // Label 95: @1568 |
| 1176 | /* 1568 */ GIM_Reject, |
| 1177 | /* 1569 */ // Label 22: @1569 |
| 1178 | /* 1569 */ GIM_Try, /*On fail goto*//*Label 96*/ GIMT_Encode4(1580), // Rule ID 47 // |
| 1179 | /* 1574 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
| 1180 | /* 1577 */ // Combiner Rule #24: shift_immed_chain; wip_match_opcode 'G_LSHR' |
| 1181 | /* 1577 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12), |
| 1182 | /* 1580 */ // Label 96: @1580 |
| 1183 | /* 1580 */ GIM_Try, /*On fail goto*//*Label 97*/ GIMT_Encode4(1620), // Rule ID 20 // |
| 1184 | /* 1585 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 1185 | /* 1588 */ // MIs[0] dst |
| 1186 | /* 1588 */ // No operand predicates |
| 1187 | /* 1588 */ // MIs[0] zero |
| 1188 | /* 1588 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 1189 | /* 1592 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 1190 | /* 1596 */ // MIs[1] Operand 1 |
| 1191 | /* 1596 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 1192 | /* 1607 */ // MIs[0] rhs |
| 1193 | /* 1607 */ // No operand predicates |
| 1194 | /* 1607 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1195 | /* 1612 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 1196 | /* 1614 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[1]] |
| 1197 | /* 1614 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1198 | /* 1619 */ GIR_EraseRootFromParent_Done, |
| 1199 | /* 1620 */ // Label 97: @1620 |
| 1200 | /* 1620 */ GIM_Try, /*On fail goto*//*Label 98*/ GIMT_Encode4(1643), // Rule ID 13 // |
| 1201 | /* 1625 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1202 | /* 1628 */ // MIs[0] dst |
| 1203 | /* 1628 */ // No operand predicates |
| 1204 | /* 1628 */ // MIs[0] lhs |
| 1205 | /* 1628 */ // No operand predicates |
| 1206 | /* 1628 */ // MIs[0] Operand 2 |
| 1207 | /* 1628 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1208 | /* 1632 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1209 | /* 1637 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[6]] |
| 1210 | /* 1637 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1211 | /* 1642 */ GIR_EraseRootFromParent_Done, |
| 1212 | /* 1643 */ // Label 98: @1643 |
| 1213 | /* 1643 */ GIM_Reject, |
| 1214 | /* 1644 */ // Label 23: @1644 |
| 1215 | /* 1644 */ GIM_Try, /*On fail goto*//*Label 99*/ GIMT_Encode4(1655), // Rule ID 46 // |
| 1216 | /* 1649 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
| 1217 | /* 1652 */ // Combiner Rule #24: shift_immed_chain; wip_match_opcode 'G_ASHR' |
| 1218 | /* 1652 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12), |
| 1219 | /* 1655 */ // Label 99: @1655 |
| 1220 | /* 1655 */ GIM_Try, /*On fail goto*//*Label 100*/ GIMT_Encode4(1695), // Rule ID 21 // |
| 1221 | /* 1660 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled), |
| 1222 | /* 1663 */ // MIs[0] dst |
| 1223 | /* 1663 */ // No operand predicates |
| 1224 | /* 1663 */ // MIs[0] zero |
| 1225 | /* 1663 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 1226 | /* 1667 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_CONSTANT), |
| 1227 | /* 1671 */ // MIs[1] Operand 1 |
| 1228 | /* 1671 */ GIM_CheckLiteralInt, /*MI*/1, /*Op*/1, GIMT_Encode8(0), |
| 1229 | /* 1682 */ // MIs[0] rhs |
| 1230 | /* 1682 */ // No operand predicates |
| 1231 | /* 1682 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1232 | /* 1687 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 1233 | /* 1689 */ // Combiner Rule #7: binop_left_to_zero @ [__binop_left_to_zero_match_0[2]] |
| 1234 | /* 1689 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1235 | /* 1694 */ GIR_EraseRootFromParent_Done, |
| 1236 | /* 1695 */ // Label 100: @1695 |
| 1237 | /* 1695 */ GIM_Try, /*On fail goto*//*Label 101*/ GIMT_Encode4(1718), // Rule ID 12 // |
| 1238 | /* 1700 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1239 | /* 1703 */ // MIs[0] dst |
| 1240 | /* 1703 */ // No operand predicates |
| 1241 | /* 1703 */ // MIs[0] lhs |
| 1242 | /* 1703 */ // No operand predicates |
| 1243 | /* 1703 */ // MIs[0] Operand 2 |
| 1244 | /* 1703 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1245 | /* 1707 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1246 | /* 1712 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[5]] |
| 1247 | /* 1712 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1248 | /* 1717 */ GIR_EraseRootFromParent_Done, |
| 1249 | /* 1718 */ // Label 101: @1718 |
| 1250 | /* 1718 */ GIM_Reject, |
| 1251 | /* 1719 */ // Label 24: @1719 |
| 1252 | /* 1719 */ GIM_Try, /*On fail goto*//*Label 102*/ GIMT_Encode4(1742), // Rule ID 16 // |
| 1253 | /* 1724 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1254 | /* 1727 */ // MIs[0] dst |
| 1255 | /* 1727 */ // No operand predicates |
| 1256 | /* 1727 */ // MIs[0] lhs |
| 1257 | /* 1727 */ // No operand predicates |
| 1258 | /* 1727 */ // MIs[0] Operand 2 |
| 1259 | /* 1727 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1260 | /* 1731 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1261 | /* 1736 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[9]] |
| 1262 | /* 1736 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1263 | /* 1741 */ GIR_EraseRootFromParent_Done, |
| 1264 | /* 1742 */ // Label 102: @1742 |
| 1265 | /* 1742 */ GIM_Reject, |
| 1266 | /* 1743 */ // Label 25: @1743 |
| 1267 | /* 1743 */ GIM_Try, /*On fail goto*//*Label 103*/ GIMT_Encode4(1766), // Rule ID 15 // |
| 1268 | /* 1748 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1269 | /* 1751 */ // MIs[0] dst |
| 1270 | /* 1751 */ // No operand predicates |
| 1271 | /* 1751 */ // MIs[0] lhs |
| 1272 | /* 1751 */ // No operand predicates |
| 1273 | /* 1751 */ // MIs[0] Operand 2 |
| 1274 | /* 1751 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1275 | /* 1755 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1276 | /* 1760 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[8]] |
| 1277 | /* 1760 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1278 | /* 1765 */ GIR_EraseRootFromParent_Done, |
| 1279 | /* 1766 */ // Label 103: @1766 |
| 1280 | /* 1766 */ GIM_Reject, |
| 1281 | /* 1767 */ // Label 26: @1767 |
| 1282 | /* 1767 */ GIM_Try, /*On fail goto*//*Label 104*/ GIMT_Encode4(1778), // Rule ID 6 // |
| 1283 | /* 1772 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled), |
| 1284 | /* 1775 */ // Combiner Rule #4: select_same_val; wip_match_opcode 'G_SELECT' |
| 1285 | /* 1775 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner4), |
| 1286 | /* 1778 */ // Label 104: @1778 |
| 1287 | /* 1778 */ GIM_Reject, |
| 1288 | /* 1779 */ // Label 27: @1779 |
| 1289 | /* 1779 */ GIM_Try, /*On fail goto*//*Label 105*/ GIMT_Encode4(1790), // Rule ID 59 // |
| 1290 | /* 1784 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1291 | /* 1787 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDO' |
| 1292 | /* 1787 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1293 | /* 1790 */ // Label 105: @1790 |
| 1294 | /* 1790 */ GIM_Reject, |
| 1295 | /* 1791 */ // Label 28: @1791 |
| 1296 | /* 1791 */ GIM_Try, /*On fail goto*//*Label 106*/ GIMT_Encode4(1802), // Rule ID 60 // |
| 1297 | /* 1796 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1298 | /* 1799 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDO' |
| 1299 | /* 1799 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1300 | /* 1802 */ // Label 106: @1802 |
| 1301 | /* 1802 */ GIM_Reject, |
| 1302 | /* 1803 */ // Label 29: @1803 |
| 1303 | /* 1803 */ GIM_Try, /*On fail goto*//*Label 107*/ GIMT_Encode4(1814), // Rule ID 61 // |
| 1304 | /* 1808 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1305 | /* 1811 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULO' |
| 1306 | /* 1811 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1307 | /* 1814 */ // Label 107: @1814 |
| 1308 | /* 1814 */ GIM_Reject, |
| 1309 | /* 1815 */ // Label 30: @1815 |
| 1310 | /* 1815 */ GIM_Try, /*On fail goto*//*Label 108*/ GIMT_Encode4(1826), // Rule ID 62 // |
| 1311 | /* 1820 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1312 | /* 1823 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULO' |
| 1313 | /* 1823 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1314 | /* 1826 */ // Label 108: @1826 |
| 1315 | /* 1826 */ GIM_Reject, |
| 1316 | /* 1827 */ // Label 31: @1827 |
| 1317 | /* 1827 */ GIM_Try, /*On fail goto*//*Label 109*/ GIMT_Encode4(1838), // Rule ID 63 // |
| 1318 | /* 1832 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1319 | /* 1835 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULH' |
| 1320 | /* 1835 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1321 | /* 1838 */ // Label 109: @1838 |
| 1322 | /* 1838 */ GIM_Reject, |
| 1323 | /* 1839 */ // Label 32: @1839 |
| 1324 | /* 1839 */ GIM_Try, /*On fail goto*//*Label 110*/ GIMT_Encode4(1850), // Rule ID 64 // |
| 1325 | /* 1844 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1326 | /* 1847 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULH' |
| 1327 | /* 1847 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1328 | /* 1850 */ // Label 110: @1850 |
| 1329 | /* 1850 */ GIM_Reject, |
| 1330 | /* 1851 */ // Label 33: @1851 |
| 1331 | /* 1851 */ GIM_Try, /*On fail goto*//*Label 111*/ GIMT_Encode4(1862), // Rule ID 65 // |
| 1332 | /* 1856 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1333 | /* 1859 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UADDSAT' |
| 1334 | /* 1859 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1335 | /* 1862 */ // Label 111: @1862 |
| 1336 | /* 1862 */ GIM_Reject, |
| 1337 | /* 1863 */ // Label 34: @1863 |
| 1338 | /* 1863 */ GIM_Try, /*On fail goto*//*Label 112*/ GIMT_Encode4(1874), // Rule ID 66 // |
| 1339 | /* 1868 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1340 | /* 1871 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SADDSAT' |
| 1341 | /* 1871 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1342 | /* 1874 */ // Label 112: @1874 |
| 1343 | /* 1874 */ GIM_Reject, |
| 1344 | /* 1875 */ // Label 35: @1875 |
| 1345 | /* 1875 */ GIM_Try, /*On fail goto*//*Label 113*/ GIMT_Encode4(1886), // Rule ID 49 // |
| 1346 | /* 1880 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
| 1347 | /* 1883 */ // Combiner Rule #24: shift_immed_chain; wip_match_opcode 'G_USHLSAT' |
| 1348 | /* 1883 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12), |
| 1349 | /* 1886 */ // Label 113: @1886 |
| 1350 | /* 1886 */ GIM_Reject, |
| 1351 | /* 1887 */ // Label 36: @1887 |
| 1352 | /* 1887 */ GIM_Try, /*On fail goto*//*Label 114*/ GIMT_Encode4(1898), // Rule ID 48 // |
| 1353 | /* 1892 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule24Enabled), |
| 1354 | /* 1895 */ // Combiner Rule #24: shift_immed_chain; wip_match_opcode 'G_SSHLSAT' |
| 1355 | /* 1895 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner12), |
| 1356 | /* 1898 */ // Label 114: @1898 |
| 1357 | /* 1898 */ GIM_Reject, |
| 1358 | /* 1899 */ // Label 37: @1899 |
| 1359 | /* 1899 */ GIM_Try, /*On fail goto*//*Label 115*/ GIMT_Encode4(1910), // Rule ID 67 // |
| 1360 | /* 1904 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1361 | /* 1907 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIX' |
| 1362 | /* 1907 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1363 | /* 1910 */ // Label 115: @1910 |
| 1364 | /* 1910 */ GIM_Reject, |
| 1365 | /* 1911 */ // Label 38: @1911 |
| 1366 | /* 1911 */ GIM_Try, /*On fail goto*//*Label 116*/ GIMT_Encode4(1922), // Rule ID 68 // |
| 1367 | /* 1916 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1368 | /* 1919 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIX' |
| 1369 | /* 1919 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1370 | /* 1922 */ // Label 116: @1922 |
| 1371 | /* 1922 */ GIM_Reject, |
| 1372 | /* 1923 */ // Label 39: @1923 |
| 1373 | /* 1923 */ GIM_Try, /*On fail goto*//*Label 117*/ GIMT_Encode4(1934), // Rule ID 69 // |
| 1374 | /* 1928 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1375 | /* 1931 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SMULFIXSAT' |
| 1376 | /* 1931 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1377 | /* 1934 */ // Label 117: @1934 |
| 1378 | /* 1934 */ GIM_Reject, |
| 1379 | /* 1935 */ // Label 40: @1935 |
| 1380 | /* 1935 */ GIM_Try, /*On fail goto*//*Label 118*/ GIMT_Encode4(1946), // Rule ID 70 // |
| 1381 | /* 1940 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1382 | /* 1943 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UMULFIXSAT' |
| 1383 | /* 1943 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1384 | /* 1946 */ // Label 118: @1946 |
| 1385 | /* 1946 */ GIM_Reject, |
| 1386 | /* 1947 */ // Label 41: @1947 |
| 1387 | /* 1947 */ GIM_Try, /*On fail goto*//*Label 119*/ GIMT_Encode4(1958), // Rule ID 71 // |
| 1388 | /* 1952 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1389 | /* 1955 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FADD' |
| 1390 | /* 1955 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1391 | /* 1958 */ // Label 119: @1958 |
| 1392 | /* 1958 */ GIM_Try, /*On fail goto*//*Label 120*/ GIMT_Encode4(1981), // Rule ID 42 // |
| 1393 | /* 1963 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule21Enabled), |
| 1394 | /* 1966 */ // MIs[0] dst |
| 1395 | /* 1966 */ // No operand predicates |
| 1396 | /* 1966 */ // MIs[0] x |
| 1397 | /* 1966 */ // No operand predicates |
| 1398 | /* 1966 */ // MIs[0] y |
| 1399 | /* 1966 */ // No operand predicates |
| 1400 | /* 1966 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner1), |
| 1401 | /* 1970 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1402 | /* 1975 */ // Combiner Rule #21: right_identity_neg_zero_fp |
| 1403 | /* 1975 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1404 | /* 1980 */ GIR_EraseRootFromParent_Done, |
| 1405 | /* 1981 */ // Label 120: @1981 |
| 1406 | /* 1981 */ GIM_Try, /*On fail goto*//*Label 121*/ GIMT_Encode4(2010), // Rule ID 43 // |
| 1407 | /* 1986 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule22Enabled), |
| 1408 | /* 1989 */ GIM_MIFlags, /*MI*/0, GIMT_Encode4(MachineInstr::FmNsz), |
| 1409 | /* 1995 */ // MIs[0] dst |
| 1410 | /* 1995 */ // No operand predicates |
| 1411 | /* 1995 */ // MIs[0] x |
| 1412 | /* 1995 */ // No operand predicates |
| 1413 | /* 1995 */ // MIs[0] y |
| 1414 | /* 1995 */ // No operand predicates |
| 1415 | /* 1995 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner2), |
| 1416 | /* 1999 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1417 | /* 2004 */ // Combiner Rule #22: right_identity_neg_zero_fp_nsz |
| 1418 | /* 2004 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1419 | /* 2009 */ GIR_EraseRootFromParent_Done, |
| 1420 | /* 2010 */ // Label 121: @2010 |
| 1421 | /* 2010 */ GIM_Reject, |
| 1422 | /* 2011 */ // Label 42: @2011 |
| 1423 | /* 2011 */ GIM_Try, /*On fail goto*//*Label 122*/ GIMT_Encode4(2022), // Rule ID 72 // |
| 1424 | /* 2016 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1425 | /* 2019 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMUL' |
| 1426 | /* 2019 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1427 | /* 2022 */ // Label 122: @2022 |
| 1428 | /* 2022 */ GIM_Try, /*On fail goto*//*Label 123*/ GIMT_Encode4(2045), // Rule ID 33 // |
| 1429 | /* 2027 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule14Enabled), |
| 1430 | /* 2030 */ // MIs[0] dst |
| 1431 | /* 2030 */ // No operand predicates |
| 1432 | /* 2030 */ // MIs[0] x |
| 1433 | /* 2030 */ // No operand predicates |
| 1434 | /* 2030 */ // MIs[0] y |
| 1435 | /* 2030 */ // No operand predicates |
| 1436 | /* 2030 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner0), |
| 1437 | /* 2034 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1438 | /* 2039 */ // Combiner Rule #14: right_identity_one_fp |
| 1439 | /* 2039 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1440 | /* 2044 */ GIR_EraseRootFromParent_Done, |
| 1441 | /* 2045 */ // Label 123: @2045 |
| 1442 | /* 2045 */ GIM_Try, /*On fail goto*//*Label 124*/ GIMT_Encode4(2065), // Rule ID 44 // |
| 1443 | /* 2050 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule23Enabled), |
| 1444 | /* 2053 */ // MIs[0] dst |
| 1445 | /* 2053 */ // No operand predicates |
| 1446 | /* 2053 */ // MIs[0] x |
| 1447 | /* 2053 */ // No operand predicates |
| 1448 | /* 2053 */ // MIs[0] y |
| 1449 | /* 2053 */ // No operand predicates |
| 1450 | /* 2053 */ GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_GICombiner3), |
| 1451 | /* 2057 */ // Combiner Rule #23: right_identity_neg_one_fp |
| 1452 | /* 2057 */ GIR_BuildRootMI, /*Opcode*/GIMT_Encode2(TargetOpcode::G_FNEG), |
| 1453 | /* 2060 */ GIR_RootToRootCopy, /*OpIdx*/0, // dst |
| 1454 | /* 2062 */ GIR_RootToRootCopy, /*OpIdx*/1, // x |
| 1455 | /* 2064 */ GIR_EraseRootFromParent_Done, |
| 1456 | /* 2065 */ // Label 124: @2065 |
| 1457 | /* 2065 */ GIM_Reject, |
| 1458 | /* 2066 */ // Label 43: @2066 |
| 1459 | /* 2066 */ GIM_Try, /*On fail goto*//*Label 125*/ GIMT_Encode4(2095), // Rule ID 31 // |
| 1460 | /* 2071 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule12Enabled), |
| 1461 | /* 2074 */ // MIs[0] dst |
| 1462 | /* 2074 */ // No operand predicates |
| 1463 | /* 2074 */ // MIs[0] t |
| 1464 | /* 2074 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 1465 | /* 2078 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FNEG), |
| 1466 | /* 2082 */ // MIs[1] src |
| 1467 | /* 2082 */ // No operand predicates |
| 1468 | /* 2082 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
| 1469 | /* 2087 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 1470 | /* 2089 */ // Combiner Rule #12: fneg_fneg_fold |
| 1471 | /* 2089 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/1, /*NewOpIdx*/1, |
| 1472 | /* 2094 */ GIR_EraseRootFromParent_Done, |
| 1473 | /* 2095 */ // Label 125: @2095 |
| 1474 | /* 2095 */ GIM_Reject, |
| 1475 | /* 2096 */ // Label 44: @2096 |
| 1476 | /* 2096 */ GIM_Try, /*On fail goto*//*Label 126*/ GIMT_Encode4(2117), // Rule ID 41 // |
| 1477 | /* 2101 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule20Enabled), |
| 1478 | /* 2104 */ // MIs[0] dst |
| 1479 | /* 2104 */ // No operand predicates |
| 1480 | /* 2104 */ // MIs[0] src1 |
| 1481 | /* 2104 */ GIM_RecordInsnIgnoreCopies, /*DefineMI*/1, /*MI*/0, /*OpIdx*/1, // MIs[1] |
| 1482 | /* 2108 */ GIM_CheckOpcode, /*MI*/1, GIMT_Encode2(TargetOpcode::G_FPEXT), |
| 1483 | /* 2112 */ // MIs[1] src0 |
| 1484 | /* 2112 */ // No operand predicates |
| 1485 | /* 2112 */ GIM_CheckIsSafeToFold, /*NumInsns*/1, |
| 1486 | /* 2114 */ // Combiner Rule #20: fptrunc_fpext_fold |
| 1487 | /* 2114 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner11), |
| 1488 | /* 2117 */ // Label 126: @2117 |
| 1489 | /* 2117 */ GIM_Reject, |
| 1490 | /* 2118 */ // Label 45: @2118 |
| 1491 | /* 2118 */ GIM_Try, /*On fail goto*//*Label 127*/ GIMT_Encode4(2129), // Rule ID 73 // |
| 1492 | /* 2123 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1493 | /* 2126 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM' |
| 1494 | /* 2126 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1495 | /* 2129 */ // Label 127: @2129 |
| 1496 | /* 2129 */ GIM_Reject, |
| 1497 | /* 2130 */ // Label 46: @2130 |
| 1498 | /* 2130 */ GIM_Try, /*On fail goto*//*Label 128*/ GIMT_Encode4(2141), // Rule ID 74 // |
| 1499 | /* 2135 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1500 | /* 2138 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM' |
| 1501 | /* 2138 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1502 | /* 2141 */ // Label 128: @2141 |
| 1503 | /* 2141 */ GIM_Reject, |
| 1504 | /* 2142 */ // Label 47: @2142 |
| 1505 | /* 2142 */ GIM_Try, /*On fail goto*//*Label 129*/ GIMT_Encode4(2153), // Rule ID 75 // |
| 1506 | /* 2147 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1507 | /* 2150 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINNUM_IEEE' |
| 1508 | /* 2150 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1509 | /* 2153 */ // Label 129: @2153 |
| 1510 | /* 2153 */ GIM_Reject, |
| 1511 | /* 2154 */ // Label 48: @2154 |
| 1512 | /* 2154 */ GIM_Try, /*On fail goto*//*Label 130*/ GIMT_Encode4(2165), // Rule ID 76 // |
| 1513 | /* 2159 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1514 | /* 2162 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXNUM_IEEE' |
| 1515 | /* 2162 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1516 | /* 2165 */ // Label 130: @2165 |
| 1517 | /* 2165 */ GIM_Reject, |
| 1518 | /* 2166 */ // Label 49: @2166 |
| 1519 | /* 2166 */ GIM_Try, /*On fail goto*//*Label 131*/ GIMT_Encode4(2177), // Rule ID 77 // |
| 1520 | /* 2171 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1521 | /* 2174 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMINIMUM' |
| 1522 | /* 2174 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1523 | /* 2177 */ // Label 131: @2177 |
| 1524 | /* 2177 */ GIM_Reject, |
| 1525 | /* 2178 */ // Label 50: @2178 |
| 1526 | /* 2178 */ GIM_Try, /*On fail goto*//*Label 132*/ GIMT_Encode4(2189), // Rule ID 78 // |
| 1527 | /* 2183 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule26Enabled), |
| 1528 | /* 2186 */ // Combiner Rule #26: commute_fp_constant_to_rhs; wip_match_opcode 'G_FMAXIMUM' |
| 1529 | /* 2186 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner14), |
| 1530 | /* 2189 */ // Label 132: @2189 |
| 1531 | /* 2189 */ GIM_Reject, |
| 1532 | /* 2190 */ // Label 51: @2190 |
| 1533 | /* 2190 */ GIM_Try, /*On fail goto*//*Label 133*/ GIMT_Encode4(2213), // Rule ID 14 // |
| 1534 | /* 2195 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled), |
| 1535 | /* 2198 */ // MIs[0] dst |
| 1536 | /* 2198 */ // No operand predicates |
| 1537 | /* 2198 */ // MIs[0] lhs |
| 1538 | /* 2198 */ // No operand predicates |
| 1539 | /* 2198 */ // MIs[0] Operand 2 |
| 1540 | /* 2198 */ GIM_CheckConstantInt8, /*MI*/0, /*Op*/2, 0, |
| 1541 | /* 2202 */ GIM_CheckCanReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1542 | /* 2207 */ // Combiner Rule #5: right_identity_zero @ [__right_identity_zero_match_0[7]] |
| 1543 | /* 2207 */ GIR_ReplaceReg, /*OldInsnID*/0, /*OldOpIdx*/0, /*NewInsnId*/0, /*NewOpIdx*/1, |
| 1544 | /* 2212 */ GIR_EraseRootFromParent_Done, |
| 1545 | /* 2213 */ // Label 133: @2213 |
| 1546 | /* 2213 */ GIM_Reject, |
| 1547 | /* 2214 */ // Label 52: @2214 |
| 1548 | /* 2214 */ GIM_Try, /*On fail goto*//*Label 134*/ GIMT_Encode4(2225), // Rule ID 55 // |
| 1549 | /* 2219 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1550 | /* 2222 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SMIN' |
| 1551 | /* 2222 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1552 | /* 2225 */ // Label 134: @2225 |
| 1553 | /* 2225 */ GIM_Reject, |
| 1554 | /* 2226 */ // Label 53: @2226 |
| 1555 | /* 2226 */ GIM_Try, /*On fail goto*//*Label 135*/ GIMT_Encode4(2237), // Rule ID 56 // |
| 1556 | /* 2231 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1557 | /* 2234 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_SMAX' |
| 1558 | /* 2234 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1559 | /* 2237 */ // Label 135: @2237 |
| 1560 | /* 2237 */ GIM_Reject, |
| 1561 | /* 2238 */ // Label 54: @2238 |
| 1562 | /* 2238 */ GIM_Try, /*On fail goto*//*Label 136*/ GIMT_Encode4(2249), // Rule ID 57 // |
| 1563 | /* 2243 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1564 | /* 2246 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UMIN' |
| 1565 | /* 2246 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1566 | /* 2249 */ // Label 136: @2249 |
| 1567 | /* 2249 */ GIM_Reject, |
| 1568 | /* 2250 */ // Label 55: @2250 |
| 1569 | /* 2250 */ GIM_Try, /*On fail goto*//*Label 137*/ GIMT_Encode4(2261), // Rule ID 58 // |
| 1570 | /* 2255 */ GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule25Enabled), |
| 1571 | /* 2258 */ // Combiner Rule #25: commute_int_constant_to_rhs; wip_match_opcode 'G_UMAX' |
| 1572 | /* 2258 */ GIR_DoneWithCustomAction, /*Fn*/GIMT_Encode2(GICXXCustomAction_GICombiner13), |
| 1573 | /* 2261 */ // Label 137: @2261 |
| 1574 | /* 2261 */ GIM_Reject, |
| 1575 | /* 2262 */ // Label 56: @2262 |
| 1576 | /* 2262 */ GIM_Reject, |
| 1577 | /* 2263 */ }; // Size: 2263 bytes |
| 1578 | return MatchTable0; |
| 1579 | } |
| 1580 | #undef GIMT_Encode2 |
| 1581 | #undef GIMT_Encode4 |
| 1582 | #undef GIMT_Encode8 |
| 1583 | |
| 1584 | #endif // ifdef GET_GICOMBINER_IMPL |
| 1585 | |
| 1586 | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
| 1587 | AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)), |
| 1588 | AvailableFunctionFeatures() |
| 1589 | #endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
| 1590 | #ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
| 1591 | , State(0), |
| 1592 | ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers) |
| 1593 | #endif // ifdef GET_GICOMBINER_CONSTRUCTOR_INITS |
| 1594 | |
| 1595 | |