diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 19:59:46 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 19:59:46 +0000 |
commit | ad99e708993275cfd0d666486d9c1b8bc7107416 (patch) | |
tree | f45f62817a1ba4ec89643d51d48fc4dea2c0237b /gcc/ifcvt.c | |
parent | 9c44ac54d7f5256b72b2e36db6e92e62815ac844 (diff) | |
download | gcc-ad99e708993275cfd0d666486d9c1b8bc7107416.tar.gz |
* optabs.h (OTI_flodiv, flodiv_optab): Kill.
* genopinit.c: Put floating point divide insns in sdiv_optab.
* expr.c (expand_expr): Use sdiv_optab, not flodiv_optab.
* config/gofast.h, config/c4x/c4x.h,
config/ia64/hpux_longdouble.h, config/mips/mips.h,
config/pa/long_double.h, config/rs6000/sysv4.h,
config/sparc/sparc.h: Put floating point divide libcalls in sdiv_optab.
* optabs.c (init_optab): Break into new_optab, init_optab, init_optabv.
(init_optabs): Use init_optabv for overflow-trapping optabs.
Don't init flodiv_optab. Give mov_optab, movstrict_optab, and
cmp_optab RTX codes so have_insn_for can find them.
* optabs.c (expand_simple_binop, expand_simple_unop,
have_insn_for, gen_sub3_insn): New interfaces.
* expr.h: Prototype new functions.
(enum optab_methods): Move here from optabs.h.
* builtins.c, combine.c, doloop.c, function.c, ifcvt.c,
loop.c, profile.c, simplify-rtx.c, stmt.c, unroll.c:
Use new functions instead of working directly with optabs.
* doloop.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c,
unroll.c: Don't include optabs.h.
* caller-save.c, combine.c, function.c, stmt.c: Just include
insn-codes.h, not optabs.h.
* Makefile.in: Update dependencies.
* combine.c (make_compound_operation, simplify_comparison):
Fix typos testing for this or that instruction.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ifcvt.c')
-rw-r--r-- | gcc/ifcvt.c | 68 |
1 files changed, 34 insertions, 34 deletions
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c index 77d585c28a4..a877a90da18 100644 --- a/gcc/ifcvt.c +++ b/gcc/ifcvt.c @@ -30,7 +30,6 @@ #include "hard-reg-set.h" #include "basic-block.h" #include "expr.h" -#include "optabs.h" #include "real.h" #include "output.h" #include "toplev.h" @@ -698,42 +697,42 @@ noce_try_store_flag_constants (if_info) => x = 3 + (test == 0); */ if (diff == STORE_FLAG_VALUE || diff == -STORE_FLAG_VALUE) { - target = expand_binop (mode, - (diff == STORE_FLAG_VALUE - ? add_optab : sub_optab), - GEN_INT (ifalse), target, if_info->x, 0, - OPTAB_WIDEN); + target = expand_simple_binop (mode, + (diff == STORE_FLAG_VALUE + ? PLUS : MINUS), + GEN_INT (ifalse), target, if_info->x, 0, + OPTAB_WIDEN); } /* if (test) x = 8; else x = 0; => x = (test != 0) << 3; */ else if (ifalse == 0 && (tmp = exact_log2 (itrue)) >= 0) { - target = expand_binop (mode, ashl_optab, - target, GEN_INT (tmp), if_info->x, 0, - OPTAB_WIDEN); + target = expand_simple_binop (mode, ASHIFT, + target, GEN_INT (tmp), if_info->x, 0, + OPTAB_WIDEN); } /* if (test) x = -1; else x = b; => x = -(test != 0) | b; */ else if (itrue == -1) { - target = expand_binop (mode, ior_optab, - target, GEN_INT (ifalse), if_info->x, 0, - OPTAB_WIDEN); + target = expand_simple_binop (mode, IOR, + target, GEN_INT (ifalse), if_info->x, 0, + OPTAB_WIDEN); } /* if (test) x = a; else x = b; => x = (-(test != 0) & (b - a)) + a; */ else { - target = expand_binop (mode, and_optab, - target, GEN_INT (diff), if_info->x, 0, - OPTAB_WIDEN); + target = expand_simple_binop (mode, AND, + target, GEN_INT (diff), if_info->x, 0, + OPTAB_WIDEN); if (target) - target = expand_binop (mode, add_optab, - target, GEN_INT (ifalse), if_info->x, 0, - OPTAB_WIDEN); + target = expand_simple_binop (mode, PLUS, + target, GEN_INT (ifalse), + if_info->x, 0, OPTAB_WIDEN); } if (! target) @@ -796,9 +795,10 @@ noce_try_store_flag_inc (if_info) 1, normalize); if (target) - target = expand_binop (GET_MODE (if_info->x), - subtract ? sub_optab : add_optab, - if_info->x, target, if_info->x, 0, OPTAB_WIDEN); + target = expand_simple_binop (GET_MODE (if_info->x), + subtract ? MINUS : PLUS, + if_info->x, target, if_info->x, + 0, OPTAB_WIDEN); if (target) { if (target != if_info->x) @@ -847,9 +847,9 @@ noce_try_store_flag_mask (if_info) gen_reg_rtx (GET_MODE (if_info->x)), reversep, -1); if (target) - target = expand_binop (GET_MODE (if_info->x), and_optab, - if_info->x, target, if_info->x, 0, - OPTAB_WIDEN); + target = expand_simple_binop (GET_MODE (if_info->x), AND, + if_info->x, target, if_info->x, 0, + OPTAB_WIDEN); if (target) { @@ -1283,9 +1283,8 @@ noce_try_minmax (if_info) struct noce_if_info *if_info; { rtx cond, earliest, target, seq; - enum rtx_code code; + enum rtx_code code, op; int unsignedp; - optab op; /* ??? Can't guarantee that expand_binop won't create pseudos. */ if (no_new_pseudos) @@ -1328,24 +1327,24 @@ noce_try_minmax (if_info) case LE: case UNLT: case UNLE: - op = smax_optab; + op = SMAX; unsignedp = 0; break; case GT: case GE: case UNGT: case UNGE: - op = smin_optab; + op = SMIN; unsignedp = 0; break; case LTU: case LEU: - op = umax_optab; + op = UMAX; unsignedp = 1; break; case GTU: case GEU: - op = umin_optab; + op = UMIN; unsignedp = 1; break; default: @@ -1354,8 +1353,9 @@ noce_try_minmax (if_info) start_sequence (); - target = expand_binop (GET_MODE (if_info->x), op, if_info->a, if_info->b, - if_info->x, unsignedp, OPTAB_WIDEN); + target = expand_simple_binop (GET_MODE (if_info->x), op, + if_info->a, if_info->b, + if_info->x, unsignedp, OPTAB_WIDEN); if (! target) { end_sequence (); @@ -1466,12 +1466,12 @@ noce_try_abs (if_info) start_sequence (); - target = expand_unop (GET_MODE (if_info->x), abs_optab, b, if_info->x, 0); + target = expand_simple_unop (GET_MODE (if_info->x), ABS, b, if_info->x, 0); /* ??? It's a quandry whether cmove would be better here, especially for integers. Perhaps combine will clean things up. */ if (target && negate) - target = expand_unop (GET_MODE (target), neg_optab, target, if_info->x, 0); + target = expand_simple_unop (GET_MODE (target), NEG, target, if_info->x, 0); if (! target) { |