From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 115881 invoked by alias); 11 Nov 2015 10:26: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 115825 invoked by uid 89); 11 Nov 2015 10:26:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-3.2 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD,SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx2.suse.de Received: from mx2.suse.de (HELO mx2.suse.de) (195.135.220.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (CAMELLIA256-SHA encrypted) ESMTPS; Wed, 11 Nov 2015 10:26:17 +0000 Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 68489AAC7; Wed, 11 Nov 2015 10:25:54 +0000 (UTC) Date: Wed, 11 Nov 2015 10:26:00 -0000 From: Richard Biener To: Jiong Wang cc: GCC Patches Subject: Re: [Patch] PR tree-optimization/68234 Improve range info for loop Phi node In-Reply-To: <5643091B.9090009@foss.arm.com> Message-ID: References: <5643091B.9090009@foss.arm.com> User-Agent: Alpine 2.11 (LSU 23 2013-08-11) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2015-11/txt/msg01328.txt.bz2 On Wed, 11 Nov 2015, Jiong Wang wrote: > As discussed at https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68234, this > patch haven't touch the existed code logic in vrp_visit_phi_node, it > only entends SCEV check to those VR_VARYING loop PHI node. > > Previously, we only do this check if the PHI node is with valid range > info but later dropped either side to infinite. The miss of those PHI > node with initial estimiation of VR_VARYING caused the missing of some > further optimization opportunity, for example the testcase included in > this patch, with improved range info, we can efficient turn the signed > divide into right shift. > > This patch pass x86-64 and AArch64 boostrap, no regression on both. > Meanwhile a simple benchmaring shows there are quite a few new VR_RANGE > found after this patch during gcc bootstrapping. There is no performance > regression on spec2006 int on aarch64. > > During gcc bootstrapping, on x86-64 there are 4828 new VR_VARYING -> VR_RANGE > found by vrp1, and 5008 new by vrp2. > > While on AArch64 there are 44756 new by vrp1, and 6047 new by vrp2. > > OK for trunk? Ok. Thanks, Richard. > 2015-11-11 Richard Biener > Jiong Wang > gcc/ > PR tree-optimization/68234 > * tree-vrp.c (vrp_visit_phi_node): Extend SCEV check to those loop PHI > node which estimiated to be VR_VARYING initially. > > gcc/testsuite/ > * gcc.dg/tree-ssa/pr68234.c: New testcase.