diff options
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 10 |
1 files changed, 7 insertions, 3 deletions
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. */ |