aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorAndrew Stubbs <ams@codesourcery.com>2011-08-19 14:12:32 +0000
committerAndrew Stubbs <ams@gcc.gnu.org>2011-08-19 14:12:32 +0000
commita484f6bae00618d6482bdaf1740bb32663d96d24 (patch)
tree79e47d7fd79f8a22d857e9e104cac40825bc24b0 /gcc/expr.c
parentc4b3a0a0b9566dcd63e4a35ddcafa4b93055aa96 (diff)
downloadgcc-a484f6bae00618d6482bdaf1740bb32663d96d24.zip
gcc-a484f6bae00618d6482bdaf1740bb32663d96d24.tar.gz
gcc-a484f6bae00618d6482bdaf1740bb32663d96d24.tar.bz2
expr.c (expand_expr_real_2): Use widening_optab_handler.
2011-08-19 Andrew Stubbs <ams@codesourcery.com> gcc/ * expr.c (expand_expr_real_2): Use widening_optab_handler. * genopinit.c (optabs): Use set_widening_optab_handler for $N. (gen_insn): $N now means $a must be wider than $b, not consecutive. * optabs.c (widened_mode): New function. (expand_widen_pattern_expr): Use widening_optab_handler. (expand_binop_directly): Likewise. (expand_binop): Likewise. * optabs.h (widening_optab_handlers): New struct. (optab_d): New member, 'widening'. (widening_optab_handler): New function. (set_widening_optab_handler): New function. * tree-ssa-math-opts.c (convert_mult_to_widen): Use widening_optab_handler. (convert_plusminus_to_widen): Likewise. From-SVN: r177901
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 7257c8b..7e611bd 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -8005,7 +8005,8 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
this_optab = usmul_widen_optab;
if (mode == GET_MODE_2XWIDER_MODE (innermode))
{
- if (optab_handler (this_optab, mode) != CODE_FOR_nothing)
+ if (widening_optab_handler (this_optab, mode, innermode)
+ != CODE_FOR_nothing)
{
if (TYPE_UNSIGNED (TREE_TYPE (treeop0)))
expand_operands (treeop0, treeop1, NULL_RTX, &op0, &op1,
@@ -8032,7 +8033,8 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
if (mode == GET_MODE_2XWIDER_MODE (innermode)
&& TREE_CODE (treeop0) != INTEGER_CST)
{
- if (optab_handler (this_optab, mode) != CODE_FOR_nothing)
+ if (widening_optab_handler (this_optab, mode, innermode)
+ != CODE_FOR_nothing)
{
expand_operands (treeop0, treeop1, NULL_RTX, &op0, &op1,
EXPAND_NORMAL);
@@ -8040,7 +8042,8 @@ expand_expr_real_2 (sepops ops, rtx target, enum machine_mode tmode,
unsignedp, this_optab);
return REDUCE_BIT_FIELD (temp);
}
- if (optab_handler (other_optab, mode) != CODE_FOR_nothing
+ if (widening_optab_handler (other_optab, mode, innermode)
+ != CODE_FOR_nothing
&& innermode == word_mode)
{
rtx htem, hipart;