* tree-vect-transform.c (vect_transform_loop): Remove strided scalar
stores only after all the group is vectorized.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@122225
138bc75d-0d04-0410-961f-
82ee72b054a4
+2007-02-22 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/30843
+ * tree-vect-transform.c (vect_transform_loop): Remove strided scalar
+ stores only after all the group is vectorized.
+
2007-02-22 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/30858
+2007-02-22 Dorit Nuzman <dorit@il.ibm.com>
+ Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/30843
+ * gcc.dg/vect/pr30843.c: New test.
+
2007-02-22 Dorit Nuzman <dorit@il.ibm.com>
PR tree-optimization/30858
--- /dev/null
+/* { dg-do compile } */
+/* { dg-require-effective-target vect_long } */
+
+#include <stdarg.h>
+#include "tree-vect.h"
+
+#define N 16
+
+void dacP98FillRGBMap (unsigned char *pBuffer)
+{
+ unsigned long dw, dw1;
+ unsigned long *pdw = (unsigned long *)(pBuffer);
+
+ for( dw = 256, dw1 = 0; dw; dw--, dw1 += 0x01010101)
+ {
+ *pdw++ = dw1;
+ *pdw++ = dw1;
+ *pdw++ = dw1;
+ *pdw++ = dw1;
+ }
+}
+
+/* { dg-final { scan-tree-dump-times "vectorized 1 loops" 1 "vect" { target { vect_interleave } } } } */
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
basic_block *bbs = LOOP_VINFO_BBS (loop_vinfo);
int nbbs = loop->num_nodes;
- block_stmt_iterator si;
+ block_stmt_iterator si, next_si;
int i;
tree ratio = NULL;
int vectorization_factor = LOOP_VINFO_VECT_FACTOR (loop_vinfo);
while (next)
{
+ next_si = bsi_for_stmt (next);
next_stmt_info = vinfo_for_stmt (next);
/* Free the attached stmt_vec_info and remove the stmt. */
ann = stmt_ann (next);
tmp = DR_GROUP_NEXT_DR (next_stmt_info);
free (next_stmt_info);
set_stmt_info (ann, NULL);
+ bsi_remove (&next_si, true);
next = tmp;
}
bsi_remove (&si, true);
continue;
}
}
- else
- {
- if (strided_store)
- {
- /* This is case of skipped interleaved store. We don't free
- its stmt_vec_info. */
- bsi_remove (&si, true);
- continue;
- }
- }
bsi_next (&si);
} /* stmts in BB */
} /* BBs in loop */