public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug middle-end/36758]  New: address addition moved out of the loop
@ 2008-07-07 21:35 pinskia at gcc dot gnu dot org
  2008-07-07 21:37 ` [Bug middle-end/36758] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
                   ` (23 more replies)
  0 siblings, 24 replies; 25+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2008-07-07 21:35 UTC (permalink / raw)
  To: gcc-bugs

Take the following testcase:
extern int f0(int *);
void
f1()
{
  int x;
  while (f0(&x));
}

-- CUT ---
Currently GCC produces:
        addi 31,1,112
        .p2align 3,,7
.L2:
        mr 3,31
        bl f0
        nop
        cmpdi 7,3,0
        bne 7,.L2

Notice how there is mr 3, 31 inside the loop.  At least on the Cell, the mr and
addi both have the same cycle count so we should not be moving the addition
outside of the loop.  This will save at least one volatile register which
should reduce code size.  This is a definite win for code size.


-- 
           Summary: address addition moved out of the loop
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
GCC target triplet: powerpc*-*-*


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


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2010-07-11  7:52 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-07-07 21:35 [Bug middle-end/36758] New: address addition moved out of the loop pinskia at gcc dot gnu dot org
2008-07-07 21:37 ` [Bug middle-end/36758] [4.3/4.4 Regression] " pinskia at gcc dot gnu dot org
2008-07-07 21:52 ` pinskia at gcc dot gnu dot org
2008-07-18 17:00 ` rguenth at gcc dot gnu dot org
2008-08-27 22:11 ` jsm28 at gcc dot gnu dot org
2008-09-20 15:24 ` [Bug rtl-optimization/36758] " rguenth at gcc dot gnu dot org
2008-09-20 22:52 ` pinskia at gcc dot gnu dot org
2008-09-20 22:56 ` pinskia at gcc dot gnu dot org
2008-09-20 23:33 ` pinskia at gcc dot gnu dot org
2008-09-20 23:36 ` pinskia at gcc dot gnu dot org
2008-09-21  0:21 ` pinskia at gcc dot gnu dot org
2008-09-21  0:27 ` pinskia at gcc dot gnu dot org
2008-09-21  0:46 ` [Bug rtl-optimization/36758] [4.3/4.4 Regression] addition moved out of the loop when used with an argument pinskia at gcc dot gnu dot org
2008-09-25  2:53 ` pinskia at gcc dot gnu dot org
2008-11-18 21:33 ` steven at gcc dot gnu dot org
2008-11-18 21:35 ` pinskia at gcc dot gnu dot org
2009-01-24 10:25 ` rguenth at gcc dot gnu dot org
2009-02-04 12:47 ` bonzini at gnu dot org
2009-02-06  9:53 ` bonzini at gnu dot org
2009-08-04 12:41 ` [Bug rtl-optimization/36758] [4.3/4.4/4.5 " rguenth at gcc dot gnu dot org
2010-03-02 18:25 ` pinskia at gcc dot gnu dot org
2010-03-02 20:10 ` pinskia at gcc dot gnu dot org
2010-03-02 21:56 ` steven at gcc dot gnu dot org
2010-05-22 18:28 ` [Bug rtl-optimization/36758] [4.3/4.4/4.5/4.6 " rguenth at gcc dot gnu dot org
2010-07-11  7:52 ` bonzini at gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).