This is the mail archive of the gcc-bugs@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]

[Bug target/29953] [SH-4] Perfomance regression in loops. cmp/eq used instead of dt



------- Comment #4 from christian dot bruel at st dot com  2007-04-03 15:30 -------
This missed optimisation appears with all counted loops. The ir in gimple
produces

  j = 0;
  <D1202>:;
  j = j + 1;
  if (j <= 999)
    {
      goto <D1202>;
    }

The transformation to do ( j=1000; j=j-1; if (j)...) will allow the decrement
and test pattern to be catched by combine.
Since this transformation needs to know about code selection (and is only
useful if the number of issued instructions is > 1), it seems best to do it in
rtl. I'm thinking about strength_reduce in loop.c when we optimize bivs.

Question: does it make sense to do this transformation in loop.c ? I'm thinking
at strength_reduce. 


-- 


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


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