[PATCH] Fix IVOPTs induction variable choice for &a[0] and &a[4]

Richard Guenther rguenther@suse.de
Mon Aug 4 18:38:00 GMT 2008


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.



More information about the Gcc-patches mailing list