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]

Re: loop.c:basic_induction_var does not accept ZERO_EXTEND



  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


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