[Bug tree-optimization/19516] New: missed optimization

rguenth at tat dot physik dot uni-tuebingen dot de gcc-bugzilla@gcc.gnu.org
Tue Jan 18 22:29:00 GMT 2005


Actually a side-bug of 19507.  The testcase

void bar(void);

void foo(const _Bool *flag)
{
        if (*flag)
                bar();
        if (*flag)
                bar();
}

Should be transformed to (at the tree level):

if (!*flag)
   return;
bar();
if (*flag)
   bar();

this is only done at the RTL level at the moment.

Andrew Pinski reports this works, if we exchange _Bool
for int/short/char.

-- 
           Summary: missed optimization
           Product: gcc
           Version: 4.0.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P2
         Component: tree-optimization
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at tat dot physik dot uni-tuebingen dot de
                CC: gcc-bugs at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list