[llvm] [SelectionDAG][x86] Ensure vector reduction optimization (PR #144231)
Suhajda Tamás via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 18 10:15:54 PDT 2025
================
@@ -1435,6 +1435,20 @@ X86TargetLowering::X86TargetLowering(const X86TargetMachine &TM,
setOperationAction(ISD::BITREVERSE, VT, Custom);
}
+ // Vector min/max reductions
+ if (Subtarget.hasSSE41())
+ {
+ for (MVT VT : MVT::vector_valuetypes()) {
----------------
sutajo wrote:
Now I see what you mean. I added checks here to only do lowering for vector types that support PHMINPOSUW.
https://github.com/llvm/llvm-project/pull/144231
More information about the llvm-commits
mailing list