From d40bb52a590581c82637e817839bd650beb853f0 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Wed, 30 Jun 1993 21:35:17 +0000 Subject: [PATCH] (gen_int_relational): For test with constant result, copy const0_rtx or const_true_rtx to result register instead of allocating a new pseudo-register. From-SVN: r4808 --- gcc/config/mips/mips.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 20b7a6b62f0..bd470d8e7c4 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -1660,10 +1660,13 @@ gen_int_relational (test_code, result, cmp0, cmp1, p_invert) ? (unsigned HOST_WIDE_INT) new > INTVAL (cmp1) : new > INTVAL (cmp1)) != (p_info->const_add > 0)) - /* 1 is the right value in the LE and LEU case. - In the GT and GTU case, *p_invert is already set, - so this is effectively 0. */ - return force_reg (SImode, const1_rtx); + { + /* This test is always true, but if INVERT is true then + the result of the test needs to be inverted so 0 should + be returned instead. */ + emit_move_insn (result, invert ? const0_rtx : const_true_rtx); + return result; + } else cmp1 = GEN_INT (new); }