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/expr.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/expr.c')
-rw-r--r-- | gcc/expr.c | 61 |
1 files changed, 30 insertions, 31 deletions
@@ -8259,6 +8259,36 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode, mode = TYPE_MODE (TREE_TYPE (treeop0)); goto binop; + case DOT_PROD_EXPR: + { + tree oprnd0 = treeop0; + tree oprnd1 = treeop1; + tree oprnd2 = treeop2; + rtx op2; + + expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL); + op2 = expand_normal (oprnd2); + target = expand_widen_pattern_expr (ops, op0, op1, op2, + target, unsignedp); + return target; + } + + case REALIGN_LOAD_EXPR: + { + tree oprnd0 = treeop0; + tree oprnd1 = treeop1; + tree oprnd2 = treeop2; + rtx op2; + + this_optab = optab_for_tree_code (code, type, optab_default); + expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL); + op2 = expand_normal (oprnd2); + temp = expand_ternary_op (mode, this_optab, op0, op1, op2, + target, unsignedp); + gcc_assert (temp); + return temp; + } + default: gcc_unreachable (); } @@ -8288,7 +8318,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, int unsignedp; enum machine_mode mode; enum tree_code code = TREE_CODE (exp); - optab this_optab; rtx subtarget, original_target; int ignore; tree context; @@ -9697,36 +9726,6 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, return expand_expr_real (treeop0, original_target, tmode, modifier, alt_rtl); - case REALIGN_LOAD_EXPR: - { - tree oprnd0 = treeop0; - tree oprnd1 = treeop1; - tree oprnd2 = treeop2; - rtx op2; - - this_optab = optab_for_tree_code (code, type, optab_default); - expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL); - op2 = expand_normal (oprnd2); - temp = expand_ternary_op (mode, this_optab, op0, op1, op2, - target, unsignedp); - gcc_assert (temp); - return temp; - } - - case DOT_PROD_EXPR: - { - tree oprnd0 = treeop0; - tree oprnd1 = treeop1; - tree oprnd2 = treeop2; - rtx op2; - - expand_operands (oprnd0, oprnd1, NULL_RTX, &op0, &op1, EXPAND_NORMAL); - op2 = expand_normal (oprnd2); - target = expand_widen_pattern_expr (&ops, op0, op1, op2, - target, unsignedp); - return target; - } - case COMPOUND_LITERAL_EXPR: { /* Initialize the anonymous variable declared in the compound |