[llvm] [X86][LoopVectorize] Enable MaximizeBandwidth by default on X86 (PR #201666)

Sumukh J Bharadwaj via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 19 23:49:05 PDT 2026


amd-subharad wrote:

> This is fine from my perspective (cost model only change), as long as the wider X86 community is happy with the performance impact on different uarchs. cc @Andarwinux as well.
> 
> > @fhahn perf data is now in the description. On znver4 (single-copy, ref) MaxBW standalone is net-neutral across the rate suites (CPU2026 +0.8% / CPU2017 −0.1% suite means, per-benchmark movement within noise). The real wins are narrow-integer partial-reduction loops once #205373 lands (e.g. 772.marian_r +10.5%, 706.stockfish_r +2.8% on top of it). Happy to add another uarch if useful.
> 
> Just one thing to note, there may not be a need to enable this unconditionally, if the motivating case is partial reductions; we could just consider maximizing BW for loops that contain such partial reductions

Thank you for your review @fhahn, I will consider switching it on for reduction patterns only, if that seems more productive

> This will also fix #207889, I think it's a win for partial reductions. However, I've also found some cases where MaximizeVectorBandwidth can cause poor codegen: https://godbolt.org/z/s83v66s47

Thanks @Andarwinux I am investigating this test case and will get back to you

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


More information about the llvm-commits mailing list