4 GCC regressions, 1 new, with your patch on 2001-07-28T03:15:01Z.

DJ Delorie dj@redhat.com
Tue Jul 31 13:32:00 GMT 2001


> The new failures are:
> powerpc-eabisim gcc.sum gcc.c-torture/execute/compndlit-1.c

This fixes that regression (tested on powerpc-eabi, no regressions)
but when I originally added those lines I recall that *not* changing
cond_earliest caused some unneeded insns to be left around. Comments?
Else, ok to apply?

The problem in compndlit-1.c is that one of the insns that assigns a
constant to a register (which is then used in a comparison) gets
*moved* (not deleted) to somewhere after the compare, making the
comparison meaningless.  I don't truly grok why.

2001-07-31  DJ Delorie  <dj@redhat.com>

	* ifcvt.c (noce_get_alt_condition): Don't make an auxiliary
	set from a constant part of the condition.

Index: ifcvt.c
===================================================================
RCS file: /cvs/uberbaum/gcc/ifcvt.c,v
retrieving revision 1.59
diff -p -3 -r1.59 ifcvt.c
*** ifcvt.c	2001/07/28 03:13:34	1.59
--- ifcvt.c	2001/07/31 20:27:03
*************** noce_get_alt_condition (if_info, target,
*** 1183,1197 ****
  	  if (GET_CODE (src) == CONST_INT)
  	    {
  	      if (rtx_equal_p (op_a, SET_DEST (PATTERN (prev_insn))))
! 		{
! 		  op_a = src;
! 		  if_info->cond_earliest = prev_insn;
! 		}
  	      else if (rtx_equal_p (op_b, SET_DEST (PATTERN (prev_insn))))
! 		{
! 		  op_b = src;
! 		  if_info->cond_earliest = prev_insn;
! 		}
  
  	      if (GET_CODE (op_a) == CONST_INT)
  		{
--- 1183,1191 ----
  	  if (GET_CODE (src) == CONST_INT)
  	    {
  	      if (rtx_equal_p (op_a, SET_DEST (PATTERN (prev_insn))))
! 		op_a = src;
  	      else if (rtx_equal_p (op_b, SET_DEST (PATTERN (prev_insn))))
! 		op_b = src;
  
  	      if (GET_CODE (op_a) == CONST_INT)
  		{



More information about the Gcc-patches mailing list