[llvm] [VPlan] Connect (MemRuntime|SCEV)Check blocks as VPlan transform (NFC). (PR #143879)

via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 5 14:38:02 PDT 2025


================
@@ -7615,11 +7515,16 @@ EpilogueVectorizerEpilogueLoop::createEpilogueVectorizedLoopSkeleton() {
   EPI.EpilogueIterationCountCheck->getTerminator()->replaceUsesOfWith(
       VecEpilogueIterationCountCheck, LoopScalarPreHeader);
 
-  if (EPI.SCEVSafetyCheck)
-    EPI.SCEVSafetyCheck->getTerminator()->replaceUsesOfWith(
+  // Retrieve blocks with SCEV and memory runtime checks, if they have been
+  // connected to the CFG, otherwise they are unused and will be deleted. Their
+  // terminators and phis using them need adjusting below.
----------------
ayalz wrote:

```suggestion
  // Adjust the terminators of runtime check blocks and phis using them.
```

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


More information about the llvm-commits mailing list