------- Comment #33 from krebbel at gcc dot gnu dot org 2009-07-23 12:37
-------
Your patch from 2009-06-30 prevents the following code from being implemented
jumpless on S/390:
int a, b;
...
int x = a == b;
In emit_store_flag the following code now invokes emit_store_flag_1 instead of
emit_store_flag:
if ((code == EQ || code == NE) && op1 != const0_rtx)
{
tem = expand_binop (mode, xor_optab, op0, op1, subtarget, 1,
OPTAB_WIDEN);
if (tem == 0)
tem = expand_binop (mode, sub_optab, op0, op1, subtarget, 1,
OPTAB_WIDEN);
if (tem != 0)
tem = emit_store_flag_1 (target, code, tem, const0_rtx,
mode, unsignedp, normalizep, target_mode);
if (tem != 0)
return tem;
delete_insns_since (last);
}
But emit_store_flag_1 is not sufficient to implement this case jumpless since
the code emitting the abs, sub and neg instructions is only in emit_store_flag:
if (code == EQ || code == NE)
{
/* For EQ or NE, one way to do the comparison is to apply an operation
that converts the operand into a positive number if it is nonzero
or zero if it was originally zero. Then, for EQ, we subtract 1 and
for NE we negate. This puts the result in the sign bit. Then we
normalize with a shift, if needed.
...
--
krebbel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |krebbel at gcc dot gnu dot
| |org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40597