[llvm] [LV] Vectorize FMax via OrderedFCmpSelect w/o fast-math flags. (PR #146711)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 6 10:06:34 PDT 2025
================
@@ -654,7 +654,105 @@ void VPlanTransforms::attachCheckBlock(VPlan &Plan, Value *Cond,
}
}
-bool VPlanTransforms::handleMaxMinNumReductions(VPlan &Plan) {
+static bool handleOrderedFCmpSelect(VPlan &Plan,
----------------
ayalz wrote:
Worth documenting how MaxNum/MinNum and FMaxOGT/FMinOLT are handled, along with examples demonstrating their challenges and how the latter processes the final horizontal reduction to fix its +0/-0 discrepancy by recording first/last argmax/argmin (or sign of first/last zero), and how the former reverts to scalar loop when encountering NaN's (rather than trying a similar fix?).
https://github.com/llvm/llvm-project/pull/146711
More information about the llvm-commits
mailing list