hameeza ahmed via llvm-dev
2019-Oct-14 09:47 UTC
[llvm-dev] No vectorization with -loop-vectorize and -slp-vectorizer
Thank You. I used following commands Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang -O1 -Xclang -disable-O0-optnone -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 It vectorized the code. On Mon, Oct 14, 2019 at 2:33 PM HAPPY Mahto <cs17btech11018 at iith.ac.in> wrote:> > > On Mon, Oct 14, 2019 at 2:52 PM hameeza ahmed via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> 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 >> >> > Try this: > Documents/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang -O1 > -Xclang -disable-00-optnone -disable-llvm-passes -emit-llvm -S vecsum.c -o > vecsum-noopt.ll > Same for other commands too. > You need to add '-disable-00-optnone' flag, or you can remove the optnone > attribute from attributes #0 = { noinline , nounwind, optnone ... } > I hope this helps. > > -Happy > > 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 >> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191014/ca539bbe/attachment.html>