Commit 97f51ac4 by Rodney Brown Committed by Richard Henderson

i386.c (ix86_expand_int_movcc): In the general case suppress addition when…

i386.c (ix86_expand_int_movcc): In the general case suppress addition when either ct or cf are zero.

        * config/i386/i386.c (ix86_expand_int_movcc): In the general case
        suppress addition when either ct or cf are zero.

From-SVN: r55540
parent f1a73cfe
2002-07-17 Rodney Brown <rbrown64@csc.com.au>
* config/i386/i386.c (ix86_expand_int_movcc): In the general case
suppress addition when either ct or cf are zero.
2002-06-17 Eric Botcazou <ebotcazou@multimania.com> 2002-06-17 Eric Botcazou <ebotcazou@multimania.com>
Glen Nakamura <glen@imodulo.com> Glen Nakamura <glen@imodulo.com>
......
...@@ -8866,8 +8866,8 @@ ix86_expand_int_movcc (operands) ...@@ -8866,8 +8866,8 @@ ix86_expand_int_movcc (operands)
ix86_compare_op1, VOIDmode, 0, 1); ix86_compare_op1, VOIDmode, 0, 1);
nops = 0; nops = 0;
/* On x86_64 the lea instruction operates on Pmode, so we need to get arithmetics /* On x86_64 the lea instruction operates on Pmode, so we need
done in proper mode to match. */ to get arithmetics done in proper mode to match. */
if (diff == 1) if (diff == 1)
tmp = out; tmp = out;
else else
...@@ -8931,10 +8931,10 @@ ix86_expand_int_movcc (operands) ...@@ -8931,10 +8931,10 @@ ix86_expand_int_movcc (operands)
if (!optimize_size && !TARGET_CMOVE) if (!optimize_size && !TARGET_CMOVE)
{ {
if (ct == 0) if (cf == 0)
{ {
ct = cf; cf = ct;
cf = 0; ct = 0;
if (FLOAT_MODE_P (GET_MODE (ix86_compare_op0))) if (FLOAT_MODE_P (GET_MODE (ix86_compare_op0)))
/* We may be reversing unordered compare to normal compare, /* We may be reversing unordered compare to normal compare,
that is not valid in general (we may convert non-trapping that is not valid in general (we may convert non-trapping
...@@ -8983,18 +8983,16 @@ ix86_expand_int_movcc (operands) ...@@ -8983,18 +8983,16 @@ ix86_expand_int_movcc (operands)
out = emit_store_flag (out, code, ix86_compare_op0, out = emit_store_flag (out, code, ix86_compare_op0,
ix86_compare_op1, VOIDmode, 0, 1); ix86_compare_op1, VOIDmode, 0, 1);
out = expand_simple_binop (mode, PLUS, out = expand_simple_binop (mode, PLUS, out, constm1_rtx,
out, constm1_rtx,
out, 1, OPTAB_DIRECT); out, 1, OPTAB_DIRECT);
} }
out = expand_simple_binop (mode, AND, out = expand_simple_binop (mode, AND, out,
out,
gen_int_mode (cf - ct, mode), gen_int_mode (cf - ct, mode),
out, 1, OPTAB_DIRECT); out, 1, OPTAB_DIRECT);
out = expand_simple_binop (mode, PLUS, if (ct)
out, GEN_INT (ct), out = expand_simple_binop (mode, PLUS, out, GEN_INT (ct),
out, 1, OPTAB_DIRECT); out, 1, OPTAB_DIRECT);
if (out != operands[0]) if (out != operands[0])
emit_move_insn (operands[0], out); emit_move_insn (operands[0], out);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment