Recommit "[Clang] Pragma vectorize_width() implies vectorize(enable)"
authorSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 10 Oct 2019 08:27:14 +0000 (08:27 +0000)
committerSjoerd Meijer <sjoerd.meijer@arm.com>
Thu, 10 Oct 2019 08:27:14 +0000 (08:27 +0000)
commit80371c74ae63d2f260bcc75408be9c6f81e38465
treea7230ba374d8dae39166099fe132bcc1c83e0707
parent109c773ab50c8f4d2ba51d309d5f5bfe82a1e5eb
Recommit "[Clang] Pragma vectorize_width() implies vectorize(enable)"

This was further discussed at the llvm dev list:

http://lists.llvm.org/pipermail/llvm-dev/2019-October/135602.html

I think the brief summary of that is that this change is an improvement,
this is the behaviour that we expect and promise in ours docs, and also
as a result there are cases where we now emit diagnostics whereas before
pragmas were silently ignored. Two areas where we can improve: 1) the
diagnostic message itself, and 2) and in some cases (e.g. -Os and -Oz)
the vectoriser is (quite understandably) not triggering.

Original commit message:

Specifying the vectorization width was supposed to implicitly enable
vectorization, except that it wasn't really doing this. It was only
setting the vectorize.width metadata, but not vectorize.enable.

This should fix PR27643.

llvm-svn: 374288
clang/lib/CodeGen/CGLoopInfo.cpp
clang/test/CodeGenCXX/pragma-loop-predicate.cpp
clang/test/CodeGenCXX/pragma-loop.cpp