On Tue, Aug 8, 2017 at 2:22 AM, Christopher Li <sparse@xxxxxxxxxxx> wrote: > Why (A>>S) & (M >>S) is easier to simplify? > > The original has two instruction but the result has three. Only 2 because M & S are constants and so (M >> S) is already evaluated. As described succinctly in the patch description, even with 2 instructions the real motivation is only because it's one of the three patterns that arise when storing a bitfield and reloading it later. But isolating a AND (smaller) mask is always a good thing because there is a lot of other opportunities for more simplifications that can be done on them. -- Luc -- 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