[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)
David Green via llvm-commits
llvm-commits at lists.llvm.org
Thu May 16 14:19:25 PDT 2024
================
@@ -512,6 +512,16 @@ class VectorType : public Type {
EltCnt.divideCoefficientBy(2));
}
+ /// This static method returns a VectorType with quarter as many elements as the
+ /// input type and the same element type.
+ static VectorType *getQuarterElementsVectorType(VectorType *VTy) {
----------------
davemgreen wrote:
I think this should be more generic than just 4x wider. I believe an ADDP would be a 2 x wider partial reduction for example. The input type needs to be a multiple of the output type, and it might be easier to keep it to a power-2 factor.
https://github.com/llvm/llvm-project/pull/92418
More information about the llvm-commits
mailing list