[llvm] [LV] Trim VFs that cause vector splitting when tail-folding with EVL (PR #222836)

Elvis Wang via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 11 00:21:42 PDT 2026


ElvisWang123 wrote:


> If we turn max bandwidth on the wider types that need split will still have to have been casted right? So I would have thought #221913 would have still caught it. Maybe I'm missing something though. Do you have an example where #221913 doesn't disable VFs that cause splitting w/ max bandwidth?

IIUC enabling max-bandwidth make LV calculate the `MaxVF` by the smallest type in the loop (w/o max-bandwidth is calculated by WidestType). 

For the mix-width loops without cast instruction will not catch by #221913.
E.g. 
- Disable max-bandwidth: https://godbolt.org/z/GnM4ard1z => largest type: `<vscale x 2 x i64>`
- Enable max-bandwidth: https://godbolt.org/z/65Me31E8d => largest type:  `<vscale x 16 x i64>`

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


More information about the llvm-commits mailing list