diff options
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/tree-ssa-propagate.c | 10 |
2 files changed, 13 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ead28c2..1f463e3 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 47fd154..59e46dc 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -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. */ |