[PATCH] D69628: [Clang] Pragma vectorize_width() implies vectorize(enable), take 3

Sjoerd Meijer via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 30 10:22:22 PDT 2019


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: Meinersbur, fhahn, rupprecht.

This got reverted because given the following source:

  void a() {
    #pragma clang loop vectorize(disable)
    for (;;)
      ;
  }


it incorrectly enabled vectorisation and set metadata due to a logic error. With this fixed, we now imply vectorisation when:

1. vectorisation is enabled, which means: VectorizeWidth > 1
2. and don't want to add it when it is disabled or enabled, otherwise we would be incorrectly setting it or duplicating the metadata, respectively.


https://reviews.llvm.org/D69628

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69628.227137.patch
Type: text/x-patch
Size: 4832 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20191030/2dd091f8/attachment-0001.bin>


More information about the cfe-commits mailing list