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

Drea Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Last reconfirmed|                            |2026-08-07
             Status|UNCONFIRMED                 |NEW
           Severity|normal                      |enhancement
     Ever confirmed|0                           |1

--- Comment #2 from Drea Pinski <pinskia at gcc dot gnu.org> ---
We handle MIN/MAX_EXPR here:
```
(for minmax (min max)
     maxmin (max min)
 (simplify
  (minmax @0 @0)
  @0)
/* max(max(x,y),x) -> max(x,y)  */
 (simplify
  (minmax:c (minmax:c@2 @0 @1) @0)
  @2)

```

Should be simple to add a similar for FMIN_ALL/FMAX_ALL here like what is done
for min/max(a,a):
```
(for minmax (FMIN_ALL FMAX_ALL)
 (simplify
  (minmax @0 @0)
  (if (!tree_expr_maybe_signaling_nan_p (@0))
    @0)))

```

Reply via email to