[llvm] [VPlan] Introduce VPlan-based hasTailFolded helper. (NFC) (PR #208329)
Luke Lau via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 21:06:31 PDT 2026
================
@@ -4894,6 +4894,12 @@ class VPlan {
/// loop region contains a nested loop region.
LLVM_ABI_FOR_TEST bool isOuterLoop() const;
+ /// Returns true if the vector loop region is tail-folded.
+ bool hasTailFolded() const {
+ const VPRegionBlock *LoopRegion = getVectorLoopRegion();
+ return LoopRegion && LoopRegion->getHeaderMask();
+ }
----------------
lukel97 wrote:
I forgot, the header mask is now a symbolic value. And it will stick around after `VPlanTransforms::materializeHeaderMask`, even if the materialized mask is removed
https://github.com/llvm/llvm-project/pull/208329
More information about the llvm-commits
mailing list