2009-03-02 Richard Guenther <rguenther@suse.de>
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Mar 2009 11:52:15 +0000 (11:52 +0000)
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 2 Mar 2009 11:52:15 +0000 (11:52 +0000)
            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.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@144541 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/vect/pr39318.f90 [new file with mode: 0644]
gcc/tree-vect-transform.c

index 012e808..18ebfbf 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2009-03-01  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.h (CONDITIONAL_REGISTER_USAGE): Do not shadow "i"
index b1afa60..239c9e4 100644 (file)
@@ -1,3 +1,9 @@
+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.
+
 2009-03-01  Jan Hubicka  <jh@suse.cz>
 
        * gcc.dg/debug/dwarf2/ipa-cp1.c: New testcase.
diff --git a/gcc/testsuite/gfortran.dg/vect/pr39318.f90 b/gcc/testsuite/gfortran.dg/vect/pr39318.f90
new file mode 100644 (file)
index 0000000..9e58a17
--- /dev/null
@@ -0,0 +1,21 @@
+! { dg-do compile } 
+! { dg-options "-c -fopenmp -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" } }
+
index abb33e2..5f9884f 100644 (file)
@@ -3450,6 +3450,10 @@ vectorizable_call (gimple stmt, gimple_stmt_iterator *gsi, gimple *vec_stmt)
 
   VEC_free (tree, heap, vargs);
 
+  /* 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));
+
   /* The call in STMT might prevent it from being removed in dce.
      We however cannot remove it here, due to the way the ssa name
      it defines is mapped to the new definition.  So just replace