2011-08-22 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/50133
+ * tree-vect-stmts.c (vect_finish_stmt_generation): Copy location
+ from stmt instead of some statement around gsi.
+
PR middle-end/50141
* expr.c (get_bit_range): Only use DECL_THREAD_LOCAL_P if
innerdecl is a VAR_DECL.
2011-08-22 Jakub Jelinek <jakub@redhat.com>
+ PR tree-optimization/50133
+ * gcc.dg/pr50133.c: New test.
+
PR middle-end/50141
* c-c++-common/cxxbitfields-6.c: New test.
--- /dev/null
+/* PR tree-optimization/50133 */
+/* { dg-do compile } */
+/* { dg-options "-O -ftree-vectorize -fno-tree-loop-im" } */
+
+extern int A[], B[];
+
+void
+foo (int z)
+{
+ int j, i;
+ for (j = 0; j < 32; j++)
+ {
+ int a = A[0];
+ for (i = 0; i < 16; i++)
+ a = A[i] ? a : z;
+ B[j] = a;
+ }
+}
stmt_vec_info stmt_info = vinfo_for_stmt (stmt);
loop_vec_info loop_vinfo = STMT_VINFO_LOOP_VINFO (stmt_info);
bb_vec_info bb_vinfo = STMT_VINFO_BB_VINFO (stmt_info);
- gimple_stmt_iterator si;
gcc_assert (gimple_code (stmt) != GIMPLE_LABEL);
print_gimple_stmt (vect_dump, vec_stmt, 0, TDF_SLIM);
}
- si = *gsi;
- if (is_gimple_debug (gsi_stmt (si)))
- {
- gsi_next_nondebug (&si);
- gcc_assert (!gsi_end_p (si));
- }
- gimple_set_location (vec_stmt, gimple_location (gsi_stmt (si)));
+ gimple_set_location (vec_stmt, gimple_location (stmt));
}
/* Checks if CALL can be vectorized in type VECTYPE. Returns