On Thu, 17 Apr 2014, Marc Glisse wrote: > On Thu, 17 Apr 2014, Richard Biener wrote: > > > This fixes PR60849 by properly rejecting non-boolean typed > > comparisons from valid_gimple_rhs_p so they go through the > > gimplification paths. > > Could you also accept vector comparisons please?
Sure. Testing in progress. Richard. 2014-04-17 Richard Biener <rguent...@suse.de> PR middle-end/60849 * tree-ssa-propagate.c (valid_gimple_rhs_p): Allow vector comparison results and add clarifying comment. Index: gcc/tree-ssa-propagate.c =================================================================== --- gcc/tree-ssa-propagate.c (revision 209469) +++ gcc/tree-ssa-propagate.c (working copy) @@ -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)) + && TREE_CODE (TREE_TYPE (expr)) != VECTOR_TYPE) return false; /* Fallthru. */