https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126703
Bug ID: 126703
Summary: copysign(x, -abs(t)) -> copysign(x, -1.0)
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: easyhack, 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:
```
double f3(double x, double y)
{
double t = -__builtin_abs(y);
return __builtin_copysign (x,t);
}
```
This is just copysign(x, -1.0) or -abs(x).