[llvm] 372d3fb - [CodeGen] Remove `shouldExpandPartialReductionIntrinsic()` hook (NFC) (#161498)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 1 05:28:41 PDT 2025


Author: Benjamin Maxwell
Date: 2025-10-01T13:28:37+01:00
New Revision: 372d3fb10c9dd0ff4e780d68b86220e30fd00b27

URL: https://github.com/llvm/llvm-project/commit/372d3fb10c9dd0ff4e780d68b86220e30fd00b27
DIFF: https://github.com/llvm/llvm-project/commit/372d3fb10c9dd0ff4e780d68b86220e30fd00b27.diff

LOG: [CodeGen] Remove `shouldExpandPartialReductionIntrinsic()` hook (NFC) (#161498)

This is unused. Targets can lower/expand the `PARTIAL_REDUCE_*` ISD
nodes.

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/TargetLowering.h
    llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index c45e03a7bdad8..7bbad172b2d42 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -480,13 +480,6 @@ class LLVM_ABI TargetLoweringBase {
     return true;
   }
 
-  /// Return true if the @llvm.vector.partial.reduce.* intrinsic
-  /// should be expanded using generic code in SelectionDAGBuilder.
-  virtual bool
-  shouldExpandPartialReductionIntrinsic(const IntrinsicInst *I) const {
-    return true;
-  }
-
   /// Return true if the @llvm.get.active.lane.mask intrinsic should be expanded
   /// using generic code in SelectionDAGBuilder.
   virtual bool shouldExpandGetActiveLaneMask(EVT VT, EVT OpVT) const {

diff  --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index b5201a311c591..c21890a0d856f 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -8103,10 +8103,6 @@ void SelectionDAGBuilder::visitIntrinsicCall(const CallInst &I,
     return;
   }
   case Intrinsic::vector_partial_reduce_add: {
-    if (!TLI.shouldExpandPartialReductionIntrinsic(cast<IntrinsicInst>(&I))) {
-      visitTargetIntrinsic(I, Intrinsic);
-      return;
-    }
     SDValue Acc = getValue(I.getOperand(0));
     SDValue Input = getValue(I.getOperand(1));
     setValue(&I,


        


More information about the llvm-commits mailing list