https://gcc.gnu.org/bugzilla/show_bug.cgi?id=128516
Bug ID: 128516
Summary: `x unorder CST` should be optimized to `x unorder x`
Product: gcc
Version: 17.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: ---
Take:
```
int f(double x)
{
return __builtin_isunordered(x, 1.0);
}
```
This should be simplified into:
```
int f(double x)
{
return __builtin_isunordered(x, x);
}
```
At least for the non-trapping math case; I think for the trapping case too.