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

via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 7 05:48:41 PDT 2026


Andarwinux wrote:

> @Andarwinux Thanks for the reduced case. It was TTI under-pricing AVX-512 predicate mask expansion (kshiftr fanout when the data legalizes into more parts than the k-register mask), so MaxBW over-widened to VF64. I've added a targeted TTI charge for it. your loop now vectorizes to VF16 with no kshiftr expansion.

Thanks! But I think this fix should also apply to pre-AVX512: https://godbolt.org/z/7exh5fzG3

In this slightly different case, AVX2 displayed the same symptoms.

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


More information about the llvm-commits mailing list