In http://llvm.org/docs/Vectorizers.html, it says “LLVM’s Loop Vectorizer is now enabled by default for -O3”. But I use the following command: opt -O3 -debug-pass=Arguments test.ll -o /dev/null I can’t see the “loop-vectorize” option in the result. Any advice ?
My opt version is:
Hi xtxwy jim,
In Auto-Vectorization in LLVM — LLVM 18.0.0git documentation, it says "LLVM’s Loop Vectorizer
is now enabled by default for -O3". But I use the following command: opt -O3
-debug-pass=Arguments test.ll -o /dev/null I can't see the "loop-vectorize"
option in the result. Any advice ?
you also have to pass -vectorize-loops. As clang passes this, indeed in clang
it is enabled by default at -O3. In my opinion this option should default to
on.
Ciao, Duncan.
PS: I'm not sure why clang doesn't just set LoopVectorize to true in the
PassManagerBuilder, rather than passing this command line flag.