From: John David Anglin Date: Sun, 2 Nov 2003 21:38:54 +0000 (+0000) Subject: re PR rtl-optimization/12845 (missed jump optimization) X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae2ea719c728f8c1e865734126d7ac223e6f4cb3;p=gcc.git re PR rtl-optimization/12845 (missed jump optimization) PR optimization/12845 * pa.c (output_cbranch): Use cmpb for DImode comparisons with 0. From-SVN: r73205 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 3f2dfc3032c..e27967833df 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-11-02 John David Anglin + + PR optimization/12845 + * pa.c (output_cbranch): Use cmpb for DImode comparisons with 0. + 2003-11-02 Zack Weinberg * print-rtl.c (print_rtx): Call PRINT_REG with second argument -1. diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 89bcd6656e5..856e3012a22 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -5579,6 +5579,12 @@ output_cbranch (rtx *operands, int nullify, int length, int negated, rtx insn) if (next_real_insn (JUMP_LABEL (insn)) == next_real_insn (insn)) return "nop"; + /* The doubleword form of the cmpib instruction doesn't have the LEU + and GTU conditions while the cmpb instruction does. Since we accept + zero for cmpb, we must ensure that we use cmpb for the comparison. */ + if (GET_MODE (operands[1]) == DImode && operands[2] == const0_rtx) + operands[2] = gen_rtx_REG (DImode, 0); + /* If this is a long branch with its delay slot unfilled, set `nullify' as it can nullify the delay slot and save a nop. */ if (length == 8 && dbr_sequence_length () == 0)