[clang] [flang] [libc] [libcxx] [lld] [lldb] [llvm] [mlir] [LV] Vectorize maxnum/minnum w/o fast-math flags. (PR #148239)

Florian Hahn via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 18 08:48:10 PDT 2025


================
@@ -1096,7 +1100,8 @@ Value *llvm::createMinMaxOp(IRBuilderBase &Builder, RecurKind RK, Value *Left,
                             Value *Right) {
   Type *Ty = Left->getType();
   if (Ty->isIntOrIntVectorTy() ||
-      (RK == RecurKind::FMinimum || RK == RecurKind::FMaximum ||
+      (RK == RecurKind::FMinNum || RK == RecurKind::FMaxNum ||
+       RK == RecurKind::FMinimum || RK == RecurKind::FMaximum ||
        RK == RecurKind::FMinimumNum || RK == RecurKind::FMaximumNum)) {
     // TODO: Add float minnum/maxnum support when FMF nnan is set.
----------------
fhahn wrote:

I removed it now, as we support FMinNum/FMaxNUm now. The VPlan-transform can also be updated to check for nnan flags and avoid checks if present.

https://github.com/llvm/llvm-project/pull/148239


More information about the cfe-commits mailing list