#ifdef GET_GICOMBINER_DEPS
#include "llvm/ADT/SparseBitVector.h"
namespace llvm {
extern cl::OptionCategory GICombinerOptionCategory;
}
#endif
#ifdef GET_GICOMBINER_TYPES
struct RISCVO0PreLegalizerCombinerImplRuleConfig {
SparseBitVector<> DisabledRules;
bool isRuleEnabled(unsigned RuleID) const;
bool parseCommandLineOption();
bool setRuleEnabled(StringRef RuleIdentifier);
bool setRuleDisabled(StringRef RuleIdentifier);
};
static std::optional<uint64_t> getRuleIdxForIdentifier(StringRef RuleIdentifier) {
uint64_t I;
bool Parsed = !RuleIdentifier.getAsInteger(0, I);
if (Parsed)
return I;
#ifndef NDEBUG
switch (RuleIdentifier.size()) {
default: break;
case 9:
if (memcmp(RuleIdentifier.data()+0, "copy_prop", 9) != 0)
break;
return 0;
case 10:
if (memcmp(RuleIdentifier.data()+0, "mul_to_shl", 10) != 0)
break;
return 1;
case 12:
if (memcmp(RuleIdentifier.data()+0, "not_cmp_fold", 12) != 0)
break;
return 8;
case 13:
if (memcmp(RuleIdentifier.data()+0, "load_and_mask", 13) != 0)
break;
return 7;
case 14:
if (memcmp(RuleIdentifier.data()+0, "mul_by_neg_one", 14) != 0)
break;
return 3;
case 15:
switch (RuleIdentifier[0]) {
default: break;
case 'e':
if (memcmp(RuleIdentifier.data()+1, "xtending_loads", 14) != 0)
break;
return 6;
case 'i':
if (memcmp(RuleIdentifier.data()+1, "dempotent_prop", 14) != 0)
break;
return 4;
}
break;
case 17:
if (memcmp(RuleIdentifier.data()+0, "add_p2i_to_ptradd", 17) != 0)
break;
return 2;
case 19:
if (memcmp(RuleIdentifier.data()+0, "ptr_add_immed_chain", 19) != 0)
break;
return 5;
case 21:
if (memcmp(RuleIdentifier.data()+0, "combine_concat_vector", 21) != 0)
break;
return 10;
case 28:
if (memcmp(RuleIdentifier.data()+0, "opt_brcond_by_inverting_cond", 28) != 0)
break;
return 9;
}
#endif
return std::nullopt;
}
static std::optional<std::pair<uint64_t, uint64_t>> getRuleRangeForIdentifier(StringRef RuleIdentifier) {
std::pair<StringRef, StringRef> RangePair = RuleIdentifier.split('-');
if (!RangePair.second.empty()) {
const auto First = getRuleIdxForIdentifier(RangePair.first);
const auto Last = getRuleIdxForIdentifier(RangePair.second);
if (!First || !Last)
return std::nullopt;
if (First >= Last)
report_fatal_error("Beginning of range should be before end of range");
return {{*First, *Last + 1}};
}
if (RangePair.first == "*") {
return {{0, 11}};
}
const auto I = getRuleIdxForIdentifier(RangePair.first);
if (!I)
return std::nullopt;
return {{*I, *I + 1}};
}
bool RISCVO0PreLegalizerCombinerImplRuleConfig::setRuleEnabled(StringRef RuleIdentifier) {
auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
if (!MaybeRange)
return false;
for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
DisabledRules.reset(I);
return true;
}
bool RISCVO0PreLegalizerCombinerImplRuleConfig::setRuleDisabled(StringRef RuleIdentifier) {
auto MaybeRange = getRuleRangeForIdentifier(RuleIdentifier);
if (!MaybeRange)
return false;
for (auto I = MaybeRange->first; I < MaybeRange->second; ++I)
DisabledRules.set(I);
return true;
}
static std::vector<std::string> RISCVO0PreLegalizerCombinerOption;
static cl::list<std::string> RISCVO0PreLegalizerCombinerDisableOption(
"riscvo0prelegalizercombiner-disable-rule",
cl::desc("Disable one or more combiner rules temporarily in the RISCVO0PreLegalizerCombiner pass"),
cl::CommaSeparated,
cl::Hidden,
cl::cat(GICombinerOptionCategory),
cl::callback([](const std::string &Str) {
RISCVO0PreLegalizerCombinerOption.push_back(Str);
}));
static cl::list<std::string> RISCVO0PreLegalizerCombinerOnlyEnableOption(
"riscvo0prelegalizercombiner-only-enable-rule",
cl::desc("Disable all rules in the RISCVO0PreLegalizerCombiner pass then re-enable the specified ones"),
cl::Hidden,
cl::cat(GICombinerOptionCategory),
cl::callback([](const std::string &CommaSeparatedArg) {
StringRef Str = CommaSeparatedArg;
RISCVO0PreLegalizerCombinerOption.push_back("*");
do {
auto X = Str.split(",");
RISCVO0PreLegalizerCombinerOption.push_back(("!" + X.first).str());
Str = X.second;
} while (!Str.empty());
}));
bool RISCVO0PreLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
return !DisabledRules.test(RuleID);
}
bool RISCVO0PreLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
for (StringRef Identifier : RISCVO0PreLegalizerCombinerOption) {
bool Enabled = Identifier.consume_front("!");
if (Enabled && !setRuleEnabled(Identifier))
return false;
if (!Enabled && !setRuleDisabled(Identifier))
return false;
}
return true;
}
#endif
#ifdef GET_GICOMBINER_TYPES
const unsigned MAX_SUBTARGET_PREDICATES = 0;
using PredicateBitset = llvm::Bitset<MAX_SUBTARGET_PREDICATES>;
#endif
#ifdef GET_GICOMBINER_CLASS_MEMBERS
PredicateBitset AvailableModuleFeatures;
mutable PredicateBitset AvailableFunctionFeatures;
PredicateBitset getAvailableFeatures() const {
return AvailableModuleFeatures | AvailableFunctionFeatures;
}
PredicateBitset
computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const;
PredicateBitset
computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget,
const MachineFunction *MF) const;
void setupGeneratedPerFunctionState(MachineFunction &MF) override;
#endif
#ifdef GET_GICOMBINER_CLASS_MEMBERS
mutable MatcherState State;
typedef ComplexRendererFns(RISCVO0PreLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
typedef void(RISCVO0PreLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
static RISCVO0PreLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
static RISCVO0PreLegalizerCombinerImpl::CustomRendererFn CustomRenderers[];
bool testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const override;
bool testImmPredicate_APInt(unsigned PredicateID, const APInt &Imm) const override;
bool testImmPredicate_APFloat(unsigned PredicateID, const APFloat &Imm) const override;
const uint8_t *getMatchTable() const override;
bool testMIPredicate_MI(unsigned PredicateID, const MachineInstr &MI, const MatcherState &State) const override;
bool testSimplePredicate(unsigned PredicateID) const override;
bool runCustomAction(unsigned FnID, const MatcherState &State, NewMIVector &OutMIs) const override;
#endif
#ifdef GET_GICOMBINER_IMPL
enum {
GILLT_s1,
};
const static size_t NumTypeObjects = 1;
const static LLT TypeObjects[] = {
LLT::scalar(1),
};
enum SubtargetFeatureBits : uint8_t {
};
PredicateBitset RISCVO0PreLegalizerCombinerImpl::
computeAvailableModuleFeatures(const RISCVSubtarget *Subtarget) const {
PredicateBitset Features{};
return Features;
}
void RISCVO0PreLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
AvailableFunctionFeatures = computeAvailableFunctionFeatures((const RISCVSubtarget *)&MF.getSubtarget(), &MF);
}
PredicateBitset RISCVO0PreLegalizerCombinerImpl::
computeAvailableFunctionFeatures(const RISCVSubtarget *Subtarget, const MachineFunction *MF) const {
PredicateBitset Features{};
return Features;
}
enum {
GIFBS_Invalid,
};
constexpr static PredicateBitset FeatureBitsets[] {
{},
};
enum {
GICP_Invalid,
};
RISCVO0PreLegalizerCombinerImpl::ComplexMatcherMemFn
RISCVO0PreLegalizerCombinerImpl::ComplexPredicateFns[] = {
nullptr,
};
bool RISCVO0PreLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
llvm_unreachable("Unknown predicate");
return false;
}
bool RISCVO0PreLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
llvm_unreachable("Unknown predicate");
return false;
}
bool RISCVO0PreLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
llvm_unreachable("Unknown predicate");
return false;
}
bool RISCVO0PreLegalizerCombinerImpl::testImmPredicate_APInt(unsigned PredicateID, const APInt & Imm) const {
llvm_unreachable("Unknown predicate");
return false;
}
enum {
GICXXPred_Simple_IsRule0Enabled = GICXXPred_Invalid + 1,
GICXXPred_Simple_IsRule1Enabled,
GICXXPred_Simple_IsRule2Enabled,
GICXXPred_Simple_IsRule3Enabled,
GICXXPred_Simple_IsRule4Enabled,
GICXXPred_Simple_IsRule5Enabled,
GICXXPred_Simple_IsRule6Enabled,
GICXXPred_Simple_IsRule7Enabled,
GICXXPred_Simple_IsRule8Enabled,
GICXXPred_Simple_IsRule9Enabled,
GICXXPred_Simple_IsRule10Enabled,
};
bool RISCVO0PreLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
}
enum {
GICR_Invalid,
};
RISCVO0PreLegalizerCombinerImpl::CustomRendererFn
RISCVO0PreLegalizerCombinerImpl::CustomRenderers[] = {
nullptr,
};
bool RISCVO0PreLegalizerCombinerImpl::tryCombineAll(MachineInstr &I) const {
const TargetSubtargetInfo &ST = MF.getSubtarget();
const PredicateBitset AvailableFeatures = getAvailableFeatures();
B.setInstrAndDebugLoc(I);
State.MIs.clear();
State.MIs.push_back(&I);
if (executeMatchTable(*this, State, ExecInfo, B, getMatchTable(), *ST.getInstrInfo(), MRI, *MRI.getTargetRegisterInfo(), *ST.getRegBankInfo(), AvailableFeatures, nullptr)) {
return true;
}
return false;
}
enum {
GICXXCustomAction_GICombiner0 = GICXXCustomAction_Invalid + 1,
GICXXCustomAction_GICombiner1,
GICXXCustomAction_GICombiner2,
GICXXCustomAction_GICombiner3,
GICXXCustomAction_GICombiner4,
GICXXCustomAction_GICombiner5,
GICXXCustomAction_GICombiner6,
GICXXCustomAction_GICombiner7,
GICXXCustomAction_GICombiner8,
};
bool RISCVO0PreLegalizerCombinerImpl::runCustomAction(unsigned ApplyID, const MatcherState &State, NewMIVector &OutMIs) const {
Helper.getBuilder().setInstrAndDebugLoc(*State.MIs[0]);
switch(ApplyID) {
case GICXXCustomAction_GICombiner0:{
if(![&](){return Helper.matchCombineCopy(*State.MIs[0]);}()) {
return false;
}
Helper.applyCombineCopy(*State.MIs[0]);
return true;
}
case GICXXCustomAction_GICombiner1:{
unsigned GIMatchData_matchinfo;
if(![&](){return Helper.matchCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);}()) {
return false;
}
Helper.applyCombineMulToShl(*State.MIs[0], GIMatchData_matchinfo);
return true;
}
case GICXXCustomAction_GICombiner2:{
std::pair<Register, bool> GIMatchData_info;
if(![&](){return Helper.matchCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info);}()) {
return false;
}
Helper.applyCombineAddP2IToPtrAdd(*State.MIs[0], GIMatchData_info);
return true;
}
case GICXXCustomAction_GICombiner3:{
PtrAddChain GIMatchData_matchinfo;
if(![&](){return Helper.matchPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);}()) {
return false;
}
Helper.applyPtrAddImmedChain(*State.MIs[0], GIMatchData_matchinfo);
return true;
}
case GICXXCustomAction_GICombiner4:{
PreferredTuple GIMatchData_matchinfo;
if(![&](){return Helper.matchCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);}()) {
return false;
}
Helper.applyCombineExtendingLoads(*State.MIs[0], GIMatchData_matchinfo);
return true;
}
case GICXXCustomAction_GICombiner5:{
std::function<void(MachineIRBuilder &)> GIMatchData_matchinfo;
if(![&](){return Helper.matchCombineLoadWithAndMask(*State.MIs[0], GIMatchData_matchinfo);}()) {
return false;
}
Helper.applyBuildFn(*State.MIs[0], GIMatchData_matchinfo);
return true;
}
case GICXXCustomAction_GICombiner6:{
SmallVector<Register, 4> GIMatchData_info;
if(![&](){return Helper.matchNotCmp(*State.MIs[0], GIMatchData_info);}()) {
return false;
}
Helper.applyNotCmp(*State.MIs[0], GIMatchData_info);
return true;
}
case GICXXCustomAction_GICombiner7:{
MachineInstr * GIMatchData_matchinfo;
if(![&](){return Helper.matchOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo);}()) {
return false;
}
Helper.applyOptBrCondByInvertingCond(*State.MIs[0], GIMatchData_matchinfo);
return true;
}
case GICXXCustomAction_GICombiner8:{
SmallVector<Register> GIMatchData_matchinfo;
if(![&](){return Helper.matchCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);}()) {
return false;
}
Helper.applyCombineConcatVectors(*State.MIs[0], GIMatchData_matchinfo);
return true;
}
}
llvm_unreachable("Unknown Apply Action");
}
#if __BYTE_ORDER__ == __ORDER_LITTLE_ENDIAN__
#define GIMT_Encode2 …
#define GIMT_Encode4 …
#define GIMT_Encode8 …
#else
#define GIMT_Encode2 …
#define GIMT_Encode4 …
#define GIMT_Encode8 …
#endif
const uint8_t *RISCVO0PreLegalizerCombinerImpl::getMatchTable() const {
constexpr static uint8_t MatchTable0[] = {
GIM_SwitchOpcode, 0, GIMT_Encode2(19), GIMT_Encode2(223), GIMT_Encode4(1088),
GIMT_Encode4(826), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(838), GIMT_Encode4(0),
GIMT_Encode4(850), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(902), GIMT_Encode4(0),
GIMT_Encode4(914), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(926), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(938), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(968),
GIMT_Encode4(980),
GIMT_Encode4(992), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1004), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1034), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1064), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1076),
GIM_Try, GIMT_Encode4(837),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner0),
GIM_Reject,
GIM_Try, GIMT_Encode4(849),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner2),
GIM_Reject,
GIM_Try, GIMT_Encode4(890),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule3Enabled),
GIM_RecordRegType, 0, 0, uint8_t(-1),
GIM_CheckConstantInt8, 0, 2, uint8_t(-1),
GIR_MakeTempReg, 0, uint8_t(-1),
GIR_BuildConstant, 0, GIMT_Encode8(0),
GIR_BuildRootMI, GIMT_Encode2(TargetOpcode::G_SUB),
GIR_RootToRootCopy, 0,
GIR_AddSimpleTempRegister, 0, 0,
GIR_RootToRootCopy, 1,
GIR_EraseRootFromParent_Done,
GIM_Try, GIMT_Encode4(901),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner1),
GIM_Reject,
GIM_Try, GIMT_Encode4(913),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner5),
GIM_Reject,
GIM_Try, GIMT_Encode4(925),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner6),
GIM_Reject,
GIM_Try, GIMT_Encode4(937),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner8),
GIM_Reject,
GIM_Try, GIMT_Encode4(967),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
GIM_RecordInsnIgnoreCopies, 1, 0, 1,
GIM_CheckOpcode, 1, GIMT_Encode2(TargetOpcode::G_FREEZE),
GIM_CheckCanReplaceReg, 0, 0, 0, 1,
GIM_CheckIsSafeToFold, 1,
GIR_ReplaceReg, 0, 0, 0, 1,
GIR_EraseRootFromParent_Done,
GIM_Reject,
GIM_Try, GIMT_Encode4(979),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner4),
GIM_Reject,
GIM_Try, GIMT_Encode4(991),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner4),
GIM_Reject,
GIM_Try, GIMT_Encode4(1003),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner4),
GIM_Reject,
GIM_Try, GIMT_Encode4(1033),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
GIM_RecordInsnIgnoreCopies, 1, 0, 1,
GIM_CheckOpcode, 1, GIMT_Encode2(TargetOpcode::G_FABS),
GIM_CheckCanReplaceReg, 0, 0, 0, 1,
GIM_CheckIsSafeToFold, 1,
GIR_ReplaceReg, 0, 0, 0, 1,
GIR_EraseRootFromParent_Done,
GIM_Reject,
GIM_Try, GIMT_Encode4(1063),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule4Enabled),
GIM_RecordInsnIgnoreCopies, 1, 0, 1,
GIM_CheckOpcode, 1, GIMT_Encode2(TargetOpcode::G_FCANONICALIZE),
GIM_CheckCanReplaceReg, 0, 0, 0, 1,
GIM_CheckIsSafeToFold, 1,
GIR_ReplaceReg, 0, 0, 0, 1,
GIR_EraseRootFromParent_Done,
GIM_Reject,
GIM_Try, GIMT_Encode4(1075),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner3),
GIM_Reject,
GIM_Try, GIMT_Encode4(1087),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule9Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner7),
GIM_Reject,
GIM_Reject,
};
return MatchTable0;
}
#undef GIMT_Encode2
#undef GIMT_Encode4
#undef GIMT_Encode8
#endif
#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
AvailableModuleFeatures(computeAvailableModuleFeatures(&STI)),
AvailableFunctionFeatures()
#endif
#ifdef GET_GICOMBINER_CONSTRUCTOR_INITS
, State(0),
ExecInfo(TypeObjects, NumTypeObjects, FeatureBitsets, ComplexPredicateFns, CustomRenderers)
#endif