OSDN Git Service

PR tree-optimization/39595
authorirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Apr 2009 12:39:28 +0000 (12:39 +0000)
committerirar <irar@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 2 Apr 2009 12:39:28 +0000 (12:39 +0000)
* tree-vect-slp.c (vect_build_slp_tree): Check that the size of
interleaved loads group is not greater than the SLP group size.

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

gcc/ChangeLog
gcc/testsuite/ChangeLog
gcc/testsuite/gfortran.dg/vect/O3-pr39595.f [new file with mode: 0644]
gcc/tree-vect-slp.c

index af401e7..3081e26 100644 (file)
@@ -1,3 +1,9 @@
+2009-04-02  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/39595
+       * tree-vect-slp.c (vect_build_slp_tree): Check that the size of 
+       interleaved loads group is not  greater than the SLP group size.
+
 2009-04-02  Rafael Avila de Espindola  <espindola@google.com>
 
        * builtins.c (is_builtin_name): New.
index 3081d43..3e949b9 100644 (file)
@@ -1,3 +1,8 @@
+2009-04-02  Ira Rosen  <irar@il.ibm.com>
+
+       PR tree-optimization/39595
+       * gfortran.dg/vect/O3-pr39595.f: New test.
+
 2009-04-02  Dodji Seketeli  <dodji@redhat.com>
 
        PR c++/26693
diff --git a/gcc/testsuite/gfortran.dg/vect/O3-pr39595.f b/gcc/testsuite/gfortran.dg/vect/O3-pr39595.f
new file mode 100644 (file)
index 0000000..021d35b
--- /dev/null
@@ -0,0 +1,17 @@
+! { dg-do compile }
+      subroutine foo(a,c,i,m)
+      real a(4,*),b(3,64),c(3,200),d(64)
+      integer*8 i,j,k,l,m
+      do j=1,m,64
+        do k=1,m-j+1
+          d(k)=a(4,j-1+k)
+          do l=1,3
+            b(l,k)=c(l,i)+a(l,j-1+k)
+          end do
+        end do
+        call bar(b,d,i)
+      end do
+      end
+
+! { dg-final { cleanup-tree-dump "vect" } }
+
index fe01a76..60478e9 100644 (file)
@@ -466,6 +466,22 @@ vect_build_slp_tree (loop_vec_info loop_vinfo, slp_tree *node,
  
                     return false;
                   }
+
+                /* Check that the size of interleaved loads group is not
+                   greater than the SLP group size.  */
+                if (DR_GROUP_SIZE (vinfo_for_stmt (stmt))
+                    > ncopies * group_size)
+                  {
+                    if (vect_print_dump_info (REPORT_SLP))
+                      {
+                        fprintf (vect_dump, "Build SLP failed: the number of "
+                                            "interleaved loads is greater than"
+                                            " the SLP group size ");
+                        print_gimple_stmt (vect_dump, stmt, 0, TDF_SLIM);
+                      }
+
+                    return false;
+                  }
  
                 first_load = DR_GROUP_FIRST_DR (vinfo_for_stmt (stmt));