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

            Bug ID: 66423
           Summary: a % (1 << b) no longer gets folded to a & (1 << b) for
                    unsigned a and b
           Product: gcc
           Version: 6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: ppalka at gcc dot gnu.org
  Target Milestone: ---

Test case:

unsigned int
my_mod (unsigned int a, unsigned int b)
{
    return a % (1 << b);
}

no longer gets folded to a & (1 << b).

I have not done a bisection but it may be that r223690 is the cause.

Reply via email to