re PR tree-optimization/60849 (bogus comparison result type)

2014-04-17  Richard Biener  <rguenther@suse.de>

	PR middle-end/60849
	* tree-ssa-propagate.c (valid_gimple_rhs_p): Allow vector
	comparison results and add clarifying comment.

From-SVN: r209486
This commit is contained in:
Richard Biener 2014-04-17 13:50:55 +00:00 committed by Richard Biener
parent 92f0f3ec92
commit b94970bc41
2 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2014-04-17 Richard Biener <rguenther@suse.de>
PR middle-end/60849
* tree-ssa-propagate.c (valid_gimple_rhs_p): Allow vector
comparison results and add clarifying comment.
2014-04-17 Jakub Jelinek <jakub@redhat.com>
* genmodes.c (struct mode_data): Add need_bytesize_adj field.

View File

@ -572,9 +572,13 @@ valid_gimple_rhs_p (tree expr)
break;
case tcc_comparison:
if (!INTEGRAL_TYPE_P (TREE_TYPE (expr))
|| (TREE_CODE (TREE_TYPE (expr)) != BOOLEAN_TYPE
&& TYPE_PRECISION (TREE_TYPE (expr)) != 1))
/* GENERIC allows comparisons with non-boolean types, reject
those for GIMPLE. Let vector-typed comparisons pass - rules
for GENERIC and GIMPLE are the same here. */
if (!(INTEGRAL_TYPE_P (TREE_TYPE (expr))
&& (TREE_CODE (TREE_TYPE (expr)) == BOOLEAN_TYPE
|| TYPE_PRECISION (TREE_TYPE (expr)) == 1))
&& ! VECTOR_TYPE_P (TREE_TYPE (expr)))
return false;
/* Fallthru. */