[PATCH] [BUG] "Rotate Loop" pass kills "llvm.vectorizer.enable" metadata

Zinovy Nis zinovy.nis at gmail.com
Thu Apr 10 08:17:19 PDT 2014


Hi hfinkel, amusman, ABataev, nadav,

Hi.

I faced that "llvm.vectorizer.enable" metadata used by Loop Vectorizer and set by OpenMP pragmas are killed after the "Rotate Loop" pass. The branch containing the metadata is replaced with another one, but without any metadata. 
So "Loop Vectorizer" won't force vectorization of this loop.

I fixed it by storing the loop metadata in the begining of LoopRotate pass and then restoring it just before return from the pass.
I also added a test for it. It checks that LoopVectorize sees "llvm.vectorizer.enable" metadata.

http://reviews.llvm.org/D3348

Files:
  lib/Transforms/Scalar/LoopRotation.cpp
  lib/Transforms/Vectorize/LoopVectorize.cpp
  test/Transforms/LoopVectorize/vect.omp.persistence.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3348.1.patch
Type: text/x-patch
Size: 3721 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140410/c839a487/attachment.bin>


More information about the llvm-commits mailing list