From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 125125 invoked by alias); 11 Jun 2015 12:02:55 -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 125113 invoked by uid 89); 11 Jun 2015 12:02:54 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS,T_RP_MATCHES_RCVD autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Thu, 11 Jun 2015 12:02:52 +0000 Received: from int-mx13.intmail.prod.int.phx2.redhat.com (int-mx13.intmail.prod.int.phx2.redhat.com [10.5.11.26]) by mx1.redhat.com (Postfix) with ESMTPS id 60307CA645; Thu, 11 Jun 2015 12:02:51 +0000 (UTC) Received: from redhat.com (ovpn-204-44.brq.redhat.com [10.40.204.44]) by int-mx13.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t5BC2lkK012608 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NO); Thu, 11 Jun 2015 08:02:50 -0400 Date: Thu, 11 Jun 2015 12:07:00 -0000 From: Marek Polacek To: Jakub Jelinek Cc: GCC Patches , Richard Biener Subject: Re: match.pd: Optimize (x & y) ^ (x | y) Message-ID: <20150611120246.GZ2756@redhat.com> References: <20150611110432.GY2756@redhat.com> <20150611110905.GW10247@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150611110905.GW10247@tucnak.redhat.com> User-Agent: Mutt/1.5.23 (2014-03-12) X-SW-Source: 2015-06/txt/msg00835.txt.bz2 On Thu, Jun 11, 2015 at 01:09:05PM +0200, Jakub Jelinek wrote: > What about some nop type conversions in between? > int > fn1 (unsigned int x, unsigned int y) > { > int a = x; > int b = y; > unsigned int c = x & y; > int d = a | b; > return (int) (c ^ d); > } > ? Also wonder, if some testcases for match.pd shouldn't be It doesn't work then. Adding some convert?s into the pattern didn't help either. Note that similar patterns don't use convert?s either, so I'm inclined to keep the pattern as is was. > in separate statements so that they don't test the GENERIC folding, > but GIMPLE folding. Sure - fixed in second version of the patch that I'm regtesting right now. Marek