PR tree-optimization/68766
* tree-vectorizer.c (vectorize_loops): Check for
if-converted loops when debug counters are used.
gcc/testsuite/
PR tree-optimization/68766
* gcc.dg/pr68766.c: New test.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@231395
138bc75d-0d04-0410-961f-
82ee72b054a4
+2015-12-08 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/68766
+ * tree-vectorizer.c (vectorize_loops): Check for
+ if-converted loops when debug counters are used.
+
2015-12-07 DJ Delorie <dj@redhat.com>
* config/rl78/constraints.md (Wfr): Change to be a non-memory
+2015-12-08 Ilya Enkovich <enkovich.gnu@gmail.com>
+
+ PR tree-optimization/68766
+ * gcc.dg/pr68766.c: New test.
+
2015-12-07 Eric Botcazou <ebotcazou@adacore.com>
* gcc.target/sparc/struct-ret-check.c: Rename to...
--- /dev/null
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-vectorize -fdbg-cnt=vect_loop:1" } */
+/* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
+/* { dg-prune-output "dbg_cnt 'vect_loop' set to 1" } */
+
+int a, b, g, h;
+int c[58];
+int d[58];
+int fn1() {
+ for (; g; g++)
+ if (a)
+ c[g] = b;
+}
+
+int fn2() {
+ fn1();
+ for (; h; h++)
+ d[h] = 0;
+}
continue;
if (!dbg_cnt (vect_loop))
- break;
+ {
+ /* We may miss some if-converted loops due to
+ debug counter. Set any_ifcvt_loops to visit
+ them at finalization. */
+ any_ifcvt_loops = true;
+ break;
+ }
gimple *loop_vectorized_call = vect_loop_vectorized_call (loop);
if (loop_vectorized_call)