[llvm] [LV] Allow partial reductions with an extended bin op (PR #165536)

Sam Tebbs via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 17 05:18:47 PST 2025


================
@@ -7994,6 +8005,14 @@ bool VPRecipeBuilder::getScaledReductions(
 
       ExtOpTypes[I] = ExtOp->getType();
       ExtKinds[I] = TTI::getPartialReductionExtendKind(Exts[I]);
+      // Make sure that the outer extend is either sext or the same kind as the
+      // inner extend.
+      if (OuterExtKind.has_value()) {
+        TTI::PartialReductionExtendKind OuterKind = OuterExtKind.value();
+        if (OuterKind != TTI::PartialReductionExtendKind::PR_SignExtend &&
----------------
SamTebbs33 wrote:

Yes you're right! Fixed.

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


More information about the llvm-commits mailing list