public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Marek Polacek <polacek@redhat.com>
To: Richard Biener <rguenther@suse.de>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
	       Richard Sandiford <richard.sandiford@arm.com>
Subject: Re: [PATCH] Don't ICE on symbolic ranges in VRP (PR tree-optimization/68455)
Date: Mon, 23 Nov 2015 17:11:00 -0000	[thread overview]
Message-ID: <20151123170933.GP21807@redhat.com> (raw)
In-Reply-To: <C61E63B1-EE5A-46A6-8723-0E39D9F87392@suse.de>

On Mon, Nov 23, 2015 at 05:40:14PM +0100, Richard Biener wrote:
> On November 23, 2015 5:31:11 PM GMT+01:00, Marek Polacek <polacek@redhat.com> wrote:
> >We blow up on the following testcase because we find ourselves passing
> >[_13 + 1, INT_MAX] as a vr1 to extract_range_from_multiplicative_op_1;
> >that's bad because this function immediately calls vrp_int_const_binop
> >which just doesn't work for symbolic ranges, it only wants int_csts.
> >
> >This started with Richards S.'s changes in r228614 -- we're now since
> >able to recurse into SSA names, thus get better info about ranges.
> >That means that range_includes_zero_p in
> >extract_range_from_binary_expr_1
> >for the *_DIV_EXPR cases was able to determine that the range doesn't
> >include zero, so we went through a different code path and ended up
> >calling extract_range_from_multiplicative_op_1 even with symbolic
> >ranges.
> >
> >I couldn't come up with anything better than checking that we're
> >dealing
> >with nonsymbolic ranges for such a case.
> >
> >Bootstrapped/regtested on x86_64-linux, ok for trunk?
> 
> Hmm.  I think we can do better if vr0 is symbolical - use min, max for it.
> 
> I suppose it would be best to implement a get_integer_range () function doing that or also looking at equivalences if we are getting a symbolic range.
> 
> Anyway, those are future enhancements that shouldn't block this patch.
 
Is this something for this stage3?  Or should I open a PR and fix it in the
next stage1?

> Thus OK.

Thanks.

	Marek

  reply	other threads:[~2015-11-23 17:09 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-23 16:36 Marek Polacek
2015-11-23 16:43 ` Richard Biener
2015-11-23 17:11   ` Marek Polacek [this message]
2015-11-23 21:05     ` Richard Biener

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=20151123170933.GP21807@redhat.com \
    --to=polacek@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=rguenther@suse.de \
    --cc=richard.sandiford@arm.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).