[Bug target/55160] [4.8 Regression] Counterproductive loop induction variable optimization

2012-11-01 Thread olegendo at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55160



--- Comment #3 from Oleg Endo  2012-11-01 21:28:53 
UTC ---

Author: olegendo

Date: Thu Nov  1 21:28:49 2012

New Revision: 193071



URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=193071

Log:

PR target/55160

* gcc.target/sh/pr55160.c: New.





Added:

trunk/gcc/testsuite/gcc.target/sh/pr55160.c

Modified:

trunk/gcc/testsuite/ChangeLog


[Bug target/55160] [4.8 Regression] Counterproductive loop induction variable optimization

2012-11-01 Thread amylaar at gcc dot gnu.org


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55160



Jorn Wolfgang Rennecke  changed:



   What|Removed |Added



 Target|sh*-*-* arm*-*-*|sh*-*-*

 Status|UNCONFIRMED |RESOLVED

 Resolution||FIXED



--- Comment #2 from Jorn Wolfgang Rennecke  
2012-11-01 07:09:25 UTC ---

(In reply to comment #0)

> Starting with rev 192505 the following

> 

> int test_04 (int* x, int c)

> {

>   int s = 0;

>   for (int i = 0; i < c; ++i)

> s += *--x;

>   return s;

> }

> 

..  

> In this case the inner loop code size effectively does not increase, but there

> is overhead in setting up the loop.  Similar code is also generated on ARM.



In order to get the r192504 arm port to generate a doloop_end pattern,

I have to enable thubm2 support and modulo scheduling, e.g.:

-O2 --std=c99 -mthumb -march=armv7 -fmodulo-sched



with these options, r192505 also gets the doloop_end pattern.

Therefore, I have removed arm from the target list.