Commit 6f4454fc by Ira Rosen Committed by Ira Rosen

re PR tree-optimization/41008 (ICE in vect_is_simple_reduction, at tree-vect-loop.c:1708)


	PR tree-optimization/41008
	* tree-vect-loop.c (vect_is_simple_reduction): Get operands
	from condition only in case it's a comparison. Adjust checks.

From-SVN: r150591
parent 0a940ddd
2009-08-09 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/41008
* tree-vect-loop.c (vect_is_simple_reduction): Get operands
from condition only in case it's a comparison. Adjust checks.
2009-08-09 Bernd Schmidt <bernd.schmidt@analog.com>
* tree-dfa.c (renumber_gimple_stmt_uids_in_blocks): New function.
......
2009-08-09 Ira Rosen <irar@il.ibm.com>
PR tree-optimization/41008
* gcc.dg/vect/O1-pr41008.c: New test.
2009-08-05 Tobias Burnus <burnus@net-b.de>
PR fortran/40955
......
/* { dg-do compile } */
double heating[2][2];
void foo (int, int);
void map_do()
{
int jsav, ksav, k, j;
for(k = 0; k < 2; k++)
for(j = 0; j < 2; j++)
if (heating[k][j] > 0.)
{
jsav = j;
ksav = k;
}
foo (jsav, ksav);
}
/* { dg-final { cleanup-tree-dump "vect" } } */
......@@ -1705,8 +1705,13 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple phi,
return NULL;
}
op3 = TREE_OPERAND (TREE_OPERAND (gimple_assign_rhs1 (def_stmt), 0), 0);
op4 = TREE_OPERAND (TREE_OPERAND (gimple_assign_rhs1 (def_stmt), 0), 1);
op3 = TREE_OPERAND (gimple_assign_rhs1 (def_stmt), 0);
if (COMPARISON_CLASS_P (op3))
{
op4 = TREE_OPERAND (op3, 1);
op3 = TREE_OPERAND (op3, 0);
}
op1 = TREE_OPERAND (gimple_assign_rhs1 (def_stmt), 1);
op2 = TREE_OPERAND (gimple_assign_rhs1 (def_stmt), 2);
......@@ -1750,10 +1755,14 @@ vect_is_simple_reduction (loop_vec_info loop_info, gimple phi,
print_generic_expr (vect_dump, TREE_TYPE (op1), TDF_SLIM);
fprintf (vect_dump, ",");
print_generic_expr (vect_dump, TREE_TYPE (op2), TDF_SLIM);
if (op3 && op4)
if (op3)
{
fprintf (vect_dump, ",");
print_generic_expr (vect_dump, TREE_TYPE (op3), TDF_SLIM);
}
if (op4)
{
fprintf (vect_dump, ",");
print_generic_expr (vect_dump, TREE_TYPE (op4), TDF_SLIM);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment