[llvm] [VPlan] Delete the redundant overflow check for DataAndControlFlowWithoutRuntimeCheck (PR #79825)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 19 09:24:39 PST 2024


================
@@ -1140,12 +1125,18 @@ static VPActiveLaneMaskPHIRecipe *addVPLaneMaskPhiAndUpdateExitBranch(
   // original terminator.
   VPRecipeBase *OriginalTerminator = EB->getTerminator();
   Builder.setInsertPoint(OriginalTerminator);
-  auto *InLoopIncrement =
-      Builder.createOverflowingOp(VPInstruction::CanonicalIVIncrementForPart,
-                                  {IncrementValue}, {false, false}, DL);
-  auto *ALM = Builder.createNaryOp(VPInstruction::ActiveLaneMask,
-                                   {InLoopIncrement, TripCount}, DL,
-                                   "active.lane.mask.next");
+
+  auto *InLoopIncrement = CanonicalIVIncrement;
+  // When the loop is guarded by a runtime overflow check for the loop induction
----------------
fhahn wrote:

I might be missing something, but if `DataAndControlFlowWithoutRuntimeCheck` there is no runtime check to make sure `iv + UFxVF` doesn't overflow.

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


More information about the llvm-commits mailing list