On Sat, Oct 24, 2015 at 11:15 PM, Marc Glisse <marc.gli...@inria.fr> wrote:
> On Fri, 23 Oct 2015, Hurugalawadi, Naveen wrote:
>
> + (minus (bit_and:cs @0 (bit_not @1)) (bit_and:s @0 @1))
>
> I am not sure why we have :c on one bit_and but not the other.

Clearly an omission.

> + (bit_ior:c (bit_and:c @0 (bit_not @1)) (bit_and:c (bit_not @0) @1))
>
> Here on the other hand, I believe the :c on bit_ior is redundant.

Yes.  It's somewhat twisty ;)  I wonder why it doesn't get you a genmatch
warning for duplicate patterns though.  A it does:

test.pd:2:3 warning: duplicate pattern
 (bit_ior:c (bit_and:c @0 (bit_not @1)) (bit_and:c (bit_not @0) @1))
  ^
test.pd:2:3 warning: previous pattern defined here
 (bit_ior:c (bit_and:c @0 (bit_not @1)) (bit_and:c (bit_not @0) @1))
  ^
(BIT_IOR_EXPR (BIT_AND_EXPR (BIT_NOT_EXPR @0) @1) (BIT_AND_EXPR @0
(BIT_NOT_EXPR @1)))

so please watch out for them when building.

Richard.

>
> --
> Marc Glisse

Reply via email to