[llvm] [LV] Create block in mask up-front if needed. (PR #76635)

via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 1 14:01:00 PST 2024


================
@@ -8108,14 +8108,18 @@ void VPRecipeBuilder::createHeaderMask(VPlan &Plan) {
   BlockMaskCache[Header] = BlockMask;
 }
 
-VPValue *VPRecipeBuilder::createBlockInMask(BasicBlock *BB, VPlan &Plan) {
+VPValue *VPRecipeBuilder::getBlockInMask(BasicBlock *BB) {
   assert(OrigLoop->contains(BB) && "Block is not a part of a loop");
 
   // Look for cached value.
   BlockMaskCacheTy::iterator BCEntryIt = BlockMaskCache.find(BB);
-  if (BCEntryIt != BlockMaskCache.end())
-    return BCEntryIt->second;
+  assert(BCEntryIt != BlockMaskCache.end());
----------------
ayalz wrote:

nit: add message to assert.

https://github.com/llvm/llvm-project/pull/76635


More information about the llvm-commits mailing list