re PR tree-optimization/59523 (r205856 caused internal compiler error: verify_ssa failed)

PR tree-optimization/59523
	* tree-vectorizer.c (fold_loop_vectorized_call): Call update_stmt
	on updated stmts.

	* gcc.dg/pr59523.c: New test.

From-SVN: r206069
This commit is contained in:
Jakub Jelinek 2013-12-17 22:36:21 +01:00 committed by Jakub Jelinek
parent 5aac5cb24b
commit 14407011d6
4 changed files with 33 additions and 2 deletions

View File

@ -1,3 +1,9 @@
2013-12-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/59523
* tree-vectorizer.c (fold_loop_vectorized_call): Call update_stmt
on updated stmts.
2013-12-17 Aldy Hernandez <aldyh@redhat.com>
* ipa-inline.c (gate_ipa_inline): Remove.

View File

@ -1,3 +1,8 @@
2013-12-17 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/59523
* gcc.dg/pr59523.c: New test.
2013-12-17 Marek Polacek <polacek@redhat.com>
* c-c++-common/ubsan/overflow-int128.c: New test.

View File

@ -0,0 +1,17 @@
/* PR tree-optimization/59523 */
/* { dg-do compile } */
/* { dg-options "-O3" } */
/* { dg-additional-options "-mavx2" { target { i?86-*-* x86_64-*-* } } } */
int *
foo (int a, int *b, int *c, int *d)
{
int i, *r = __builtin_alloca (a * sizeof (int));
__builtin_memcpy (r, d, a * sizeof (int));
for (i = 0; i < 64; i++)
c[i] += b[i];
for (i = 0; i < a; i++)
if (r[i] == 0)
r[i] = 1;
return r;
}

View File

@ -369,8 +369,11 @@ fold_loop_vectorized_call (gimple g, tree value)
update_call_from_tree (&gsi, value);
FOR_EACH_IMM_USE_STMT (use_stmt, iter, lhs)
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, value);
{
FOR_EACH_IMM_USE_ON_STMT (use_p, iter)
SET_USE (use_p, value);
update_stmt (use_stmt);
}
}
/* Function vectorize_loops.