[llvm-dev] loop vectorizer disabling
Sjoerd Meijer via llvm-dev
llvm-dev at lists.llvm.org
Tue Sep 10 03:43:46 PDT 2019
I would like to propose that loop pragma `vectorize(disable)` actually means disabling the vectorizer for that loop. This perhaps sounds really obvious (I hope it does), but currently `vectorize(disable)` sets the vectorization width to 1, and that means the vectorizer will run and could perform other tricks such as interleaving. The main reason to change the behaviour is that it will be more what (most) users would expect.
I think we reached consensus on changing the behaviour in , but since this is changing the behaviour of a user-facing pragma, we would like to know if there are any objections. If people rely on the current behaviour that `vectorize(disable)` will do some other transformations performed by the vectorizer, which I hope is an edge case, I think this is a trivial rewrite, but still a change. So, again, without objections we would like to go ahead with this.
For a little bit more context, this is a follow-up of a discussion on loop pragmas we had not so long ago. We added a new pragma , and enabling this new transformation option implies setting the transformation . This is something that our docs promise for other transformation options too, except that this wasn't happening and so we started fixing that. In  for example, we implement that `vectorize_width()` implies `vectorize(enable)`. Related to this, we started discussing in  what `vectorize(disable)` should mean easier of , because it makes implementation easier but more importantly because that would probably match user expectations better.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-dev