+2008-09-21 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/37539
+ * tree-vect-transform.c (vect_transform_strided_load): Save vector
+ statement in related statement field only for the first load of the
+ group of loads with the same data reference.
+
2008-09-20 Adam Nemet <anemet@caviumnetworks.com>
* config/mips/mips.h (TUNE_OCTEON): New macro.
+2008-09-21 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/37539
+ * gcc.dg/vect/pr37539.c: New test.
+
2008-09-20 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/33642
--- /dev/null
+/* { dg-require-effective-target vect_int } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+__attribute__ ((noinline)) void
+ayuv2yuyv_ref (int *d, int *src, int n)
+{
+ char *dest = (char *)d;
+ int i;
+
+ for(i=0;i<n/2;i++){
+ dest[i*4 + 0] = (src[i*2 + 0])>>16;
+ dest[i*4 + 1] = (src[i*2 + 1])>>8;
+ dest[i*4 + 2] = (src[i*2 + 0])>>16;
+ dest[i*4 + 3] = (src[i*2 + 0])>>0;
+ }
+
+ /* Check results. */
+ for(i=0;i<n/2;i++){
+ if (dest[i*4 + 0] != (src[i*2 + 0])>>16
+ || dest[i*4 + 1] != (src[i*2 + 1])>>8
+ || dest[i*4 + 2] != (src[i*2 + 0])>>16
+ || dest[i*4 + 3] != (src[i*2 + 0])>>0)
+ abort();
+ }
+}
+
+int main ()
+{
+ int d[256], src[128], i;
+
+ for (i = 0; i < 128; i++)
+ src[i] = i;
+
+ ayuv2yuyv_ref(d, src, 128);
+
+ return 0;
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 2 "vect" { target vect_strided_wide } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
+
+
STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt)) = new_stmt;
else
{
- gimple prev_stmt =
- STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt));
- gimple rel_stmt =
- STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt));
- while (rel_stmt)
- {
- prev_stmt = rel_stmt;
- rel_stmt = STMT_VINFO_RELATED_STMT (vinfo_for_stmt (rel_stmt));
- }
- STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt)) = new_stmt;
+ if (!DR_GROUP_SAME_DR_STMT (vinfo_for_stmt (next_stmt)))
+ {
+ gimple prev_stmt =
+ STMT_VINFO_VEC_STMT (vinfo_for_stmt (next_stmt));
+ gimple rel_stmt =
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt));
+ while (rel_stmt)
+ {
+ prev_stmt = rel_stmt;
+ rel_stmt =
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (rel_stmt));
+ }
+
+ STMT_VINFO_RELATED_STMT (vinfo_for_stmt (prev_stmt)) =
+ new_stmt;
+ }
}
+
next_stmt = DR_GROUP_NEXT_DR (vinfo_for_stmt (next_stmt));
gap_count = 1;
/* If NEXT_STMT accesses the same DR as the previous statement,