(jump_optimize): Properly make jump into store-flag sequence when...

(jump_optimize): Properly make jump into store-flag sequence when the
jump can't be reversed but the TRUE branch is const0_rtx.

From-SVN: r4715
This commit is contained in:
Richard Kenner 1993-06-23 07:52:14 -04:00
parent dd27116b8f
commit c71ebae3c4
1 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/* Optimize jump instructions, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1991, 1992 Free Software Foundation, Inc.
Copyright (C) 1987, 88, 89, 91, 92, 1993 Free Software Foundation, Inc.
This file is part of GNU CC.
@ -1155,10 +1155,22 @@ jump_optimize (f, cross_jump, noop_moves, after_regscan)
1, OPTAB_WIDEN);
}
else if (normalizep != 1)
target = expand_and (uval, target,
(GET_CODE (target) == REG
&& ! preserve_subexpressions_p ()
? target : NULL_RTX));
{
/* We know that either CVAL or UVAL is zero. If
UVAL is zero, negate TARGET and `and' with CVAL.
Otherwise, `and' with UVAL. */
if (uval == const0_rtx)
{
target = expand_unop (GET_MODE (var), one_cmpl_optab,
target, NULL_RTX, 0);
uval = cval;
}
target = expand_and (uval, target,
(GET_CODE (target) == REG
&& ! preserve_subexpressions_p ()
? target : NULL_RTX));
}
emit_move_insn (var, target);
seq = get_insns ();