Adapted from D54696 by @nikic.
This patch improves the default lowering of saturating
float to int conversions, FP_TO_[SU]INT_SAT, on AArch64.
Since the default FP_TO_INT operations on AArch64 are
already saturating, we can take advantage of this
behavior in the lowering for the saturating operations.
Perhaps I've misread something but with this change it looks like a NaN input to FP_TO_UINT_SAT can result in (unsigned int)MaxFloat rather than the expected zero? because the following ISD::FMINNUM will choose the non-NaN input rather than propagating MinFloat like it did before (because the FMAXNUM has been omitted).
This goes against my previous suggestion but perhaps it will be cleaner to perform all the lowering within LowerFP_TO_INT_SAT as the process will be a uniform: