From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 57019 invoked by alias); 26 Oct 2015 09:27:00 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 57009 invoked by uid 89); 26 Oct 2015 09:26:59 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-yk0-f181.google.com Received: from mail-yk0-f181.google.com (HELO mail-yk0-f181.google.com) (209.85.160.181) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Mon, 26 Oct 2015 09:26:57 +0000 Received: by ykba4 with SMTP id a4so171232994ykb.3 for ; Mon, 26 Oct 2015 02:26:55 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.129.13.215 with SMTP id 206mr27537830ywn.280.1445851615611; Mon, 26 Oct 2015 02:26:55 -0700 (PDT) Received: by 10.37.117.136 with HTTP; Mon, 26 Oct 2015 02:26:55 -0700 (PDT) In-Reply-To: References: Date: Mon, 26 Oct 2015 09:29:00 -0000 Message-ID: Subject: Re: Move some bit and binary optimizations in simplify and match From: Richard Biener To: Marc Glisse Cc: "Hurugalawadi, Naveen" , "gcc-patches@gcc.gnu.org" Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg02644.txt.bz2 On Sat, Oct 24, 2015 at 11:15 PM, Marc Glisse 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