https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77836

            Bug ID: 77836
           Summary: Simplify (x>>4)*16 in gimple
           Product: gcc
           Version: 7.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: glisse at gcc dot gnu.org
  Target Milestone: ---

unsigned f(unsigned x){ return (x>>4)*16; }

gives the optimized dump

  _1 = x_2(D) >> 4;
  _3 = _1 * 16;

while (x/16)*16 and (x>>4)<<4 are optimized to

  _2 = x_1(D) & 4294967280;

Reply via email to