excray
excray

Reputation: 2858

Auto vectorization in llvm

I am trying to create auto-vectorized code with clang-3.2

From the slides here - http://llvm.org/devmtg/2012-04-12/Slides/Hal_Finkel.pdf

I should be able to generate vectorized code with this command line.

bin/clang++ -c -O3 -mllvm -vectorize -bb-vectorize-aligned-only clang-auto-vec.cpp

But it throws an error error: unsupported option '-b b-vectorize-aligned-only'

If i remove just the -bb-vectorize-aligned-only, it doesn't create any vectorized code.

whats going wrong here?

Upvotes: 6

Views: 3780

Answers (1)

Anton Korobeynikov
Anton Korobeynikov

Reputation: 9324

Prepend -mllvm to every flag. E.g. -mllvm -vectorize -mllvm -bb-vectorize-aligned-only

Upvotes: 10

Related Questions