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

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 25 08:58:31 PDT 2024


================
@@ -7978,6 +7978,12 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
     return;
   }
   case Intrinsic::experimental_vector_partial_reduce_add: {
+
+    if(!TLI.shouldExpandPartialReductionIntrinsic(&I))) {
+      visitTargetIntrinsic(I, Intrinsic);
----------------
paulwalker-arm wrote:

Not sure if I've misunderstood but the TargetLowering changes only relate to code generation whereas the meat of this patch relates to a LoopVectorize transformation.

To me moving the TargetLowering change into the PR that exercise the change (currently this test is dead code with `visitTargetIntrinsic` being unreachable) into the PR that implements the `visitTargetIntrinsic` side of the branch is the way to go.

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


More information about the llvm-commits mailing list