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

            Bug ID: 109691
           Summary: Takes until forwprop2 to remove !a sometimes
           Product: gcc
           Version: 14.0
            Status: UNCONFIRMED
          Keywords: internal-improvement, missed-optimization
          Severity: normal
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
int f(_Bool c, int a, int b)
{
        _Bool d = c;
        d = !d;
        if (d != 0) return a;
        return b;
}
```

It takes until forwprop2 now to remove all of the code before the conditional.
In GCC 4.9.0, we used to do it almost all the way in forwprop1; with just one
assignment added.

I noticed this while looking into PR 67628 but it is not exactly an issue there
so filing it seperately.

Reply via email to