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/15452] New: [tree-ssa] Optimize cascaded a = a == 0;


This is very similar to PR 14758.

int
foo (int a)
{
  a = !a;
  a = !a;
  a = !a;
  a = !a;
  a = !a;
  return a;
}

I get:

foo (a)
{
<bb 0>:
  a_2 = a_1 == 0;
  a_3 = a_2 == 0;
  a_4 = a_3 == 0;
  a_5 = a_4 == 0;
  a_6 = a_5 == 0;
  return a_6;

}

Do the obvious optimization.

-- 
           Summary: [tree-ssa] Optimize cascaded a = a == 0;
           Product: gcc
           Version: 3.5.0
            Status: UNCONFIRMED
          Keywords: pessimizes-code
          Severity: enhancement
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: kazu at cs dot umass dot edu
                CC: gcc-bugs at gcc dot gnu dot org


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


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