Skip to content

Commit 2308f50

Browse files
fhahnyuxuanchen1997
authored andcommitted
[VPlan] Assert masked interleave accesses are allowed if needed (NFC)
Summary: Add assertion at interleave group construction. Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60251175
1 parent 4c6cb4e commit 2308f50

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8983,6 +8983,8 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
89838983

89848984
bool NeedsMaskForGaps =
89858985
IG->requiresScalarEpilogue() && !CM.isScalarEpilogueAllowed();
8986+
assert((!NeedsMaskForGaps || useMaskedInterleavedAccesses(CM.TTI)) &&
8987+
"masked interleaved groups are not allowed.");
89868988
auto *VPIG = new VPInterleaveRecipe(IG, Recipe->getAddr(), StoredValues,
89878989
Recipe->getMask(), NeedsMaskForGaps);
89888990
VPIG->insertBefore(Recipe);

0 commit comments

Comments
 (0)