Dear all, I am trying to study the Loop Vectorization. Neon supports the vectorization, so I want to get the neon instructions. I tried to use the following command: clang -fomit-frame-pointer -ggdb -emit-llvm hello.c -c -arch arm -o hello.bc opt -mem2reg -loop-rotate -loop-simplify -lcssa -loop-vectorize -force-vector-width=8 hello.bc -o new.bc llc new . bc -march=arm -mattr=+neon -relocation-model=static -o new.s But I didn't get the neon instructions like "vadd, vmul" in the new.s. Is there anything wrong with the command? (clang3.4 on Mac OS X 10.9) Looking forward to your answers. Thank you! Hanbing LI -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140724/913d89d8/attachment.html>
Hi,> clang -fomit-frame-pointer -ggdb -emit-llvm hello.c -c -arch arm -o hello.bc > opt -mem2reg -loop-rotate -loop-simplify -lcssa -loop-vectorize > -force-vector-width=8 hello.bc -o new.bcIt's a bit difficult to tell without the example (it could just be that hello.c isn't vectorisable or needs more opt passes to be vectorised), but the "-arch arm" is almost certainly wrong. That targets a very old processor (ARM7TDMI in fact), which doesn't have any NEON. I use "-arch armv7s" for most of my tests. That targets the Swift CPU, which is a modern v7 core with NEON and all the other nice features. Cheers. Tim.