public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug tree-optimization/18832] New: missed jump threading with ||
@ 2004-12-04 19:31 pinskia at gcc dot gnu dot org
  2004-12-04 19:43 ` [Bug tree-optimization/18832] " pinskia at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-04 19:31 UTC (permalink / raw)
  To: gcc-bugs

I was messing around with trying to find compile time regressions.
The following 3 functions should produce the same asm.

int f0(int c, int a, int b)
{
  if (a == 0 || b == 0) c++;
  if (a == 0 || b == 0) c++;
  return c;
}

int f1(int c,int a, int b)
{
  if (a == 0) goto L1;
  if (b == 0) goto L1; else goto L5;
L1:
  c++;
L5:

  if (a == 0) goto L2;
  if (b == 0) goto L2; else goto L3;
L2:
  c++;
L3:
  return c;
}


int f2(int c,int a, int b)
{
  if (a == 0) goto L1;
  if (b == 0) goto L1; else goto L5;
L1:
  c+=2;
L5:
  return c;
}

-- 
           Summary: missed jump threading with ||
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 7+ messages in thread
[parent not found: <bug-18832-4@http.gcc.gnu.org/bugzilla/>]

end of thread, other threads:[~2011-03-17 23:10 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-12-04 19:31 [Bug tree-optimization/18832] New: missed jump threading with || pinskia at gcc dot gnu dot org
2004-12-04 19:43 ` [Bug tree-optimization/18832] " pinskia at gcc dot gnu dot org
2004-12-05 16:16 ` pinskia at gcc dot gnu dot org
2005-02-15  1:26 ` law at redhat dot com
2005-04-23  1:08 ` law at redhat dot com
2005-04-25 18:20 ` pinskia at gcc dot gnu dot org
     [not found] <bug-18832-4@http.gcc.gnu.org/bugzilla/>
2011-03-17 23:14 ` law at redhat dot com

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).