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: Bad giv initial offset calculation


  In message <20010720142110.A82798@cpopetz.com>you write:
  > which means we get the square of the scaling factor.  Hence, small
  > loops like the this wouldn't be unrolled at -O2:
  > 
  > int
  > test ()
  > {
  >   int biv,giv;
  >   for (biv = 0, giv = 0; giv != 8; biv++)
  >       giv = biv*8;
  >   return giv;
  > }
  > 
  > And if you force it with -funroll-loops it returns 64 instead of 8.
[ ... ]
I went ahead and turned that into an execution test and added it to the
testsuite.

jeff


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