[llvm] [LV][AArch64] Provide option to use partial reductions by default (PR #216001)
Benjamin Maxwell via llvm-commits
llvm-commits at lists.llvm.org
Wed Aug 26 06:18:07 PDT 2026
================
@@ -36,13 +36,20 @@
#include "llvm/IR/Intrinsics.h"
#include "llvm/IR/Metadata.h"
#include "llvm/Support/Casting.h"
+#include "llvm/Support/CommandLine.h"
#include "llvm/Support/TypeSize.h"
#include "llvm/Transforms/Utils/LoopUtils.h"
using namespace llvm;
using namespace VPlanPatternMatch;
using namespace SCEVPatternMatch;
+static cl::opt<bool>
+ UsePartialReduceByDefault("use-partial-reduce-by-default", cl::init(false),
+ cl::Hidden,
+ cl::desc("Use partial reduction intrinsics for "
+ "all supported unordered reductions."));
+
----------------
MacDue wrote:
Up to you, but I think it might be preferred to keep all the `cl::opt<>` statics together in LoopVectorize.cpp, then add a new parameter to `createPartialReductions` (like `UseForUnorderedReductions`).
https://github.com/llvm/llvm-project/pull/216001
More information about the llvm-commits
mailing list