re PR tree-optimization/68766 (internal compiler error: in expand_LOOP_VECTORIZED, at internal-fn.c:1905)

gcc/

	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.

From-SVN: r231395
This commit is contained in:
Ilya Enkovich 2015-12-08 07:16:04 +00:00 committed by Ilya Enkovich
parent 27d815b236
commit dc9604d432
4 changed files with 37 additions and 1 deletions

View File

@ -1,3 +1,9 @@
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

View File

@ -1,3 +1,8 @@
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...

View File

@ -0,0 +1,19 @@
/* { 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;
}

View File

@ -536,7 +536,13 @@ vectorize_loops (void)
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)