summaryrefslogtreecommitdiff
path: root/gcc/integrate.c
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-29 07:50:55 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2004-04-29 07:50:55 +0000
commitac503e50ffd19eb9d65ccf52fe44df860bc5f297 (patch)
tree4be29049b780d10dd9423c8ad52d77c6929b956b /gcc/integrate.c
parent697dfd2cb2acd640324565ec3298645b6f6bd4c5 (diff)
downloadgcc-ac503e50ffd19eb9d65ccf52fe44df860bc5f297.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@81282 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/integrate.c')
-rw-r--r--gcc/integrate.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 567cd9317ca..3a58f2cda04 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);
}
}