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/16157] New: gcc fails to optimize redundant expression


extern int a0, a1, a2, a3, a4;
void f ()
{
	/* this can be optimized to four additions... */
	a4 = a4 + a3 + a2 + a1 + a0;
	a3 = a3 + a2 + a1 + a0;
	a2 = a2 + a1 + a0;
	a1 = a1 + a0;
}

...but gcc does nothing with this function.

-- 
           Summary: gcc fails to optimize redundant expression
           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: belyshev at lubercy dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


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