[llvm] [VPlan] Truncate/Extend ComputeReductionResult at construction (NFC). (PR #141860)
David Sherwood via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 07:07:28 PDT 2025
================
@@ -7270,6 +7270,13 @@ static void fixReductionScalarResumeWhenVectorizingEpilog(
// created a bc.merge.rdx Phi after the main vector body. Ensure that we carry
// over the incoming values correctly.
using namespace VPlanPatternMatch;
+ if (EpiRedResult->getNumUsers() == 1 &&
+ isa<VPInstructionWithType>(*EpiRedResult->user_begin())) {
+ EpiRedResult = cast<VPInstructionWithType>(*EpiRedResult->user_begin());
----------------
david-arm wrote:
Do you know why we don't just pass in the sext/zext as the `R` argument to `fixReductionScalarResumeWhenVectorizingEpilog` and then look through the sext/zext?
https://github.com/llvm/llvm-project/pull/141860
More information about the llvm-commits
mailing list