https://gcc.gnu.org/bugzilla/show_bug.cgi?id=122153
Bug ID: 122153
Summary: cselim and cselim-lited should be able to handle `=
{}`
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: missed-optimization
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: pinskia at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take:
```
struct s1
{
int t;
};
void g(struct s1*);
struct s1 f(int *a, int c, int d)
{
struct s1 r;
int t1;
if (c < d)
{
r = (struct s1){};
t1 = c;
}
else
{
r = (struct s1){};
t1 = d;
}
g(&r);
r.t = t1;
return r;
}
```
Right now this is only handled by sink but really the min should be able to
optimize at phiopt1.