[llvm] [CodeGen] Expand fmaximum/fminimum reductions (PR #195169)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed May 13 05:41:03 PDT 2026
================
@@ -158,6 +160,19 @@ bool expandReductions(Function &F, const TargetTransformInfo *TTI,
Rdx = getShuffleReduction(Builder, Vec, RdxOpcode, RS, RK);
break;
}
+ case Intrinsic::vector_reduce_fmaximum:
+ case Intrinsic::vector_reduce_fminimum: {
+ // We require "nnan" to use a shuffle reduction; "nsz" is implied by the
----------------
RKSimon wrote:
> So this pass provides incomplete legalization?
Precisely - the expand-reductions pass only expands pow2 cases (except for sequential fadd cases which is does scalarize as expected) as a helper pass prior to DAG builder - the rest is done much later in DAG legalisation by TargetLowering::expandVecReduce
Neither do a good job of it imo :/
https://github.com/llvm/llvm-project/pull/195169
More information about the llvm-commits
mailing list