[llvm-dev] vectorize.enable

Sjoerd Meijer via llvm-dev llvm-dev at lists.llvm.org
Wed Oct 2 03:13:29 PDT 2019

Hi Michael and Florian,
( + llvm-dev for visibility)

I would like to quickly follow up on "Pragma vectorize_width() implies vectorize(enable)",
which got reverted with commit 858a1ae for 2 reasons, see also that revert commit message. Ignore the assert, that's been fixed now.

The other thing is that with the patch behaviour is slightly changed and we could get a diagnostic we didn't get before:

warning: loop not vectorized: the optimizer was unable to
      perform the requested transformation; the transformation might be disabled or
      specified as part of an unsupported transformation ordering

For the example given in revert 858a1ae, in both cases before and after my commit, the loop vectoriser was bailing because "Not vectorizing: The exiting block is not the loop latch". But the difference is that vectorize_width() now implies vectorize(enable), and so this is now marked as forced vectorisation which wasn't the case before. Because of this forced vectorization, and that the transformation wasn't applied, we now emit this diagnostic. The first part of this diagnostic is spot on: "the optimizer was unable to perform the requested transformation". We could argue about the suggestions given as to why the transformations didn't happen in this case, but overall I think this is an improvement.

I just wanted to check if we are happy with this behaviour? Okay to recommit?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191002/4f680ac1/attachment-0001.html>

More information about the llvm-dev mailing list