From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 42718 invoked by alias); 3 Sep 2015 15:25:19 -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 42641 invoked by uid 89); 3 Sep 2015 15:25:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.2 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, 03 Sep 2015 15:25:18 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id BC93EA2C27; Thu, 3 Sep 2015 15:25:15 +0000 (UTC) Received: from localhost.localdomain (ovpn-113-93.phx2.redhat.com [10.3.113.93]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t83FPEim017676; Thu, 3 Sep 2015 11:25:14 -0400 Subject: Re: RFC: Combine of compare & and oddity To: Segher Boessenkool References: <000e01d0e5a2$1e2f66b0$5a8e3410$@com> <55E7553E.8050905@redhat.com> <20150902210015.GB7676@gate.crashing.org> Cc: Wilco Dijkstra , "'GCC Patches'" From: Jeff Law Message-ID: <55E86659.70404@redhat.com> Date: Thu, 03 Sep 2015 15:26:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <20150902210015.GB7676@gate.crashing.org> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-09/txt/msg00274.txt.bz2 On 09/02/2015 03:00 PM, Segher Boessenkool wrote: > On Wed, Sep 02, 2015 at 01:59:58PM -0600, Jeff Law wrote: >>> (set (reg:CC 66 cc) >>> (compare:CC (and:DI (lshiftrt:DI (subreg:DI (reg/v:SI 76 [ xD.2641 ]) >>> 0) >>> (const_int 1 [0x1])) >>> (const_int 1 [0x1])) >>> (const_int 0 [0]))) >> Yea, this is an alternative form. I don't offhand remember how/why >> this form appears, but it certainly does. I don't think any ports >> handle this form (but I certainly have done any checks), but I believe >> combine creates it primarily for internal purposes. > > Combine replaces zero_ext* with equivalent shift/and patterns and tries > again, if things don't match. Targets with more generic masking insns > do not want to describe the very many cases that can be described with > zero_ext* separately. > > rs6000 handles this exact pattern, btw. And I'll be very happy if we can > just drop it :-) If I still cared, I'd probably look into this for the PA which has some rough similarities with the PPC architecture in its bit insertion/extraction capabilities. But the PA just isn't worth the time :-) >> cindex @code{zero_extract}, canonicalization of >> @cindex @code{sign_extract}, canonicalization of >> @item >> Equality comparisons of a group of bits (usually a single bit) with zero >> will be written using @code{zero_extract} rather than the equivalent >> @code{and} or @code{sign_extract} operations. > > Oh it's even documented, thanks. I do still think we should think of > changing this. Do-able, but I suspect the fallout would be significant across the older ports. Jeff