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

            Bug ID: 122247
           Summary: Simple DSE is not very effecient for C++ code due to
                    EH
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: EH, missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: pinskia at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

Take:
```
struct Foo {
  int i[2];
};
int g(struct Foo);
int f(struct Foo a)
{
  struct Foo d;
  d = a;
  return g(d);
}
```

With `-O2 -fno-exceptions`, forwprop1 can remove the copy. With -fexceptions
forwprop1 can't.

This is due to the use of the vop being in the eh but it is a clobber.

I am not sure I will be able to improve this for GCC 16 so I am just recording
it

Reply via email to