diff options
author | Ben Cheng <bccheng@google.com> | 2014-05-17 17:03:43 -0700 |
---|---|---|
committer | Ben Cheng <bccheng@google.com> | 2014-05-17 17:12:35 -0700 |
commit | 8c493ead6366b552adee796de296936b78f34c5a (patch) | |
tree | 4936e52fb9b84edbcd9293bd321027413d1835bf /gcc-4.9/gcc/tree-ssa-propagate.c | |
parent | 9750bde7e561731ce8a07cdbd0165a688e74a696 (diff) | |
download | toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.tar.gz toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.tar.bz2 toolchain_gcc-8c493ead6366b552adee796de296936b78f34c5a.zip |
[4.9] Refresh GCC 4.9 to the 20140514 snapshot.
For critical bug fixes including devirtualization and codegen.
Change-Id: I8138d3dc408fc12db5eecb01d2753d39219712f2
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; |