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

            Bug ID: 122678
           Summary: simple_dce_from_worklist does not handle semi-simple
                    cycles
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: 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: ---

testcase:
```
int f(int a)
{
  int b = a;
  for(int i = 0; i < 10; i++)
    a |= b;
  return b | a;
}
```

yes this is simplified testcase but ccp was able to do this in GCC 13 but after
the move over to simple_dce_from_worklist in r14-569-g21e2ef2dc25de3, it is not
able to any more.

This was also noticed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122663#c9
.
So I thought I would file a bug with a testcase :).

Reply via email to