diff options
author | Richard Guenther <rguenther@suse.de> | 2011-03-22 11:12:57 +0000 |
---|---|---|
committer | Richard Biener <rguenth@gcc.gnu.org> | 2011-03-22 11:12:57 +0000 |
commit | f471fe729f9c1a3a182818c7789a3a1893a00107 (patch) | |
tree | 3711abed3ce4b0f3906eade82ded0eb8a2423e3d /gcc/tree-vect-loop.c | |
parent | d1d879b1f457f88bde4053b39606f698e7c3cc94 (diff) | |
download | gcc-f471fe729f9c1a3a182818c7789a3a1893a00107.zip gcc-f471fe729f9c1a3a182818c7789a3a1893a00107.tar.gz gcc-f471fe729f9c1a3a182818c7789a3a1893a00107.tar.bz2 |
gimple.c (gimple_rhs_class_table): POLYNOMIAL_CHREC is not a valid RHS.
2011-03-22 Richard Guenther <rguenther@suse.de>
* gimple.c (gimple_rhs_class_table): POLYNOMIAL_CHREC is not
a valid RHS. Make DOT_PROD_EXPR and REALIGN_LOAD_EXPR ternary.
* tree-cfg.c (verify_gimple_assign_ternary): Allow DOT_PROD_EXPR
and REALIGN_LOAD_EXPR.
(verify_gimple_assign_single): Do not allow POLYNOMIAL_CHREC,
DOT_PROD_EXPR or REALIGN_LOAD_EXPR.
* expr.c (expand_expr_real_1): Move REALIGN_LOAD_EXPR and
DOT_PROD_EXPR case ...
(expand_expr_real_2): ... here.
* gimple-pretty-print.c (dump_ternary_rhs): Handle DOT_PROD_EXPR
and REALIGN_LOAD_EXPR.
* tree-data-ref.c (split_constant_offset): Bail out for all CHRECs.
* tree-vect-loop.c (vect_model_reduction_cost): Handle ternaries.
(vect_create_epilog_for_reduction): Likewise.
(vectorizable_reduction): Likewise.
* tree-vect-patterns.c (vect_recog_dot_prod_pattern): Adjust.
* tree-vect-stmts.c (vectorizable_load): Likewise.
From-SVN: r171284
Diffstat (limited to 'gcc/tree-vect-loop.c')
-rw-r--r-- | gcc/tree-vect-loop.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c index 7692eb8..690d9b7 100644 --- a/gcc/tree-vect-loop.c +++ b/gcc/tree-vect-loop.c @@ -2498,6 +2498,9 @@ vect_model_reduction_cost (stmt_vec_info stmt_info, enum tree_code reduc_code, case GIMPLE_BINARY_RHS: reduction_op = gimple_assign_rhs2 (stmt); break; + case GIMPLE_TERNARY_RHS: + reduction_op = gimple_assign_rhs3 (stmt); + break; default: gcc_unreachable (); } @@ -3191,7 +3194,7 @@ vect_create_epilog_for_reduction (VEC (tree, heap) *vect_defs, gimple stmt, { case GIMPLE_SINGLE_RHS: gcc_assert (TREE_OPERAND_LENGTH (gimple_assign_rhs1 (stmt)) - == ternary_op); + == ternary_op); reduction_op = TREE_OPERAND (gimple_assign_rhs1 (stmt), reduc_index); break; case GIMPLE_UNARY_RHS: @@ -3201,6 +3204,9 @@ vect_create_epilog_for_reduction (VEC (tree, heap) *vect_defs, gimple stmt, reduction_op = reduc_index ? gimple_assign_rhs2 (stmt) : gimple_assign_rhs1 (stmt); break; + case GIMPLE_TERNARY_RHS: + reduction_op = gimple_op (stmt, reduc_index + 1); + break; default: gcc_unreachable (); } @@ -4026,6 +4032,15 @@ vectorizable_reduction (gimple stmt, gimple_stmt_iterator *gsi, ops[1] = gimple_assign_rhs2 (stmt); break; + case GIMPLE_TERNARY_RHS: + code = gimple_assign_rhs_code (stmt); + op_type = TREE_CODE_LENGTH (code); + gcc_assert (op_type == ternary_op); + ops[0] = gimple_assign_rhs1 (stmt); + ops[1] = gimple_assign_rhs2 (stmt); + ops[2] = gimple_assign_rhs3 (stmt); + break; + case GIMPLE_UNARY_RHS: return false; |