On Mon, Aug 7, 2017 at 3:12 PM, Luc Van Oostenryck <luc.vanoostenryck@xxxxxxxxx> wrote: > This is especially usefull when simplifying code > accessing bitfields. > > > +static int simplify_lsr(struct instruction *insn, pseudo_t pseudo, long long value) > +{ > + struct instruction *def; > + unsigned long long mask; > + > + if (!value) > + return replace_with_pseudo(insn, pseudo); > + switch (def_opcode(insn->src1)) { > + case OP_AND: > + // replace (A & M) >> S > + // by (A >> S) & (M >> S) Why (A>>S) & (M >>S) is easier to simplify? The original has two instruction but the result has three. Is that that because A>>S is more likely to find match in the CSE? What if there is no match found, does that mean it is not useful to do this transformation? Chris -- To unsubscribe from this list: send the line "unsubscribe linux-sparse" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html