This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch to fix gcc.c-torture/compile/20010102-1.c on IA64 HP-UX


Hi folks,

On Thu, 2008-11-27 at 14:08 -0700, Jeff Law wrote:
> Luis Machado wrote:
> > On Thu, 2008-11-27 at 12:16 -0700, Jeff Law wrote:
> >   
> >> Luis Machado wrote:
> >>     
> >>> Hi,
> >>>
> >>> The attached patch changes the handling of LO_SUM in "find_base_term" to
> >>> what "find_base_value" does.
> >>>
> >>> No additional testsuite failures were noticed and SPEC2K numbers are
> >>> stable. Vortex 32-bit (that had degraded due to this problem) is back to
> >>> normal (up 3%) on PPC.
> >>>
> >>> OK for mainline?
> >>>   
> >>>       
> >> It's fine.  Can you also create a new PR and link it to the 4.5 pending 
> >> patches meta-PR?  For 4.5 I think we want to use a combination of the 
> >> two approaches (short-circuit lo-sum and not return null so easily when 
> >> the recursive calls return NULL).
> >>     
> >
> > Sure, i'll add the PR.
> >
> > Wouldn't it be best to combine both approaches now?
> >   
> In the interest of minimizing changes which might destabilize the tree, 
> I think it's best to take the minimalist approach for 4.4 bits.  Once 
> 4.4 branches we can install the more aggressive approach.
> 
> jeff

As 4.4 has already branched, follows the additional part of the RTL
alias fix that should go in for 4.5, checking for NULL before returning
the base term.

The testsuite numbers are good. Regtested on powerpc-linux.

Ok?

Regards,
Luis


2009-05-26  Luis Machado  <luisgpm@br.ibm.com>

	* alias.c (find_base_term): Check for NULL term before returning.

Index: gcc/alias.c
===================================================================
--- gcc.orig/alias.c	2009-05-25 20:30:33.000000000 -0700
+++ gcc/alias.c	2009-05-25 20:30:50.000000000 -0700
@@ -1511,10 +1511,18 @@
 	/* If either operand is known to be a pointer, then use it
 	   to determine the base term.  */
 	if (REG_P (tmp1) && REG_POINTER (tmp1))
-	  return find_base_term (tmp1);
+	  {
+	    rtx base = find_base_term (tmp1);
+	    if (base)
+	      return base;
+	  }
 
 	if (REG_P (tmp2) && REG_POINTER (tmp2))
-	  return find_base_term (tmp2);
+	  {
+	    rtx base = find_base_term (tmp2);
+	    if (base)
+	      return base;
+	  }
 
 	/* Neither operand was known to be a pointer.  Go ahead and find the
 	   base term for both operands.  */



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]