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

            Bug ID: 110405
           Summary: missing nonzerobits on branch
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
void h(unsigned long);
void
f (unsigned long i)
{
  if ((i & 7) == 6)
    if(i & 1)
      h(0);
}
```

The call to h should be optimized away as we know on the branch (a&1) == 0 as
we know the nonzerobits of i is ~1 .

Reply via email to