diff options
Diffstat (limited to 'gcc-4.9/gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc-4.9/gcc/tree-ssa-propagate.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/gcc-4.9/gcc/tree-ssa-propagate.c b/gcc-4.9/gcc/tree-ssa-propagate.c index 840d7e762..172b6386e 100644 --- a/gcc-4.9/gcc/tree-ssa-propagate.c +++ b/gcc-4.9/gcc/tree-ssa-propagate.c @@ -571,8 +571,18 @@ valid_gimple_rhs_p (tree expr) /* All constants are ok. */ break; - case tcc_binary: case tcc_comparison: + /* 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. */ + case tcc_binary: if (!is_gimple_val (TREE_OPERAND (expr, 0)) || !is_gimple_val (TREE_OPERAND (expr, 1))) return false; |