On Thu, Jun 30, 2016 at 7:51 AM, Yuri Rumyantsev <ysrum...@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?
>
> 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  <ysrum...@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.
>

I still see

FAIL: libgomp.fortran/simd3.f90   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution
test
FAIL: libgomp.fortran/simd3.f90   -O3 -g  execution test
FAIL: libgomp.fortran/simd4.f90   -O3 -fomit-frame-pointer
-funroll-loops -fpeel-loops -ftracer -finline-functions  execution
test
FAIL: libgomp.fortran/simd4.f90   -O3 -g  execution test

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=71734

-- 
H.J.

Reply via email to