This is something I meant to do a long time ago but never got around to it. These instructions should be an improvement over the compare/fsel sequence we currently emit.
The semantics of the instructions as specified in the ISA match the semantics specified in the description of the nodes.
We will get the ISD::FMAXNUM/ISD::FMINNUM node if mark it as legal.
llc test.ll -mattr=+vsx
And also for the intrinsic llvm.minnum/llvm.maxnum.
The node is built directly not combined by select_cc. And I think, we need to lower it if we know that, the operand is NaN or not(i.e. isKnownNeverNaN()).