re PR tree-optimization/51074 (No constant folding performed for VEC_PERM_EXPR, VEC_I...
authorJakub Jelinek <jakub@redhat.com>
Fri, 11 Nov 2011 19:55:23 +0000 (20:55 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Fri, 11 Nov 2011 19:55:23 +0000 (20:55 +0100)
commit22d8712ac4f4f04786d4a2428cde756b065b9f97
treeda6d861de02810601827aa20e1dd872a3b954e96
parent0540978881f0e0de7d84c470628a1897b01b6831
re PR tree-optimization/51074 (No constant folding performed for VEC_PERM_EXPR, VEC_INTERLEAVE*EXPR, VEC_EXTRACT*EXPR)

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.

From-SVN: r181297
gcc/ChangeLog
gcc/fold-const.c
gcc/tree-ssa-propagate.c
gcc/tree-vect-generic.c