Auto-vectorization in llvm

I am trying to create auto-vector 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 using this command line.

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

But this causes an error: unsupported option '-b b-vectorize-aligned-only'

If I remove only -bb-vectorize-aligned-only , it does not generate any vectorized code.

What's going on here?

+6
source share
1 answer

Prepare -mllvm for each flag. For instance. -mllvm -vectorize -mllvm -bb-vectorize-aligned-only

+10
source

Source: https://habr.com/ru/post/918608/


All Articles