+2008-08-23 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/37174
+ * tree-vect-analyze.c (vect_get_and_check_slp_defs): Check that the
+ def stmt is a part of the loop before accessing its stmt_vec_info.
+
2008-08-22 Anatoly Sokolov <aesok@post.ru>
PR target/11259
+2008-08-23 Ira Rosen <irar@il.ibm.com>
+
+ PR tree-optimization/37174
+ * g++.dg/vect/pr37174.cc: New test.
+
2008-08-22 Richard Guenther <rguenther@suse.de>
PR tree-optimization/37078
--- /dev/null
+/* { dg-do compile } */
+
+int* getFoo();
+struct Bar {
+ Bar();
+ int* foo1;
+ int* foo2;
+ int* table[4][4][4];
+};
+Bar::Bar() {
+ foo1 = getFoo();
+ foo2 = getFoo();
+ for (int a = 0; a < 4; ++a) {
+ for (int b = 0; b < 4; ++b) {
+ for (int c = 0; c < 4; ++c) {
+ table[a][b][c] = foo1;
+ }
+ }
+ }
+}
+
+/* { dg-final { cleanup-tree-dump "vect" } } */
+
stmt_vec_info stmt_info =
vinfo_for_stmt (VEC_index (gimple, SLP_TREE_SCALAR_STMTS (slp_node), 0));
enum gimple_rhs_class rhs_class;
+ struct loop *loop = LOOP_VINFO_LOOP (loop_vinfo);
rhs_class = get_gimple_rhs_class (gimple_assign_rhs_code (stmt));
number_of_oprnds = gimple_num_ops (stmt) - 1; /* RHS only */
/* Check if DEF_STMT is a part of a pattern and get the def stmt from
the pattern. Check that all the stmts of the node are in the
pattern. */
- if (def_stmt && vinfo_for_stmt (def_stmt)
+ if (def_stmt && gimple_bb (def_stmt)
+ && flow_bb_inside_loop_p (loop, gimple_bb (def_stmt))
+ && vinfo_for_stmt (def_stmt)
&& STMT_VINFO_IN_PATTERN_P (vinfo_for_stmt (def_stmt)))
{
if (!*first_stmt_dt0)