[llvm] [LV] codegen for tail-folded epilogue loop (PR #208764)

Paul Walker via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 16 04:40:43 PDT 2026


paulwalker-arm wrote:

I'm not hugely familiar with the design of VPlan but it seems to me having to pass IsEpilogueTFEnabled all over the place is just a work-a-round for a now insufficient design?

I would expect a VPlan to contain the knowledge of whether it's tail-folded or not. I would then expect any VPlan lookup routines to use a key that's relevant.  Previously this was VF but it seems like now it is the tuple `{VF, tail-folding-style}`? With that in place the top-level algorithm then just needs to connect compatible VPlans (i.e. VPLAN{VF,TF}, VPLAN{VF1}->VPLAN{VF2}, VPLAN{VF1}->VPLAN{VF2,TF}...).

Hopefully this makes sense or one of the maintainers can chip in as to why tail folding needs to sit outside of the VPlan.

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


More information about the llvm-commits mailing list