public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug optimization/15357] New: [tree-ssa] combing if statements
@ 2004-05-09 22:11 pinskia at gcc dot gnu dot org
  2004-05-09 22:20 ` [Bug optimization/15357] " pinskia at gcc dot gnu dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-05-09 22:11 UTC (permalink / raw)
  To: gcc-bugs

The following two functions should give the same asm (If the branch cost is high 
enough):
int g(void);
int h(int a, int b, int c, int d)
{
  if (a==b)
   if (c==d)
     return g();
  return 0;
}
int h1(int a, int b, int c, int d)
{
  if (a==b && c==d)
    return g();
  return 0;
}

And these two:
int j(int a, int b, int c, int d)
{
  if (a==b)
   goto a;
  if (c==d)
   goto a;
  else
   goto b;
a:
  return g();
b:
  return 0;
}
int j1(int a, int b, int c, int d)
{
  if (a==b || c==d)
    return g();
  return 0;
}

-- 
           Summary: [tree-ssa] combing if statements
           Product: gcc
           Version: tree-ssa
            Status: UNCONFIRMED
          Keywords: pessimizes-code, memory-hog, compile-time-hog
          Severity: enhancement
          Priority: P2
         Component: optimization
        AssignedTo: pinskia at gcc dot gnu dot org
        ReportedBy: pinskia at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org
OtherBugsDependingO 15241,15348,15352
             nThis:


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


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

end of thread, other threads:[~2013-11-09 20:39 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-05-09 22:11 [Bug optimization/15357] New: [tree-ssa] combing if statements pinskia at gcc dot gnu dot org
2004-05-09 22:20 ` [Bug optimization/15357] " pinskia at gcc dot gnu dot org
2004-05-25  0:09 ` [Bug tree-optimization/15357] " pinskia at gcc dot gnu dot org
2005-05-08 18:17 ` pinskia at gcc dot gnu dot org
     [not found] <bug-15357-6528@http.gcc.gnu.org/bugzilla/>
2007-01-26 13:44 ` rguenth at gcc dot gnu dot org
2007-06-12 12:10 ` rguenth at gcc dot gnu dot org
     [not found] <bug-15357-4@http.gcc.gnu.org/bugzilla/>
2012-01-21 22:11 ` pinskia at gcc dot gnu.org
2013-11-09 20:40 ` pinskia at gcc dot gnu.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).