We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5b01b8c commit db3c9afCopy full SHA for db3c9af
llvm/lib/Transforms/Vectorize/LoopVectorizationLegality.cpp
@@ -837,10 +837,9 @@ bool LoopVectorizationLegality::canVectorizeInstrs() {
837
if (Instruction *SI = dyn_cast<SelectInst>(V))
838
Cmp = dyn_cast<CmpInst>(SI->getOperand(0));
839
}
840
- if (Cmp && !Cmp->hasOneUse()) {
841
- RecurKind Kind = RedDes.getRecurrenceKind();
842
- assert((Kind == RecurKind::IAnyOf || Kind == RecurKind::FAnyOf) &&
843
- "Unexpected type of recurrence");
+ RecurKind Kind = RedDes.getRecurrenceKind();
+ if (Cmp && !Cmp->hasOneUse() &&
+ (Kind == RecurKind::IAnyOf || Kind == RecurKind::FAnyOf)) {
844
if (MultiCmpsRed.contains(Cmp))
845
MultiCmpsRed[Cmp]++;
846
else
0 commit comments