This is the mail archive of the
mailing list for the GCC project.
Re: Patch to fix gcc.c-torture/compile/20010102-1.c on IA64 HP-UX
- From: Luis Machado <luisgpm at linux dot vnet dot ibm dot com>
- To: Jeff Law <law at redhat dot com>
- Cc: David Edelsohn <dje dot gcc at gmail dot com>, Andrew Pinski <pinskia at gmail dot com>, sje at cup dot hp dot com, Richard Henderson <rth at redhat dot com>, Peter Bergner <bergner at vnet dot ibm dot com>, gcc-patches at gcc dot gnu dot org, paolo dot carlini at oracle dot com
- Date: Tue, 26 May 2009 13:49:39 -0300
- Subject: Re: Patch to fix gcc.c-torture/compile/20010102-1.c on IA64 HP-UX
- References: <email@example.com> <4913621E.firstname.lastname@example.org> <email@example.com> <49137ABC.firstname.lastname@example.org> <1227792133.20350.3.camel@gargoyle> <492EF1FE.email@example.com> <1227816373.20350.11.camel@gargoyle> <492F0C60.firstname.lastname@example.org>
- Reply-to: luisgpm at linux dot vnet dot ibm dot com
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.
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.
2009-05-26 Luis Machado <email@example.com>
* alias.c (find_base_term): Check for NULL term before returning.
--- 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. */