[llvm] Vectorize: Support fminimumnum and fmaximumnum (PR #131781)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 2 21:19:26 PDT 2025
================
@@ -2776,6 +2776,12 @@ class BasicTTIImplBase : public TargetTransformInfoImplCRTPBase<T> {
}
return Cost;
}
+ case Intrinsic::maximumnum:
+ case Intrinsic::minimumnum: {
+ if (TLI->isOperationLegalOrPromote(llvm::ISD::FMAXNUM_IEEE, LT.second))
+ return LT.first * 3;
----------------
arsenm wrote:
Can you comment on the expansion here?
We can't have a dedicated test for FMAXNUM_IEEE. As implemented, it's a backend only implementation detail. However the langref now states it's the same as llvm.maxnum, so eventually this will be equivalent
https://github.com/llvm/llvm-project/pull/131781
More information about the llvm-commits
mailing list