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 tree-optimization/15777] New: Fold does not always fold sub trees


Fold does not always fold sub trees:
int f(int x)
{
  return ((x&1) == 0) == 0;
}
will produce:
((x)^ 1^ 1) & 1
but should produce:
(x) & 1

I will note that other tree optimizations later will fold the x ^ 1 ^ 1 but still, even fold will fold them 
also if they are supplied to fold.

-- 
           Summary: Fold does not always fold sub trees
           Product: gcc
           Version: 3.5.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=15777


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