This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix IVOPTs induction variable choice for &a[0] and &a[4]
- From: Richard Guenther <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: Zdenek Dvorak <ook at ucw dot cz>
- Date: Mon, 4 Aug 2008 20:35:59 +0200 (CEST)
- Subject: Re: [PATCH] Fix IVOPTs induction variable choice for &a[0] and &a[4]
- References: <alpine.LNX.1.10.0808011652180.4328@zhemvz.fhfr.qr>
On Fri, 1 Aug 2008, Richard Guenther wrote:
>
> This fixes IVOPTs which was choosing two induction variables for uses
> based on &a[0] and &a[4]. For the use based on &a[4] we add the bases
> &a[4], 0 and (T *)&a as candidates while for &a[0] we only add the
> bases &a[0] and 0. So we end up choosing two different induction
> variables. (This happens in SPEC2k6 calculix in the hottest loop)
>
> The following fixes this by adding a candidate also if the base
> object differs after stripping constant offsets.
>
> Bootstrap & regtest running on x86_64-unknown-linux-gnu, I'll apply
> this to the trunk if that succeeds.
Applied as r138647.
Richard.