re PR tree-optimization/55110 (Internal compiler error in vectorizable_reduction, at tree-vect-loop.c:4633)

PR tree-optimization/55110
	* tree-vect-loop.c (vectorizable_reduction): Don't assert
	that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.

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

From-SVN: r193845
This commit is contained in:
Jakub Jelinek 2012-11-27 14:34:11 +01:00 committed by Jakub Jelinek
parent 381d45ed49
commit 7fc3eedbeb
4 changed files with 24 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2012-11-27 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/55110
* tree-vect-loop.c (vectorizable_reduction): Don't assert
that STMT_VINFO_RELATED_STMT of orig_stmt is stmt.
2012-11-27 Richard Biener <rguenther@suse.de>
* gimple-fold.c (fold_stmt_1): Remove unnecessary code.

View file

@ -1,3 +1,8 @@
2012-11-27 Jakub Jelinek <jakub@redhat.com>
PR tree-optimization/55110
* gcc.dg/pr55110.c: New test.
2012-11-27 Richard Biener <rguenther@suse.de>
PR middle-end/55331

View file

@ -0,0 +1,13 @@
/* PR tree-optimization/55110 */
/* { dg-do compile } */
/* { dg-options "-O1 -ftree-vectorize" } */
int
foo (int x)
{
int a, b;
for (b = 0; b < 8; b++)
for (a = 0; a < 2; a++)
x /= 3;
return x;
}

View file

@ -4624,7 +4624,6 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi,
if (orig_stmt)
{
orig_stmt_info = vinfo_for_stmt (orig_stmt);
gcc_assert (STMT_VINFO_RELATED_STMT (orig_stmt_info) == stmt);
gcc_assert (STMT_VINFO_IN_PATTERN_P (orig_stmt_info));
gcc_assert (!STMT_VINFO_IN_PATTERN_P (stmt_info));
}