Add rule to simplify lzcount followed by right shift

This commit is contained in:
Pokechu22 2021-03-04 19:34:54 -08:00
parent 14880b53c4
commit e4ab760242
3 changed files with 71 additions and 0 deletions

View file

@ -1585,4 +1585,14 @@ public:
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
};
class RuleLzcountShiftBool : public Rule {
public:
RuleLzcountShiftBool(const string &g) : Rule( g, 0, "lzcountshiftbool") {} ///< Constructor
virtual Rule *clone(const ActionGroupList &grouplist) const {
if (!grouplist.contains(getGroup())) return (Rule *)0;
return new RuleLzcountShiftBool(getGroup());
}
virtual void getOpList(vector<uint4> &oplist) const;
virtual int4 applyOp(PcodeOp *op,Funcdata &data);
};
#endif