This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH PR70729] The second part of patch.
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Yuri Rumyantsev <ysrumyan at gmail dot com>
- Cc: Jakub Jelinek <jakub at redhat dot com>, Thomas Schwinge <thomas at codesourcery dot com>, gcc-patches <gcc-patches at gcc dot gnu dot org>, Igor Zamyatin <izamyatin at gmail dot com>, ÐÐÑÑ ÐÐÐÐÐÐÑ <enkovich dot gnu at gmail dot com>
- Date: Fri, 1 Jul 2016 10:05:00 +0200
- Subject: Re: [PATCH PR70729] The second part of patch.
- Authentication-results: sourceware.org; auth=none
- References: <CAEoMCqSx5+c2N9UpvbntYPaTxcBwzk3pAY+Kfc9wFVQp8qDMbA at mail dot gmail dot com> <87eg7gt1bw dot fsf at kepler dot schwinge dot homeip dot net> <CAEoMCqQ6WEO2p0DzbtSuxjbn10=b-0kJXx4tqzXuz16rb7=igg at mail dot gmail dot com> <20160630122145 dot GM7387 at tucnak dot redhat dot com> <CAEoMCqTqHsxOJ9J7NCH2=6qx-JiDpqPd3shoRKhw5Wn8U0QNgA at mail dot gmail dot com> <87eg7eoisz dot fsf at hertz dot schwinge dot homeip dot net> <20160630142844 dot GN7387 at tucnak dot redhat dot com> <CAEoMCqShQro1LDzOzBqUWRA-Csdt9MdNuqqDThPr+uJazNOKvQ at mail dot gmail dot com>
On Thu, Jun 30, 2016 at 4:51 PM, Yuri Rumyantsev <ysrumyan@gmail.com> wrote:
> Richard,
>
> Could you please review additional simple fix for 70729 - we need to
> nullify safelen field of loops containing simduid intrinsics like
> GOMP_SIMD_LANE (introduced e.g. for private variables). I checked
> that this fix cures regression which was missed by me since AVX2
> machine is required for libgomp.fortran/examples-4/simd-2.f90.
>
> Regression testing and bootstrapping did not show any new failures.
> Is it OK for trunk?
Ok.
RIchard.
> Patch:
> diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
> index 2669813..9fbd183 100644
> --- a/gcc/tree-vectorizer.c
> +++ b/gcc/tree-vectorizer.c
> @@ -204,6 +204,10 @@ adjust_simduid_builtins (hash_table<simduid_to_vf> *htab)
> gcc_assert (TREE_CODE (arg) == SSA_NAME);
> simduid_to_vf *p = NULL, data;
> data.simduid = DECL_UID (SSA_NAME_VAR (arg));
> + /* Need to nullify loop safelen field since it's value is not
> + valid after transformation. */
> + if (bb->loop_father && bb->loop_father->safelen > 0)
> + bb->loop_father->safelen = 0;
> if (htab)
> {
> p = htab->find (&data);
>
> ChangeLog:
> 2016-06-30 Yuri Rumyantsev <ysrumyan@gmail.com>
>
> PR tree-optimization/70729
> * tree-vectorizer.c (adjust_simduid_builtins): Nullify safelen field
> of loop since it can be not valid after transformation.
>
> 2016-06-30 17:28 GMT+03:00 Jakub Jelinek <jakub@redhat.com>:
>> On Thu, Jun 30, 2016 at 04:25:16PM +0200, Thomas Schwinge wrote:
>>> Hi!
>>>
>>> On Thu, 30 Jun 2016 16:48:25 +0300, Yuri Rumyantsev <ysrumyan@gmail.com> wrote:
>>> > Thanks for your help.
>>> > Could you please look at the following simple patch which cures
>>> > regression - we need to nullify loop safelen field in
>>> > adjust_simduid_builtins:
>>> >
>>> > diff --git a/gcc/tree-vectorizer.c b/gcc/tree-vectorizer.c
>>> > index 2669813..f70380c 100644
>>> > --- a/gcc/tree-vectorizer.c
>>> > +++ b/gcc/tree-vectorizer.c
>>> > @@ -204,6 +204,10 @@ adjust_simduid_builtins (hash_table<simduid_to_vf> *htab)
>>> > gcc_assert (TREE_CODE (arg) == SSA_NAME);
>>> > simduid_to_vf *p = NULL, data;
>>> > data.simduid = DECL_UID (SSA_NAME_VAR (arg));
>>> > + /* Need to nullify safelen fielf of loop since it's vale is not
>>> > + valid after transformation. */
>>
>> s/fielf/field/
>> s/vale/value/
>>
>>> > + if (bb->loop_father && bb->loop_father->safelen > 0)
>>> > + bb->loop_father->safelen = 0;
>>> > if (htab)
>>> > {
>>> > p = htab->find (&data);
>>
>> Jakub