[llvm] [CodeGen] Expand fmaximum/fminimum reductions (PR #195169)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 9 09:29:12 PDT 2026
================
@@ -158,6 +163,16 @@ 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: {
+ Value *Vec = II->getArgOperand(0);
+ if (!isPowerOf2_32(
+ cast<FixedVectorType>(Vec->getType())->getNumElements()))
+ continue;
----------------
arsenm wrote:
```suggestion
```
I think this is completely illegitimate, regardless of whatever existing code is doing which should also be removed. Lowering passes should be comprehensive. This also needs tests
https://github.com/llvm/llvm-project/pull/195169
More information about the llvm-commits
mailing list