[llvm] [LoopVectorize] Enable vectorisation of early exit loops with live-outs (PR #120567)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 5 11:01:19 PST 2025


================
@@ -212,7 +212,11 @@ bool VPlanVerifier::verifyVPBasicBlock(const VPBasicBlock *VPBB) {
           continue;
         }
 
-        if (!VPDT.dominates(VPBB, UI->getParent())) {
+        // Now that we support vectorising loops with uncountable early exits
+        // we can end up in situations where VPBB does not dominate the exit
+        // block. Only do the check if the user is not in a VPIRBasicBlock.
+        if (!isa<VPIRBasicBlock>(UI->getParent()) &&
+            !VPDT.dominates(VPBB, UI->getParent())) {
----------------
fhahn wrote:

What is this case? Ideally we shouldn't come up with cases where there are uses before defs.

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


More information about the llvm-commits mailing list