[clang] [clang][CodeGen] Fix metadata when vectorization is disabled by pragma (PR #135163)
Ryotaro Kasuga via cfe-commits
cfe-commits at lists.llvm.org
Wed Apr 23 05:15:59 PDT 2025
kasuga-fj wrote:
> Unfortuantely IIRC there is a semantic difference between pragma and metadata:
>
> - llvm.loop.vectorize.enable==false disables vectorization AND interleaving (by switching off the entire LoopVectorize pass which does both of thise things)
> - llvm.loop.vectorize.width==1 disables vectorization, but still permits interlaving
> - llvm.loop.interleave.count==1 should disable interleaving but still permit vectorization
I see, I got it, thanks.
> I think the correct logic should detect that "llvm.loop.vectorize.width==1" means off, and like that add the unroll to the metadata node itself, instead its followup.
Given the above facts, I also think this approach is reasonable. Thanks, I will try in this way.
https://github.com/llvm/llvm-project/pull/135163
More information about the cfe-commits
mailing list