The fmin/fmax tests added by D95245 use the no-nans-fp-math function
attribute, and fail to vectorize when the attribute is removed in favour of using
nnan directly in the instructions. This patch changes isRecurrenceInstr
to also check if the no-NaNs flag is set on the fcmp/select.
I'm not sure if there are any problems with this approach, which is why I've
split this out from D95245.
Hi @kmclaughlin, I've not looked into this in the same detail as you have, but I wonder if the reason we only checked the function attribute previously is because the reduction is used outside the loop? Not saying that's a good reason for not vectorising though. :) Just that perhaps it was technically the easier solution since we might have to also look outside the loop to make sure users of the value also don't care about NaNs? Perhaps @dmgreen or @spatel have an idea?