re PR tree-optimization/27151 (ICE with -ftree-vectorize with mixed types)

2006-05-06   Richard Guenther  <rguenther@suse.de>

	PR tree-optimization/27151
	* tree-vect-transform.c (vectorizable_condition): Punt on
	values that have a different type than the condition.

	* gcc.dg/vect/pr27151.c: New testcase.

From-SVN: r113580
This commit is contained in:
Richard Guenther 2006-05-06 17:37:53 +00:00 committed by Richard Biener
parent 2297e173c6
commit 75bfa67836
4 changed files with 30 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2006-05-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27151
* tree-vect-transform.c (vectorizable_condition): Punt on
values that have a different type than the condition.
2006-05-03 Aldy Hernandez <aldyh@redhat.com>
PR/21391

View File

@ -1,3 +1,8 @@
2006-05-06 Richard Guenther <rguenther@suse.de>
PR tree-optimization/27151
* gcc.dg/vect/pr27151.c: New testcase.
2006-05-06 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
PR c++/27430

View File

@ -0,0 +1,14 @@
/* { dg-do compile } */
/* We were creating a float vector for the vis_type == 1
test, which we ICEd on. Now we simply punt here. */
float vs_data[75];
void vis_clear_data ()
{
int vis_type, i;
for (i = 0; i < 75; i++)
{
vs_data[i] = (vis_type == 1);
}
}

View File

@ -2117,6 +2117,11 @@ vectorizable_condition (tree stmt, block_stmt_iterator *bsi, tree *vec_stmt)
then_clause = TREE_OPERAND (op, 1);
else_clause = TREE_OPERAND (op, 2);
/* We do not handle two different vector types for the condition
and the values. */
if (TREE_TYPE (TREE_OPERAND (cond_expr, 0)) != TREE_TYPE (vectype))
return false;
if (!vect_is_simple_cond (cond_expr, loop_vinfo))
return false;