From: Richard Biener <rguenther@suse.de>
To: Jakub Jelinek <jakub@redhat.com>
Cc: gcc-patches@gcc.gnu.org
Subject: Re: [PATCH] Fix VRP update_value_range and caller (PR tree-optimization/65875)
Date: Mon, 27 Apr 2015 08:18:00 -0000 [thread overview]
Message-ID: <alpine.LSU.2.11.1504271018020.20496@zhemvz.fhfr.qr> (raw)
In-Reply-To: <20150427081210.GS1751@tucnak.redhat.com>
On Mon, 27 Apr 2015, Jakub Jelinek wrote:
> 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.
Ah, I misread the || for a &&. The patch is ok with just dropping
the == VR_VARYING check.
Thanks,
Richard.
prev parent reply other threads:[~2015-04-27 8:18 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-24 19:23 Jakub Jelinek
2015-04-27 8:05 ` Richard Biener
2015-04-27 8:12 ` Jakub Jelinek
2015-04-27 8:18 ` Richard Biener [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=alpine.LSU.2.11.1504271018020.20496@zhemvz.fhfr.qr \
--to=rguenther@suse.de \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).