On Fri, 8 May 2020, Richard Biener wrote:

> 
> Currently we fail to optimize those which are used when MIN/MAX_EXPR
> cannot be used for FP values but the target has IEEE conforming
> implementations.

i386 ieee_s{min,max} patterns are definitely not IEEE-compliant,
their comment alludes to that:

;; These versions of the min/max patterns implement exactly the operations
;;   min = (op1 < op2 ? op1 : op2)
;;   max = (!(op1 < op2) ? op1 : op2)
;; Their operands are not commutative, and thus they may be used in the
;; presence of -0.0 and NaN.

I don't understand why the patch is correct if the IFNs refer to fully
IEEE-compliant operations (which is in itself a bit ambiguous w.r.t
behavior when exactly one operand is a NaN).

Am I missing something?

Alexander

Reply via email to