[llvm] [IVDescriptors] Don't require nsz/nnan for (min|max)num. (PR #137003)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 11 06:28:11 PDT 2025
fhahn wrote:
IIUC it looks like the new maximumnum/minimumnum intrinsics won’t be ready for the next release, but I think it would be great to close this gap to GCC in the upcoming release if possible .
I still think it would be OK to match GCCs current behavior w.r.t. sNaNs, as current codegen doesn’t handle sNaNs as specified in LangRef.
But another alternative may be to vectorize maxnum/minnum without fast math flags by adding an extra check if any of the inputs are NaN. If that’s the case, we can resume the scalar loop at the start of the vector iteration that encountered NaNs. WDYT? The patch is https://github.com/llvm/llvm-project/pull/148239
https://github.com/llvm/llvm-project/pull/137003
More information about the llvm-commits
mailing list