[llvm] [LoopVectorizer] Add support for partial reductions (PR #92418)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Nov 17 11:24:28 PST 2024


================
@@ -210,6 +211,17 @@ typedef TargetTransformInfo TTI;
 /// for IR-level transformations.
 class TargetTransformInfo {
 public:
+  enum PartialReductionExtendKind { PR_None, PR_SignExtend, PR_ZeroExtend };
+
+  static PartialReductionExtendKind
+  getPartialReductionExtendKind(Instruction *I) {
----------------
fhahn wrote:

Would be good to document and would probably be good to avoid pulling in `Instructions.h` here, possibly by moving the definition to TTIImpl?

https://github.com/llvm/llvm-project/pull/92418


More information about the llvm-commits mailing list