[llvm] [VPlan] Handle live-in extend operands in partial reduction ::computeCost (PR #163175)

Sander de Smalen via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 21 06:57:28 PDT 2025


================
@@ -355,14 +360,15 @@ VPPartialReductionRecipe::computeCost(ElementCount VF,
     ExtAType = GetExtendKind(OpR);
   } else if (isa<VPReductionPHIRecipe>(OpR)) {
     auto RedPhiOp1R = getOperand(1)->getDefiningRecipe();
-    if (isa<VPWidenCastRecipe>(RedPhiOp1R)) {
+    if (isa_and_nonnull<VPWidenCastRecipe>(RedPhiOp1R)) {
----------------
sdesmalen-arm wrote:

I left a comment yesterday on @SamTebbs33' patch that took these changes: https://github.com/llvm/llvm-project/pull/147302#discussion_r2445007854

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


More information about the llvm-commits mailing list