From 8deb7047a6f2f1c3d8a1d3dadd7c4a48363844d4 Mon Sep 17 00:00:00 2001 From: Richard Stallman Date: Sun, 24 Jan 1993 00:03:35 +0000 Subject: [PATCH] (emit_store_flag): Reset ICODE using returned COMPARISON. From-SVN: r3315 --- gcc/expmed.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/expmed.c b/gcc/expmed.c index 0d18c5d0686..c652d075d9b 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -2800,7 +2800,7 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep) && (STORE_FLAG_VALUE == (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1))))) { - rtx subtarget = target; + subtarget = target; /* If the result is to be wider than OP0, it is best to convert it first. If it is to be narrower, it is *incorrect* to convert it @@ -2851,6 +2851,12 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep) : normalizep == -1 ? constm1_rtx : const_true_rtx); + /* Comparison operands could have been swapped; + so get the new comprison code. + Note that GET_CODE gives us either the original code + or the result of swap_condition. */ + icode = setcc_gen_code[(int) GET_CODE (comparison)]; + /* Get a reference to the target in the proper mode for this insn. */ compare_mode = insn_operand_mode[(int) icode][0]; subtarget = target; -- 2.30.2