[llvm] [VPlan] Truncate/Extend ComputeReductionResult at construction (NFC). (PR #141860)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 14:21:05 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());
+ assert((EpiRedResult->getOpcode() == Instruction::SExt ||
----------------
fhahn wrote:
Ah yes, we already have that. Used to look through the cast, thanks
https://github.com/llvm/llvm-project/pull/141860
More information about the llvm-commits
mailing list