This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug optimization/15357] New: [tree-ssa] combing if statements


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]