This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
fix hammer comilation of spec2000 gcc
- From: Jan Hubicka <jh at suse dot cz>
- To: gcc-patches at gcc dot gnu dot org, rth at cygnus dot com
- Date: Fri, 10 Jan 2003 22:27:50 +0100
- Subject: fix hammer comilation of spec2000 gcc
Hi,
in my conditional addition patch I forgot to verify that the operands
are valid. I've installed the attached patch as obivous.
Fri Jan 10 22:05:35 CET 2003 Jan Hubicka <jh@suse.cz>
* ifcvt.c (noce_try_addcc): Do not call emit_conditional_add
with weird operands.
Index: ifcvt.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/ifcvt.c,v
retrieving revision 1.107
diff -c -3 -p -r1.107 ifcvt.c
*** ifcvt.c 7 Jan 2003 21:09:18 -0000 1.107
--- ifcvt.c 10 Jan 2003 21:05:29 -0000
*************** noce_try_addcc (if_info)
*** 882,907 ****
enum rtx_code code = reversed_comparison_code (cond, if_info->jump);
/* First try to use addcc pattern. */
! start_sequence ();
! target = emit_conditional_add (if_info->x, code,
! XEXP (cond, 0), XEXP (cond, 1),
! VOIDmode,
! if_info->b, XEXP (if_info->a, 1),
! GET_MODE (if_info->x),
! (code == LTU || code == GEU
! || code == LEU || code == GTU));
! if (target)
{
! if (target != if_info->x)
! noce_emit_move_insn (if_info->x, target);
! seq = get_insns ();
end_sequence ();
- emit_insn_before_scope (seq, if_info->jump,
- INSN_SCOPE (if_info->insn_a));
- return TRUE;
}
- end_sequence ();
/* If that fails, construct conditional increment or decrement using
setcc. */
--- 882,911 ----
enum rtx_code code = reversed_comparison_code (cond, if_info->jump);
/* First try to use addcc pattern. */
! if (general_operand (XEXP (cond, 0), VOIDmode)
! && general_operand (XEXP (cond, 1), VOIDmode))
{
! start_sequence ();
! target = emit_conditional_add (if_info->x, code,
! XEXP (cond, 0), XEXP (cond, 1),
! VOIDmode,
! if_info->b, XEXP (if_info->a, 1),
! GET_MODE (if_info->x),
! (code == LTU || code == GEU
! || code == LEU || code == GTU));
! if (target)
! {
! if (target != if_info->x)
! noce_emit_move_insn (if_info->x, target);
! seq = get_insns ();
! end_sequence ();
! emit_insn_before_scope (seq, if_info->jump,
! INSN_SCOPE (if_info->insn_a));
! return TRUE;
! }
end_sequence ();
}
/* If that fails, construct conditional increment or decrement using
setcc. */