#ifndef FUSION_FEATURE
#define FUSION_FEATURE(TYPE, HAS_FEATURE, DEP_OP_IDX, OPSET1, OPSET2)
#endif
#ifndef FUSION_OP_SET
#define FUSION_OP_SET(...) __VA_ARGS__
#endif
FUSION_FEATURE(AddiLoad, hasAddiLoadFusion, 2, \
FUSION_OP_SET(ADDI, ADDI8, ADDItocL, ADDItocL8), \
FUSION_OP_SET(LXVD2X, LXVW4X, LXVDSX, LVEBX, LVEHX, LVEWX, \
LVX, LXSDX))
FUSION_FEATURE(AddisLoad, hasAddisLoadFusion, 2, \
FUSION_OP_SET(ADDIS, ADDIS8, ADDIStocHA8), \
FUSION_OP_SET(LD, LBZ, LBZ8, LHZ, LHZ8, LWZ, LWZ8))
FUSION_FEATURE(ArithAdd, hasArithAddFusion, -1,
FUSION_OP_SET(ADD4, ADD8, MULLD), FUSION_OP_SET(ADD4, ADD8))
FUSION_FEATURE(ArithLogical, hasAddLogicalFusion, -1,
FUSION_OP_SET(ADD4, ADD8, SUBF, SUBF8),
FUSION_OP_SET(AND, AND8, OR, OR8, NAND, NAND8, NOR, NOR8))
FUSION_FEATURE(LogicalArith, hasLogicalAddFusion, -1,
FUSION_OP_SET(AND, ANDC, EQV, NAND, NOR, OR, ORC, XOR, AND8,
ANDC8, EQV8, NAND8, NOR8, OR8, ORC8, XOR8),
FUSION_OP_SET(ADD4, ADD8, SUBF, SUBF8))
FUSION_FEATURE(Logical, hasLogicalFusion, -1,
FUSION_OP_SET(AND, ANDC, EQV, NAND, NOR, OR, ORC, XOR, AND8,
ANDC8, EQV8, NAND8, NOR8, OR8, ORC8, XOR8),
FUSION_OP_SET(AND, ANDC, EQV, NAND, NOR, OR, ORC, XOR, AND8,
ANDC8, EQV8, NAND8, NOR8, OR8, ORC8, XOR8))
FUSION_FEATURE(VecAdd, hasArithAddFusion, -1, FUSION_OP_SET(VADDUDM),
FUSION_OP_SET(VADDUDM))
FUSION_FEATURE(VecLogical, hasLogicalFusion, -1,
FUSION_OP_SET(VAND, VANDC, VEQV, VNAND, VNOR, VOR, VORC, VXOR),
FUSION_OP_SET(VAND, VANDC, VEQV, VNAND, VNOR, VOR, VORC, VXOR))
FUSION_FEATURE(SldiAdd, hasArithAddFusion, -1, FUSION_OP_SET(RLDICR, RLDICR_32),
FUSION_OP_SET(ADD4, ADD8, SUBF, SUBF8))
FUSION_FEATURE(RotateLeftXor, hasSha3Fusion, 1,
FUSION_OP_SET(RLDICL, RLDICL_32, RLDICL_32_64),
FUSION_OP_SET(XOR, XOR8))
FUSION_FEATURE(RotateRightXor, hasSha3Fusion, 1,
FUSION_OP_SET(RLDICR, RLDICR_32), FUSION_OP_SET(XOR, XOR8))
FUSION_FEATURE(LoadCmp1, hasCompareFusion, 1,
FUSION_OP_SET(LBZ, LBZ8, LBZX, LBZX8, LBZXTLS, LBZXTLS_,
LBZXTLS_32, LHZ, LHZ8, LHZX, LHZX8, LHZXTLS,
LHZXTLS_, LHZXTLS_32, LWZ, LWZ8, LWZX, LWZX8,
LWZXTLS, LWZXTLS_, LWZXTLS_32),
FUSION_OP_SET(CMPDI, CMPLDI, CMPLWI))
FUSION_FEATURE(LoadCmp2, hasCompareFusion, 1,
FUSION_OP_SET(LD, LDX, LDXTLS, LDXTLS_),
FUSION_OP_SET(CMPDI, CMPLDI))
FUSION_FEATURE(LoadCmp3, hasCompareFusion, 1,
FUSION_OP_SET(LHA, LHA8, LHAX, LHAX8, LWA, LWA_32, LWAX,
LWAX_32),
FUSION_OP_SET(CMPLDI, CMPLWI))
FUSION_FEATURE(OriOris, hasWideImmFusion, 1, FUSION_OP_SET(ORI, ORI8),
FUSION_OP_SET(ORIS, ORIS8))
FUSION_FEATURE(LisOri, hasWideImmFusion, 1, FUSION_OP_SET(LIS, LIS8),
FUSION_OP_SET(ORI, ORI8))
FUSION_FEATURE(OrisOri, hasWideImmFusion, 1, FUSION_OP_SET(ORIS, ORIS8),
FUSION_OP_SET(ORI, ORI8))
FUSION_FEATURE(XoriXoris, hasWideImmFusion, 1, FUSION_OP_SET(XORI, XORI8),
FUSION_OP_SET(XORIS, XORIS8))
FUSION_FEATURE(XorisXori, hasWideImmFusion, 1, FUSION_OP_SET(XORIS, XORIS8),
FUSION_OP_SET(XORI, XORI8))
FUSION_FEATURE(AddisAddi, hasWideImmFusion, 1,
FUSION_OP_SET(ADDIS, ADDIS8, ADDIStocHA8, ADDIStocHA),
FUSION_OP_SET(ADDI, ADDI8, ADDItocL8, ADDItocL))
FUSION_FEATURE(AddiAddis, hasWideImmFusion, 1,
FUSION_OP_SET(ADDI, ADDI8, ADDItocL8, ADDItocL),
FUSION_OP_SET(ADDIS, ADDIS8, ADDIStocHA8, ADDIStocHA))
FUSION_FEATURE(ZeroMoveCTR, hasZeroMoveFusion, -1,
FUSION_OP_SET(MTCTR, MTCTRloop, MTSPR8, MTSPR),
FUSION_OP_SET(BCCTR, BCCTRn, BCCTR8, BCCTR8n, BCCTRL, BCCTRLn,
BCCTRL8, BCCTRL8n, gBCCTR, gBCCTRL))
FUSION_FEATURE(ZeroMoveLR, hasZeroMoveFusion, -1,
FUSION_OP_SET(MTLR8, MTLR, MTSPR8, MTSPR),
FUSION_OP_SET(BCLR, BCLRn, gBCLR, BCLRL, BCLRLn, gBCLRL))
#include "PPCBack2BackFusion.def"
#undef FUSION_FEATURE
#undef FUSION_OP_SET