diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-04-29 07:50:55 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-04-29 07:50:55 +0000 |
commit | c6fb08ad284af074092aa4fb9edd1a9a44014b49 (patch) | |
tree | 4be29049b780d10dd9423c8ad52d77c6929b956b /gcc/integrate.c | |
parent | 6cf1ac42db0684f0c386ec9a665ddcaa12a4f1c9 (diff) | |
download | gcc-c6fb08ad284af074092aa4fb9edd1a9a44014b49.zip gcc-c6fb08ad284af074092aa4fb9edd1a9a44014b49.tar.gz gcc-c6fb08ad284af074092aa4fb9edd1a9a44014b49.tar.bz2 |
combine.c (combine_simplify_rtx): Adjust call to use simplify_relational_operation.
2004-04-29 Paolo Bonzini <bonzini@gnu.org>
* combine.c (combine_simplify_rtx): Adjust call to use
simplify_relational_operation. Do not use SELECT_CC_MODE
when a comparison already has a MODE_CC mode.
(simplify_set): simplify_relational_operation may now
return another relational expression.
* cse.c (fold_rtx): simplify_relational_operation now
takes of computing the comparison mode.
* dojump.c (compare_from_rtx): Use simplify_relational_operation,
remove dead code.
(do_compare_rtx_and_jump): Likewise.
* integrate.c (subst_constants): simplify_relational_operation
may now return another relational expression.
* simplify-rtx.c (simplify_gen_relational): Move most code to
the new simplify_relational_operation and
simplify_relational_operation_1 functions.
(simplify_relational_operation): Rewritten.
(simplify_relational_operation_1): New function.
(simplify_ternary_operation): simplify_relational_operation
may now return another relational expression.
(simplify_rtx): Remove unnecessary temp variable.
From-SVN: r81282
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r-- | gcc/integrate.c | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c index 567cd93..3a58f2c 100644 --- a/gcc/integrate.c +++ b/gcc/integrate.c @@ -2738,6 +2738,7 @@ subst_constants (rtx *loc, rtx insn, struct inline_remap *map, int memonly) if (op_mode == VOIDmode) op_mode = GET_MODE (XEXP (x, 1)); + new = simplify_relational_operation (code, GET_MODE (x), op_mode, XEXP (x, 0), XEXP (x, 1)); break; @@ -2766,15 +2767,18 @@ subst_constants (rtx *loc, rtx insn, struct inline_remap *map, int memonly) { /* We have compare of two VOIDmode constants for which we recorded the comparison mode. */ - rtx temp = - simplify_const_relational_operation (GET_CODE (op0), - map->compare_mode, - XEXP (op0, 0), - XEXP (op0, 1)); - - if (temp == const0_rtx) + rtx tem = + simplify_gen_relational (GET_CODE (op0), GET_MODE (op0), + map->compare_mode, XEXP (op0, 0), + XEXP (op0, 1)); + + if (GET_CODE (tem) != CONST_INT) + new = simplify_ternary_operation (code, GET_MODE (x), + op0_mode, tem, XEXP (x, 1), + XEXP (x, 2)); + else if (tem == const0_rtx) new = XEXP (x, 2); - else if (temp == const1_rtx) + else new = XEXP (x, 1); } } |