This is the mail archive of the gcc@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]
Other format: [Raw text]

loop optimizations


Hello !

I have a short question:
Is gcc 3.1 capable of convesion classical loops with simple iterators, e.g.

int a[50], b[50], i;
for (i = 0; i < 50; i++)
  {
     a[i] = b[i];
  }

to more optimized code that uses test like instructions:
i = 49;
while (i != 0) /* Test instruction used */
  {
    a[i] = b[i];
    i--;
  }

thanks,
  Marko



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