[patch] [vectorizer] Fix PR tree-optimization/39318
Richard Guenther
richard.guenther@gmail.com
Mon Mar 2 09:42:00 GMT 2009
On Mon, Mar 2, 2009 at 9:12 AM, Ira Rosen <IRAR@il.ibm.com> wrote:
>
> Hi,
>
> When a function call is vectorized, exception handling table should be
> updated with a new vector statement, if necessary. Otherwise, there can be
> a dead entry in EH table causing verify_stmts failure.
>
> Bootstrapped with vectorization enabled on powerpc64-suse-linux and tested
> on x86_64-suse-linux.
> O.K. for mainline?
Ok.
Thanks,
Richard.
> Thanks,
> Ira
>
> ChangeLog:
>
> 2009-03-02 Richard Guenther <rguenther@suse.de>
> Ira Rosen <irar@il.ibm.com>
>
> PR tree-optimization/39318>
> * tree-vect-transform.c (vectorizable_call): Transfer the EH region
> information to the vectorized statement.
>
> testsuite/ChangeLog:
>
> 2009-03-02 Richard Guenther <rguenther@suse.de>
> Ira Rosen <irar@il.ibm.com>
>
> PR tree-optimization/39318
> * gfortran.dg/vect/pr39318.f90: New test.
>
>
> Index: tree-vect-transform.c
> ===================================================================
> --- tree-vect-transform.c (revision 144511)
> +++ tree-vect-transform.c (working copy)
> @@ -3448,6 +3448,10 @@ vectorizable_call (gimple stmt, gimple_s
> return false;
> }
>
> + /* Update the exception handling table with the vector stmt if
> necessary. */
> + if (maybe_clean_or_replace_eh_stmt (stmt, *vec_stmt))
> + gimple_purge_dead_eh_edges (gimple_bb (stmt));
> +
> VEC_free (tree, heap, vargs);
>
> /* The call in STMT might prevent it from being removed in dce.
> Index: testsuite/gfortran.dg/vect/pr39318.f90
> ===================================================================
> --- testsuite/gfortran.dg/vect/pr39318.f90 (revision 0)
> +++ testsuite/gfortran.dg/vect/pr39318.f90 (revision 0)
> @@ -0,0 +1,21 @@
> +! { dg-do compile }
> +! { dg-options "-c -fopenmp -fcray-pointer -fexceptions -O2
> -ftree-vectorize" }
> +!
> + subroutine adw_trajsp (F_u,i0,in,j0,jn)
> + implicit none
> + real F_u(*)
> + integer i0,in,j0,jn
> + integer n,i,j,
> + real*8 xsin(i0:in,j0:jn)
> +!$omp parallel do private(xsin)
> + do j=j0,jn
> + do i=i0,in
> + xsin(i,j) = sqrt(F_u(n))
> + end do
> + end do
> +!$omp end parallel do
> + return
> + end
> +
> +! { dg-final { cleanup-tree-dump "vect" } }
> +!
>
>
More information about the Gcc-patches
mailing list