This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Don't ICE on symbolic ranges in VRP (PR tree-optimization/68455)
- From: Richard Biener <rguenther at suse dot de>
- To: Marek Polacek <polacek at redhat dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>,Richard Sandiford <richard dot sandiford at arm dot com>
- Date: Mon, 23 Nov 2015 22:04:08 +0100
- Subject: Re: [PATCH] Don't ICE on symbolic ranges in VRP (PR tree-optimization/68455)
- Authentication-results: sourceware.org; auth=none
- References: <20151123163111 dot GN21807 at redhat dot com> <C61E63B1-EE5A-46A6-8723-0E39D9F87392 at suse dot de> <20151123170933 dot GP21807 at redhat dot com>
On November 23, 2015 6:09:33 PM GMT+01:00, Marek Polacek <polacek@redhat.com> wrote:
>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?
Open a PR for next stage1. Unless you are able to create a testcase that regressed of course.
Richard.
>> Thus OK.
>
>Thanks.
>
> Marek