diff options
author | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-11 19:55:23 +0000 |
---|---|---|
committer | jakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4> | 2011-11-11 19:55:23 +0000 |
commit | 00161311c00d966d1ccfce1f12a28222fdb133fe (patch) | |
tree | da6d861de02810601827aa20e1dd872a3b954e96 /gcc/tree-ssa-propagate.c | |
parent | 3ec11c499027aff2ba4041409c7ad18a372d767c (diff) | |
download | gcc-00161311c00d966d1ccfce1f12a28222fdb133fe.tar.gz |
PR tree-optimization/51074
* fold-const.c (vec_cst_ctor_to_array, fold_vec_perm): New functions.
(fold_binary_loc): Handle VEC_EXTRACT_EVEN_EXPR,
VEC_EXTRACT_ODD_EXPR, VEC_INTERLEAVE_HIGH_EXPR and
VEC_INTERLEAVE_LOW_EXPR with VECTOR_CST or CONSTRUCTOR operands.
(fold_ternary_loc): Handle VEC_PERM_EXPR with VECTOR_CST or
CONSTRUCTOR operands.
* tree-ssa-propagate.c (valid_gimple_rhs_p): Handle ternary
expressions.
* tree-vect-generic.c (lower_vec_perm): Mask sel_int elements
to 0 .. 2 * elements - 1.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@181297 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-ssa-propagate.c')
-rw-r--r-- | gcc/tree-ssa-propagate.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/gcc/tree-ssa-propagate.c b/gcc/tree-ssa-propagate.c index 05abaa58549..80b33e11d80 100644 --- a/gcc/tree-ssa-propagate.c +++ b/gcc/tree-ssa-propagate.c @@ -602,6 +602,16 @@ valid_gimple_rhs_p (tree expr) break; default: + if (get_gimple_rhs_class (code) == GIMPLE_TERNARY_RHS) + { + if (((code == VEC_COND_EXPR || code == COND_EXPR) + ? !is_gimple_condexpr (TREE_OPERAND (expr, 0)) + : !is_gimple_val (TREE_OPERAND (expr, 0))) + || !is_gimple_val (TREE_OPERAND (expr, 1)) + || !is_gimple_val (TREE_OPERAND (expr, 2))) + return false; + break; + } return false; } break; |