[Bug middle-end/30904] New: [dataflow] No longer optimizes shifts with large count

rguenth at gcc dot gnu dot org gcc-bugzilla@gcc.gnu.org
Wed Feb 21 09:54:00 GMT 2007


extern void link_error (const char *);
extern int ones;
void foo(int);
void kernel ()
{
    struct { unsigned int a : 7; } s;

      s.a = ones;

      if (s.a >> 8)
          link_error ("foo");
      if (s.a >> 9)
          link_error ("foo");
}

mainline optimizes this to an empty function with -O2, dataflow branch
retains the s.a >> 9 check.


-- 
           Summary: [dataflow] No longer optimizes shifts with large count
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: normal
          Priority: P3
         Component: middle-end
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: rguenth at gcc dot gnu dot org


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



More information about the Gcc-bugs mailing list