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

Nadav Rotem nrotem at apple.com
Thu Apr 10 09:06:40 PDT 2014


Looking good!

On Apr 10, 2014, at 8:17 AM, Zinovy Nis <zinovy.nis at gmail.com> wrote:

> 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
> <D3348.1.patch>




More information about the llvm-commits mailing list