public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/32698]  New: [4.3 regression] inefficient pointer expression
@ 2007-07-09 13:25 zippel at gcc dot gnu dot org
  2007-07-09 13:40 ` [Bug tree-optimization/32698] " rguenth at gcc dot gnu dot org
                   ` (22 more replies)
  0 siblings, 23 replies; 24+ messages in thread
From: zippel at gcc dot gnu dot org @ 2007-07-09 13:25 UTC (permalink / raw)
  To: gcc-bugs

Taking this example:

int foo(int *p, unsigned int i)
{       
  return p[i + 1] + p[i + 2] + p[i + 3];
}

produces inefficient code. The problem already starts at tree level, where for
"p[i+1]" an expression like *(p + (i + 1) * 4)) is generated, which is not a
common pointer expression.
Also since this is different from the other generated pointer expression, the
common index expression isn't completely replaced.

An initial discussion about this can be found here:
http://gcc.gnu.org/ml/gcc-patches/2007-07/msg00418.html


-- 
           Summary: [4.3 regression] inefficient pointer expression
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: zippel at gcc dot gnu dot org
  GCC host triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2008-01-13 14:57 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-07-09 13:25 [Bug tree-optimization/32698] New: [4.3 regression] inefficient pointer expression zippel at gcc dot gnu dot org
2007-07-09 13:40 ` [Bug tree-optimization/32698] " rguenth at gcc dot gnu dot org
2007-07-09 13:41 ` rguenth at gcc dot gnu dot org
2007-07-09 13:42 ` rguenth at gcc dot gnu dot org
2007-07-09 14:40 ` zippel at gcc dot gnu dot org
2007-07-09 15:01 ` rguenth at gcc dot gnu dot org
2007-07-09 15:28 ` zippel at gcc dot gnu dot org
2007-07-09 15:37 ` rguenther at suse dot de
2007-07-09 17:42 ` zippel at gcc dot gnu dot org
2007-07-09 19:42 ` rguenth at gcc dot gnu dot org
2007-07-18  6:00 ` pinskia at gcc dot gnu dot org
2007-07-18 12:56 ` zippel at gcc dot gnu dot org
2007-07-19 16:50 ` rguenth at gcc dot gnu dot org
2007-07-19 18:27 ` zippel at gcc dot gnu dot org
2007-07-20 11:48 ` rguenth at gcc dot gnu dot org
2007-07-20 11:58 ` zippel at gcc dot gnu dot org
2007-07-20 16:06 ` rguenth at gcc dot gnu dot org
2007-07-20 16:21 ` zippel at gcc dot gnu dot org
2007-07-20 16:35 ` rguenth at gcc dot gnu dot org
2007-07-20 17:06 ` zippel at gcc dot gnu dot org
2007-07-20 17:22 ` rguenth at gcc dot gnu dot org
2007-08-10  0:44 ` mmitchel at gcc dot gnu dot org
2007-11-19  9:01 ` steven at gcc dot gnu dot org
2008-01-13 15:18 ` rguenth at gcc dot 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).