https://github.com/Meinersbur commented:

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

This is why `vectorize(disable)` should only set ` 
llvm.loop.vectorize.width==1`, interleaving is still permitted (like unrolling 
still is). Only `vectorize(disable) interlave(disable)` could theoretically set 
the `llvm.loop.vectorize.enable==false` metadata.

You could theoretically add a separate `llvm.loop.interlave.enable` and 
followup-metadata with the corresponding compatibility problem (which is why I 
didn't do this).

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.

https://github.com/llvm/llvm-project/pull/135163
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to