Re: [PATCH 3/9] simplify ((A & M) | B ) & M' even when (M & M') != 0

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Aug 9, 2018 at 2:20 AM Luc Van Oostenryck
<luc.vanoostenryck@xxxxxxxxx> wrote:
>
> >       if (nmask == 0)
> >               return replace_pseudo(insn, &insn->src1, other);
> > -     return 0;
>
> There is a
>         if (nbr_users(insn->src1) > 1)
>                 return 0;
> missing here.

Doin't you mean

        if (multi_users(insn->src1))
                return 0;

in the new world order?

Side note, and independently of that comment, and the real reason I'm
asking: it would really be lovely for all these "simplify" commits to
have example code generation changes.

I'm betting you have some simple bitfield code examples that you are
using to guide these things, wouldn't it be nice to have those
examples as part of the explanation for why you do particular
simplifications?

I realize that this isn't what has been normally done, and it
obviously depends on the particular simplification. Some
simplifications are so obvious that they don't really even merit an
example. But this one strikes me as pretty involved from the
description, even though I suspect that the actual bitfield operation
that triggers this is very simple.

                Linus
--
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



[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux