https://gcc.gnu.org/bugzilla/show_bug.cgi?id=126247
Bug ID: 126247
Summary: [13/14/15/16/17 Regression] ifcombine removes trapping
comparsion incorrectly
Product: gcc
Version: 17.0
Status: UNCONFIRMED
Keywords: wrong-code
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 a, double b)
{
return a >= b && a == b;
}
int f1(double a, double b)
{
if (a >= b)
return a == b;
return 0;
}
```
ifcombine since 4.7.0, has been combining the f to just `a == b` even with
-ftrapping-math.
On aarch64 since GCC 15, reassociation has been doing the same for f1.