This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Move some bit and binary optimizations in simplify and match
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Marc Glisse <marc dot glisse at inria dot fr>
- Cc: "Hurugalawadi, Naveen" <Naveen dot Hurugalawadi at caviumnetworks dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Mon, 26 Oct 2015 10:29:54 +0100
- Subject: Re: Move some bit and binary optimizations in simplify and match
- Authentication-results: sourceware.org; auth=none
- References: <SN2PR0701MB10242B9E56933B072C29DE698E360 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <alpine dot DEB dot 2 dot 20 dot 1510141334440 dot 2509 at laptop-mg dot saclay dot inria dot fr> <SN2PR0701MB1024DCB71D27D1879DE3A7C48E3E0 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <CAFiYyc17b4BO5GDVxodzNfoztV0Gvdy6pdpJfW2dR+8xh0aK1Q at mail dot gmail dot com> <SN2PR0701MB10241785BE597A8D3D648B8C8E3D0 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <alpine dot DEB dot 2 dot 20 dot 1510161238370 dot 7951 at laptop-mg dot saclay dot inria dot fr> <SN2PR0701MB1024F6EA47AF604FFDAF58258E3A0 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <alpine dot DEB dot 2 dot 20 dot 1510191323001 dot 11872 at laptop-mg dot saclay dot inria dot fr> <SN2PR0701MB1024B0A9DCDCA6C3F71885518E390 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <CAFiYyc0POhSbGVcAXAzE3ka5PtfQALfAJZBJnYkVwZ3KBq+19w at mail dot gmail dot com> <CAFiYyc2XZfLKBRJj1ynpRgVpiWj6fMhp9s1YRJAASSaYe=-GYA at mail dot gmail dot com> <SN2PR0701MB102493AB9A401CC25D600B478E260 at SN2PR0701MB1024 dot namprd07 dot prod dot outlook dot com> <alpine dot DEB dot 2 dot 20 dot 1510242310330 dot 2173 at laptop-mg dot saclay dot inria dot fr> <CAFiYyc0DxjhN5+uvyUafedCEFi5OybwJgtoHWUeMB53x=K3z2w at mail dot gmail dot com>
On Mon, Oct 26, 2015 at 10:26 AM, Richard Biener
<richard.guenther@gmail.com> wrote:
> On Sat, Oct 24, 2015 at 11:15 PM, Marc Glisse <marc.glisse@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.
I'm testing a patch to fix both issues.
Richard.
> Richard.
>
>>
>> --
>> Marc Glisse