From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9545 invoked by alias); 12 Jul 2010 17:30:58 -0000 Received: (qmail 9532 invoked by uid 22791); 12 Jul 2010 17:30:56 -0000 X-SWARE-Spam-Status: No, hits=-6.9 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 12 Jul 2010 17:30:49 +0000 Received: from int-mx01.intmail.prod.int.phx2.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o6CHUma9001004 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Mon, 12 Jul 2010 13:30:48 -0400 Received: from ns3.rdu.redhat.com (ns3.rdu.redhat.com [10.11.255.199]) by int-mx01.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o6CHUlEw004411; Mon, 12 Jul 2010 13:30:47 -0400 Received: from [172.17.76.3] (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by ns3.rdu.redhat.com (8.13.8/8.13.8) with ESMTP id o6CHUkMP007662; Mon, 12 Jul 2010 13:30:46 -0400 Message-ID: <4C3B5146.9060607@redhat.com> Date: Mon, 12 Jul 2010 17:30:00 -0000 From: Jeff Law User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.10) Gecko/20100621 Fedora/3.0.5-1.fc13 Thunderbird/3.0.5 MIME-Version: 1.0 To: Jakub Jelinek CC: gcc-patches@gcc.gnu.org, aldot@gcc.gnu.org, Denys Vlasenko Subject: Re: [PATCH] Further improve VRP BIT_AND_EXPR and BIT_IOR_EXPR handling (PR tree-optimization/28632) References: <20100709191153.GQ20208@tyan-ft48-01.lab.bos.redhat.com> In-Reply-To: <20100709191153.GQ20208@tyan-ft48-01.lab.bos.redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 X-SW-Source: 2010-07/txt/msg00996.txt.bz2 On 07/09/10 13:11, Jakub Jelinek wrote: > Hi! > > When writing the last VRP BIT_AND_EXPR patch, I wasn't aware of this PR. > Looking at it there indeed are further possibilities for optimizations, > both for BIT_AND_EXPR and also BIT_IOR_EXPR. For the latter, e.g. we used > to derive from [0x400, 0x40f] | [0x800, 0x80f] a [0x800, 0xc0f] > range, while this patch computes [0xc00, 0xc0f] range. > The new helper function might be useful even when optimizing away useless > BIT_AND_EXPR or BIT_IOR_EXPRs. > > Bootstrapped/regtested on x86_64-linux and i686-linux. Ok for trunk? > If you wanted to get ambitious, you could go through all the zero/nonzero bit stuff in combine.c and translate it to VRP style. It'd be interesting to know how many of those transformations trigger on the higher level IR. Jeff