This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR68542]
- From: Yuri Rumyantsev <ysrumyan at gmail dot com>
- To: Richard Biener <richard dot guenther at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>, Igor Zamyatin <izamyatin at gmail dot com>, Kirill Yukhin <kirill dot Yukhin at gmail dot com>
- Date: Mon, 18 Jan 2016 17:02:13 +0300
- Subject: Re: [PATCH PR68542]
- Authentication-results: sourceware.org; auth=none
- References: <CAEoMCqQT9xxV-1sZPEQPfbuVrTvCVsCyWc4pEbiuph_tXMMqFw at mail dot gmail dot com> <CAFiYyc1BRb0-u5mmzT-M6PJk1JUVKLxJHMCJYoxi3f9ABjNhBw at mail dot gmail dot com> <CAEoMCqTV297wcT9D=0M0oG4MryMoG9iU9563BRA=9LHza46xMA at mail dot gmail dot com> <CAFiYyc0Kip21M=rLOZZ2=wAMdXCKAsw1KVJQEW5JZ+-CS4BXUw at mail dot gmail dot com> <CAEoMCqQ9mJUvVsiGLE-ay0iS17Qn-BP2BX8DSLfzAwUqW_Jgtg at mail dot gmail dot com> <CAFiYyc0hTOC74FpjeZuruOuwDZQzXua2xiGjSLCJNJ8XphGmDQ at mail dot gmail dot com> <CAEoMCqRcLz2_X1yZdSzEbxequR0CPMmmX=8UkgyMoZi5_XLoRg at mail dot gmail dot com> <CAEoMCqQshpeSPCRQLQXRY74oMNqq+FoL4L0iAsZRWEKQ__Fcsg at mail dot gmail dot com> <CAFiYyc2Vy7+_9epN8POs7ZU9A3CYYmtpMwZ-2C+F6d=nn_Kx4w at mail dot gmail dot com>
Thanks Richard.
I changed the check on type as you proposed.
What about the second back-end part of patch (it has been sent 08.12.15).
Thanks.
Yuri.
2016-01-18 15:44 GMT+03:00 Richard Biener <richard.guenther@gmail.com>:
> On Mon, Jan 11, 2016 at 11:06 AM, Yuri Rumyantsev <ysrumyan@gmail.com> wrote:
>> Hi Richard,
>>
>> Did you have anu chance to look at updated patch?
>
> diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
> index acbb70b..208a752 100644
> --- a/gcc/tree-vrp.c
> +++ b/gcc/tree-vrp.c
> @@ -5771,6 +5771,10 @@ register_edge_assert_for (tree name, edge e,
> gimple_stmt_iterator si,
> &comp_code, &val))
> return;
>
> + /* VRP doesn't track ranges for vector types. */
> + if (TREE_CODE (TREE_TYPE (name)) == VECTOR_TYPE)
> + return;
> +
>
> please instead fix extract_code_and_val_from_cond_with_ops with
>
> Index: gcc/tree-vrp.c
> ===================================================================
> --- gcc/tree-vrp.c (revision 232506)
> +++ gcc/tree-vrp.c (working copy)
> @@ -5067,8 +5067,9 @@ extract_code_and_val_from_cond_with_ops
> if (invert)
> comp_code = invert_tree_comparison (comp_code, 0);
>
> - /* VRP does not handle float types. */
> - if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (val)))
> + /* VRP only handles integral and pointer types. */
> + if (! INTEGRAL_TYPE_P (TREE_TYPE (val))
> + && ! POINTER_TYPE_P (TREE_TYPE (val)))
> return false;
>
> /* Do not register always-false predicates.
>
> Ok with that change.
>
> Thanks,
> Richard.
>
>> Thanks.
>> Yuri.
>>
>> 2015-12-18 13:20 GMT+03:00 Yuri Rumyantsev <ysrumyan@gmail.com>:
>>> Hi Richard,
>>>
>>> Here is updated patch for middle-end part of the whole patch which
>>> fixes all your remarks I hope.
>>>
>>> Regression testing and bootstrapping did not show any new failures.
>>> Is it OK for trunk?
>>>
>>> Yuri.
>>>
>>> ChangeLog:
>>> 2015-12-18 Yuri Rumyantsev <ysrumyan@gmail.com>
>>>
>>> PR middle-end/68542
>>> * fold-const.c (fold_binary_op_with_conditional_arg): Bail out for case
>>> of mixind vector and scalar types.
>>> (fold_relational_const): Add handling of vector
>>> comparison with boolean result.
>>> * tree-cfg.c (verify_gimple_comparison): Add argument CODE, allow
>>> comparison of vector operands with boolean result for EQ/NE only.
>>> (verify_gimple_assign_binary): Adjust call for verify_gimple_comparison.
>>> (verify_gimple_cond): Likewise.
>>> * tree-ssa-forwprop.c (combine_cond_expr_cond): Do not perform