https://gcc.gnu.org/bugzilla/show_bug.cgi?id=125561

            Bug ID: 125561
           Summary: HONOR_NANs and HONOR_INFINITIES in match.pd should
                    replaced with global range with maybe_isnan and
                    maybe_isinf
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Keywords: missed-optimization
          Severity: enhancement
          Priority: P3
         Component: tree-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: pinskia at gcc dot gnu.org
  Target Milestone: ---

While looking into missed optimizations, some parts of the match.pd should use
the global range of the ssa name to decide if the value could be a NAN or an
inf instead of just using `HONOR_NANs and HONOR_INFINITIES`. This should allow
for more optimizations.

An example is:
```
double f(double a)
{
  if (a != a) __builtin_unreachable();
  return a - a;
}
```

This can just be changed into `return 0;`.

Reply via email to