+2016-07-08 Alan Hayward <alan.hayward@arm.com>
+
+ PR tree-optimization/71667
+ * tree-vect-loop.c (vectorizable_live_operation): ignore DEBUG stmts
+
2016-07-08 Martin Liska <mliska@suse.cz>
PR middle-end/71606
+2016-07-08 Alan Hayward <alan.hayward@arm.com>
+
+ PR tree-optimization/71667
+ * gcc.dg/vect/pr71667.c: New
+
2016-07-08 Martin Liska <mliska@suse.cz>
* gcc.dg/torture/pr71606.c: New test.
--- /dev/null
+/* { dg-do compile } */
+/* { dg-additional-options "-g" } */
+
+unsigned int mu;
+int pt;
+
+void
+qf (void)
+{
+ int gy;
+ long int vz;
+
+ for (;;)
+ {
+ for (gy = 0; gy < 80; ++gy)
+ {
+ vz = mu;
+ ++mu;
+ pt = (vz != 0) && (pt != 0);
+ }
+ while (gy < 81)
+ while (gy < 83)
+ {
+ vz = (vz != 0) ? 0 : mu;
+ ++gy;
+ }
+ pt = vz;
+ ++mu;
+ }
+}
: gimple_get_lhs (stmt);
lhs_type = TREE_TYPE (lhs);
- /* Find all uses of STMT outside the loop - there should be exactly one. */
+ /* Find all uses of STMT outside the loop - there should be at least one. */
auto_vec<gimple *, 4> worklist;
FOR_EACH_IMM_USE_STMT (use_stmt, imm_iter, lhs)
- if (!flow_bb_inside_loop_p (loop, gimple_bb (use_stmt)))
- worklist.safe_push (use_stmt);
+ if (!flow_bb_inside_loop_p (loop, gimple_bb (use_stmt))
+ && !is_gimple_debug (use_stmt))
+ worklist.safe_push (use_stmt);
gcc_assert (worklist.length () >= 1);
bitsize = TYPE_SIZE (TREE_TYPE (vectype));