#ifdef GET_GICOMBINER_DEPS
#include "llvm/ADT/SparseBitVector.h"
namespace llvm {
extern cl::OptionCategory GICombinerOptionCategory;
}
#endif
#ifdef GET_GICOMBINER_TYPES
struct AArch64O0PreLegalizerCombinerImplRuleConfig {
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 AArch64O0PreLegalizerCombinerImplRuleConfig::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 AArch64O0PreLegalizerCombinerImplRuleConfig::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> AArch64O0PreLegalizerCombinerOption;
static cl::list<std::string> AArch64O0PreLegalizerCombinerDisableOption(
"aarch64o0prelegalizercombiner-disable-rule",
cl::desc("Disable one or more combiner rules temporarily in the AArch64O0PreLegalizerCombiner pass"),
cl::CommaSeparated,
cl::Hidden,
cl::cat(GICombinerOptionCategory),
cl::callback([](const std::string &Str) {
AArch64O0PreLegalizerCombinerOption.push_back(Str);
}));
static cl::list<std::string> AArch64O0PreLegalizerCombinerOnlyEnableOption(
"aarch64o0prelegalizercombiner-only-enable-rule",
cl::desc("Disable all rules in the AArch64O0PreLegalizerCombiner pass then re-enable the specified ones"),
cl::Hidden,
cl::cat(GICombinerOptionCategory),
cl::callback([](const std::string &CommaSeparatedArg) {
StringRef Str = CommaSeparatedArg;
AArch64O0PreLegalizerCombinerOption.push_back("*");
do {
auto X = Str.split(",");
AArch64O0PreLegalizerCombinerOption.push_back(("!" + X.first).str());
Str = X.second;
} while (!Str.empty());
}));
bool AArch64O0PreLegalizerCombinerImplRuleConfig::isRuleEnabled(unsigned RuleID) const {
return !DisabledRules.test(RuleID);
}
bool AArch64O0PreLegalizerCombinerImplRuleConfig::parseCommandLineOption() {
for (StringRef Identifier : AArch64O0PreLegalizerCombinerOption) {
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 AArch64Subtarget *Subtarget) const;
PredicateBitset
computeAvailableFunctionFeatures(const AArch64Subtarget *Subtarget,
const MachineFunction *MF) const;
void setupGeneratedPerFunctionState(MachineFunction &MF) override;
#endif
#ifdef GET_GICOMBINER_CLASS_MEMBERS
mutable MatcherState State;
typedef ComplexRendererFns(AArch64O0PreLegalizerCombinerImpl::*ComplexMatcherMemFn)(MachineOperand &) const;
typedef void(AArch64O0PreLegalizerCombinerImpl::*CustomRendererFn)(MachineInstrBuilder &, const MachineInstr &, int) const;
const ExecInfoTy<PredicateBitset, ComplexMatcherMemFn, CustomRendererFn> ExecInfo;
static AArch64O0PreLegalizerCombinerImpl::ComplexMatcherMemFn ComplexPredicateFns[];
static AArch64O0PreLegalizerCombinerImpl::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 AArch64O0PreLegalizerCombinerImpl::
computeAvailableModuleFeatures(const AArch64Subtarget *Subtarget) const {
PredicateBitset Features{};
return Features;
}
void AArch64O0PreLegalizerCombinerImpl::setupGeneratedPerFunctionState(MachineFunction &MF) {
AvailableFunctionFeatures = computeAvailableFunctionFeatures((const AArch64Subtarget *)&MF.getSubtarget(), &MF);
}
PredicateBitset AArch64O0PreLegalizerCombinerImpl::
computeAvailableFunctionFeatures(const AArch64Subtarget *Subtarget, const MachineFunction *MF) const {
PredicateBitset Features{};
return Features;
}
enum {
GIFBS_Invalid,
};
constexpr static PredicateBitset FeatureBitsets[] {
{},
};
enum {
GICP_Invalid,
};
AArch64O0PreLegalizerCombinerImpl::ComplexMatcherMemFn
AArch64O0PreLegalizerCombinerImpl::ComplexPredicateFns[] = {
nullptr,
};
bool AArch64O0PreLegalizerCombinerImpl::testMIPredicate_MI(unsigned PredicateID, const MachineInstr & MI, const MatcherState &State) const {
llvm_unreachable("Unknown predicate");
return false;
}
bool AArch64O0PreLegalizerCombinerImpl::testImmPredicate_I64(unsigned PredicateID, int64_t Imm) const {
llvm_unreachable("Unknown predicate");
return false;
}
bool AArch64O0PreLegalizerCombinerImpl::testImmPredicate_APFloat(unsigned PredicateID, const APFloat & Imm) const {
llvm_unreachable("Unknown predicate");
return false;
}
bool AArch64O0PreLegalizerCombinerImpl::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 AArch64O0PreLegalizerCombinerImpl::testSimplePredicate(unsigned Predicate) const {
return RuleConfig.isRuleEnabled(Predicate - GICXXPred_Invalid - 1);
}
enum {
GICR_Invalid,
};
AArch64O0PreLegalizerCombinerImpl::CustomRendererFn
AArch64O0PreLegalizerCombinerImpl::CustomRenderers[] = {
nullptr,
};
bool AArch64O0PreLegalizerCombinerImpl::tryCombineAllImpl(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 AArch64O0PreLegalizerCombinerImpl::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 *AArch64O0PreLegalizerCombinerImpl::getMatchTable() const {
constexpr static uint8_t MatchTable0[] = {
GIM_SwitchOpcode, 0, GIMT_Encode2(20), GIMT_Encode2(228), GIMT_Encode4(1104),
GIMT_Encode4(842), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(854), GIMT_Encode4(0),
GIMT_Encode4(866), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(918), GIMT_Encode4(0),
GIMT_Encode4(930), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(942), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(954), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(984),
GIMT_Encode4(996),
GIMT_Encode4(1008), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1020), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1050), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1080), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0), GIMT_Encode4(0),
GIMT_Encode4(1092),
GIM_Try, GIMT_Encode4(853),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule0Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner0),
GIM_Reject,
GIM_Try, GIMT_Encode4(865),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule2Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner2),
GIM_Reject,
GIM_Try, GIMT_Encode4(906),
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(917),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule1Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner1),
GIM_Reject,
GIM_Try, GIMT_Encode4(929),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule7Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner5),
GIM_Reject,
GIM_Try, GIMT_Encode4(941),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule8Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner6),
GIM_Reject,
GIM_Try, GIMT_Encode4(953),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule10Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner8),
GIM_Reject,
GIM_Try, GIMT_Encode4(983),
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(995),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner4),
GIM_Reject,
GIM_Try, GIMT_Encode4(1007),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner4),
GIM_Reject,
GIM_Try, GIMT_Encode4(1019),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule6Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner4),
GIM_Reject,
GIM_Try, GIMT_Encode4(1049),
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(1079),
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(1091),
GIM_CheckSimplePredicate, GIMT_Encode2(GICXXPred_Simple_IsRule5Enabled),
GIR_DoneWithCustomAction, GIMT_Encode2(GICXXCustomAction_GICombiner3),
GIM_Reject,
GIM_Try, GIMT_Encode4(1103),
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