aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJohn David Anglin <dave.anglin@nrc-cnrc.gc.ca>2003-11-02 21:38:54 +0000
committerJohn David Anglin <danglin@gcc.gnu.org>2003-11-02 21:38:54 +0000
commitae2ea719c728f8c1e865734126d7ac223e6f4cb3 (patch)
tree59c675462ee396d916ed34f2090d882eb6e17109 /gcc
parent9a623a652b10e948687b0e86944d4555b07b76c0 (diff)
downloadgcc-ae2ea719c728f8c1e865734126d7ac223e6f4cb3.zip
gcc-ae2ea719c728f8c1e865734126d7ac223e6f4cb3.tar.gz
gcc-ae2ea719c728f8c1e865734126d7ac223e6f4cb3.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/pa/pa.c6
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 3f2dfc3..e279678 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2003-11-02 John David Anglin <dave.anglin@nrc-cnrc.gc.ca>
+
+ PR optimization/12845
+ * pa.c (output_cbranch): Use cmpb for DImode comparisons with 0.
+
2003-11-02 Zack Weinberg <zack@codesourcery.com>
* 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 89bcd66..856e301 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)