[llvm] 1f00c42 - [VPlan] Assert masked interleave accesses are allowed if needed (NFC)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 20 13:46:22 PDT 2024


Author: Florian Hahn
Date: 2024-07-20T21:42:38+01:00
New Revision: 1f00c4244602e66f98a608bd20d6fb62f11079de

URL: https://github.com/llvm/llvm-project/commit/1f00c4244602e66f98a608bd20d6fb62f11079de
DIFF: https://github.com/llvm/llvm-project/commit/1f00c4244602e66f98a608bd20d6fb62f11079de.diff

LOG: [VPlan] Assert masked interleave accesses are allowed if needed (NFC)

Add assertion at interleave group construction.

Added: 
    

Modified: 
    llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
index 6b050c138552b..86e4149cf27a6 100644
--- a/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
+++ b/llvm/lib/Transforms/Vectorize/LoopVectorize.cpp
@@ -8983,6 +8983,8 @@ LoopVectorizationPlanner::tryToBuildVPlanWithVPRecipes(VFRange &Range) {
 
     bool NeedsMaskForGaps =
         IG->requiresScalarEpilogue() && !CM.isScalarEpilogueAllowed();
+    assert((!NeedsMaskForGaps || useMaskedInterleavedAccesses(CM.TTI)) &&
+           "masked interleaved groups are not allowed.");
     auto *VPIG = new VPInterleaveRecipe(IG, Recipe->getAddr(), StoredValues,
                                         Recipe->getMask(), NeedsMaskForGaps);
     VPIG->insertBefore(Recipe);


        


More information about the llvm-commits mailing list