diff options
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); } } |