Skip to content

Commit dafa614

Browse files
committed
[LV] Fix missing entry in willGenerateVectors
willGenerateVectors switches on opcodes of a recipe, but Histogram is missing in the switch statement, which could cause a crash in some cases. The crash was initially observed when developing another patch: no test case is included with this patch, as the bug is evident.
1 parent 8639b36 commit dafa614

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4460,6 +4460,7 @@ static bool willGenerateVectors(VPlan &Plan, ElementCount VF,
44604460
case VPDef::VPWidenSelectSC:
44614461
case VPDef::VPBlendSC:
44624462
case VPDef::VPFirstOrderRecurrencePHISC:
4463+
case VPDef::VPHistogramSC:
44634464
case VPDef::VPWidenPHISC:
44644465
case VPDef::VPWidenIntOrFpInductionSC:
44654466
case VPDef::VPWidenPointerInductionSC:

0 commit comments

Comments
 (0)