public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/23619] New: Missed pre opportunity
@ 2005-08-29  9:17 rakdver at gcc dot gnu dot org
  2005-08-29 12:33 ` [Bug tree-optimization/23619] " pinskia at gcc dot gnu dot org
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: rakdver at gcc dot gnu dot org @ 2005-08-29  9:17 UTC (permalink / raw)
  To: gcc-bugs

On the following testcase:

int a[100];

void foo(int p, int q)
{
  int i;

  for (i = 0; i < 100; i++)
    if (i & 8)
      a[i] = (p + q) + 2;
    else
      a[i] = (p + q) + 4;
}

I expected (p+q) to be moved out of loop by pre, but it does not happen. At
first I thought this is caused by reassociation, which modifies the loop to

  for (i = 0; i < 100; i++)
    if (i & 8)
      a[i] = (p + 2) + q;
    else
      a[i] = (p + 4) + q;

But even with reassociation disabled, PRE does nothing.

-- 
           Summary: Missed pre opportunity
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rakdver at gcc dot gnu dot org
                CC: dberlin at gcc dot gnu dot org,gcc-bugs at gcc dot gnu
                    dot org
 GCC build triplet: i686-pc-linux-gnu
  GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu


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


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

end of thread, other threads:[~2006-01-28 20:59 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-23619-5077@http.gcc.gnu.org/bugzilla/>
2005-12-15 15:04 ` [Bug tree-optimization/23619] Missed pre opportunity dberlin at gcc dot gnu dot org
2006-01-26 17:53 ` dberlin at gcc dot gnu dot org
2006-01-28 20:59 ` pinskia at gcc dot gnu dot org
2005-08-29  9:17 [Bug tree-optimization/23619] New: " rakdver at gcc dot gnu dot org
2005-08-29 12:33 ` [Bug tree-optimization/23619] " pinskia at gcc dot gnu dot org
2005-08-29 12:53 ` rakdver at gcc dot gnu dot org
2005-08-29 12:57 ` pinskia at gcc dot gnu dot org
2005-08-29 13:52 ` dberlin at dberlin dot org
2005-08-29 15:23 ` dberlin at dberlin dot org
2005-08-29 15:24 ` dberlin at dberlin dot org
2005-08-29 19:31 ` dberlin at gcc dot gnu dot org
2005-08-29 19:32 ` dberlin at dberlin dot org
2005-08-29 19:47 ` dberlin 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).