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

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 20 03:30:44 PST 2025


================
@@ -8860,12 +8875,16 @@ VPRecipeBuilder::getScaledReduction(PHINode *PHI,
   Instruction *ExtA = cast<Instruction>(BinOp->getOperand(0));
   Instruction *ExtB = cast<Instruction>(BinOp->getOperand(1));
 
+  // Check that the extends extend from the same type.
+  if (A->getType() != B->getType())
+    return std::nullopt;
+
----------------
SamTebbs33 wrote:

The target checks this.

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


More information about the llvm-commits mailing list