https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125799
Bug ID: 125799
Summary: load commonizing and store elimination combing
Product: gcc
Version: 16.0
Status: UNCONFIRMED
Keywords: 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:
```
int f(int *a, int *c, int *d, int e)
{
int t;
if (e)
{
*a = 1;
t = *c;
}
else
{
*a = 0;
t = *d;
}
return t;
}
```
We should be able to optimize this to a conditional move and a ccset but
currently we do.