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

David Sherwood via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 21 05:37:29 PST 2025


================
@@ -306,6 +306,24 @@ template <> struct GraphTraits<VPlan *> {
   }
 };
 
+inline bool VPlan::isExitBlock(VPBlockBase *VPBB) {
+  if (!isa<VPIRBasicBlock>(VPBB) || VPBB->getNumSuccessors() ||
----------------
david-arm wrote:

It has to live in VPlanCFG.h, even more so if it calls `getExitBlocks` because of the auto keyword:

```
llvm/lib/Transforms/Vectorize/VPlan.h:4003:41: error: use of ‘auto llvm::VPlan::getExitBlocks()’ before deduction of ‘auto’
 4003 |     for (auto *ExitVPBB : getExitBlocks())
```

This is the problem with using auto keywords for return values.

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


More information about the llvm-commits mailing list