[llvm-dev] No vectorization with -loop-vectorize and -slp-vectorizer

Michael Kruse via llvm-dev llvm-dev at lists.llvm.org
Mon Oct 14 16:58:12 PDT 2019


Likely because the loop-vectorizer requires a canonicalized input
form, specifically LoopRotate. `-O1 -Xclang -disable-llvm-passes` will
disable all passes, including LoopRotate. `-O1 -Xclang
-disable-O0-optnone` does run those passes and since you are using
`-O1`, the switch `-Xclang -disable-O0-optnone` has no effect.

Michael

Am Mo., 14. Okt. 2019 um 04:22 Uhr schrieb hameeza ahmed via llvm-dev
<llvm-dev at lists.llvm.org>:
>
> Hello,
> I am trying to test individual optimizations of opt on unoptimized IR. But, the IR is not getting vectorized by using following commands.
>
> Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang -O1 -Xclang -disable-llvm-passes -emit-llvm -S vecsum.c -o vecsum-noopt.ll
>
> Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/opt  -loop-vectorize -slp-vectorizer -S vecsum-noopt.ll -o vecto.ll
>
> Though IR gets vectorized with O3 flag. Even I tried to replicate O3 behavior via individual flags with opt. But It is not showing same IR.
>
> Where am I doing mistake?
>
> Please help
>
> Thank You
> Regards
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev


More information about the llvm-dev mailing list