From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2084 invoked by alias); 27 Apr 2015 08:12:18 -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 1980 invoked by uid 89); 27 Apr 2015 08:12:17 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.9 required=5.0 tests=AWL,BAYES_00,SPF_HELO_PASS,SPF_PASS,T_RP_MATCHES_RCVD autolearn=ham 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; Mon, 27 Apr 2015 08:12:16 +0000 Received: from int-mx09.intmail.prod.int.phx2.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by mx1.redhat.com (Postfix) with ESMTPS id 75EAA8E3CF; Mon, 27 Apr 2015 08:12:15 +0000 (UTC) Received: from tucnak.zalov.cz (ovpn-116-89.ams2.redhat.com [10.36.116.89]) by int-mx09.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t3R8CDxZ008323 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 27 Apr 2015 04:12:14 -0400 Received: from tucnak.zalov.cz (localhost [127.0.0.1]) by tucnak.zalov.cz (8.14.9/8.14.9) with ESMTP id t3R8CBu8008846; Mon, 27 Apr 2015 10:12:12 +0200 Received: (from jakub@localhost) by tucnak.zalov.cz (8.14.9/8.14.9/Submit) id t3R8CA9V008845; Mon, 27 Apr 2015 10:12:10 +0200 Date: Mon, 27 Apr 2015 08:12:00 -0000 From: Jakub Jelinek To: Richard Biener Cc: gcc-patches@gcc.gnu.org Subject: Re: [PATCH] Fix VRP update_value_range and caller (PR tree-optimization/65875) Message-ID: <20150427081210.GS1751@tucnak.redhat.com> Reply-To: Jakub Jelinek References: <20150424192256.GO1751@tucnak.redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes X-SW-Source: 2015-04/txt/msg01579.txt.bz2 On Mon, Apr 27, 2015 at 10:05:21AM +0200, Richard Biener wrote: > > --- gcc/tree-vrp.c.jj 2015-04-20 14:35:39.000000000 +0200 > > +++ gcc/tree-vrp.c 2015-04-24 18:10:41.321367440 +0200 > > @@ -892,7 +892,12 @@ update_value_range (const_tree var, valu > > UNDEFINED or from VARYING. */ > > if (new_vr->type == VR_UNDEFINED > > || old_vr->type == VR_VARYING) > > - set_value_range_to_varying (old_vr); > > + { > > + BITMAP_FREE (new_vr->equiv); > > + set_value_range_to_varying (old_vr); > > + set_value_range_to_varying (new_vr); > > + return true; > > Actually we didn't change anything here (old_vr->type is VARYING already, > so we shouldn't even have visited the stmt defining the SSA name again... > eventually your fix below fixes that. On the testcase, old_vr wasn't actually VARYING, but new_vr was UNDEFINED (a result of intersecting disjoint ranges). While for old_vr->type == VR_VARYING I agree we shouldn't have been called on this. And turning a VR_RANGE into VR_UNDEFINED is going in the wrong direction in the lattice. Jakub