[llvm] [VPlan] Add ComputeAnyOfResult VPInstruction (NFC) (PR #141932)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 3 05:27:37 PDT 2025
================
@@ -7229,15 +7239,19 @@ static void fixReductionScalarResumeWhenVectorizingEpilog(
EpiRedHeaderPhi->getStartValue()->getUnderlyingValue();
if (RecurrenceDescriptor::isAnyOfRecurrenceKind(
RdxDesc.getRecurrenceKind())) {
+ Value *StartV = EpiRedResult->getOperand(1)->getLiveInIRValue();
+ (void)StartV;
auto *Cmp = cast<ICmpInst>(MainResumeValue);
assert(Cmp->getPredicate() == CmpInst::ICMP_NE &&
"AnyOf expected to start with ICMP_NE");
- assert(Cmp->getOperand(1) == RdxDesc.getRecurrenceStartValue() &&
+ assert(Cmp->getOperand(1) == StartV &&
"AnyOf expected to start by comparing main resume value to original "
"start value");
MainResumeValue = Cmp->getOperand(0);
} else if (RecurrenceDescriptor::isFindLastIVRecurrenceKind(
RdxDesc.getRecurrenceKind())) {
+ Value *StartV = getStartValueFromReductionResult(EpiRedResult);
+ (void)StartV;
----------------
fhahn wrote:
I guess the use in IsExpectedPattern should be enough, even though that is ony used in an assert. Removed, thanks
https://github.com/llvm/llvm-project/pull/141932
More information about the llvm-commits
mailing list