This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: loop.c:basic_induction_var does not accept ZERO_EXTEND
- To: David Edelsohn <dje at watson dot ibm dot com>
- Subject: Re: loop.c:basic_induction_var does not accept ZERO_EXTEND
- From: Jeffrey A Law <law at cygnus dot com>
- Date: Tue, 23 May 2000 12:50:29 -0600
- cc: Michael Hayes <m dot hayes at elec dot canterbury dot ac dot nz>, Richard Henderson <rth at cygnus dot com>, Jan Hubicka <jh at suse dot cz>, gcc-patches at gcc dot gnu dot org
- Reply-To: law at cygnus dot com
In message <200005221829.OAA25208@mal-ach.watson.ibm.com>you write:
> While investigating loop optimizations on 64-bit PowerPC on a
> 32-bit host, I noticed that no biv was being found for a simple loop. I
> tracked this down to loop.c:basic_induction_var() not having a case for
> ZERO_EXTEND. The comment at the beginning of the function mentions
> detecting BIVs in a promoted variable which is sign-extended or
> zero-extended, but the switch statement only has a case for SIGN_EXTEND,
> not ZERO_EXTEND.
>
> Naively, I would expect ZERO_EXTEND should be treated identically
> to SIGN_EXTEND. Was there a technical reason to exclude zero-extended
> values or an oversight? Is there some subtle corner-case problem with
> zero-extended values as induction variables? If there is a reason, the
> comment at the top of the function should be clarified.
See the next to last paragraph in the comment before basic_induction_var.
jeff