From 9972f30d1c2b29cdfc35421bbb5f4902ff0a1879 Mon Sep 17 00:00:00 2001 From: Steve Ellcey Date: Tue, 20 Sep 2005 21:29:30 +0000 Subject: [PATCH] * config/pa/pa.c (output_cbranch): Check for zero in operands[2]. From-SVN: r104465 --- gcc/ChangeLog | 4 ++++ gcc/config/pa/pa.c | 2 ++ 2 files changed, 6 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 0a33054085e..15f7f29204d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2005-09-20 Steve Ellcey + + * config/pa/pa.c (output_cbranch): Check for zero in operands[2]. + 2005-09-20 Richard Henderson * expr.c (expand_expr_real_1) : Allow modifier diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c index 88282589a07..d7ce82bbe29 100644 --- a/gcc/config/pa/pa.c +++ b/gcc/config/pa/pa.c @@ -5922,6 +5922,8 @@ output_cbranch (rtx *operands, int nullify, int length, int negated, rtx insn) 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 (GET_MODE (operands[2]) == DImode && operands[1] == const0_rtx) + operands[1] = 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. */ -- 2.30.2