[PATCH] D66290: [clang] Pragma vectorize_width() implies vectorize(enable)

Sjoerd Meijer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Aug 15 06:12:01 PDT 2019


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: Meinersbur, fhahn, hsaito, dorit.

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`.

     

And related to this, vectorize(disable) was translated to
 `vectorize_width(1)`, but now this simply translates to vectorize.enable = false.

     

As also pointed out in the discussion on the cfe dev list, this is probably a bit 
of a silly combination:

     
  vectorize(enable) vectorize_width(1)
     

but it could still mean that the vectorizer interleaves. So, with this
simplification, disabled means disabled, and a width of 1 a width of 1.

     

This should also fix PR27643.


https://reviews.llvm.org/D66290

Files:
  clang/lib/CodeGen/CGLoopInfo.cpp
  clang/test/CodeGenCXX/pragma-loop-predicate.cpp
  clang/test/CodeGenCXX/pragma-loop-safety.cpp
  clang/test/CodeGenCXX/pragma-loop.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66290.215379.patch
Type: text/x-patch
Size: 6001 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190815/07e611a5/attachment-0001.bin>


More information about the cfe-commits mailing list