[LLVMdev] The creation of Neon Instruction

Tim Northover t.p.northover at gmail.com
Thu Jul 24 06:52:36 PDT 2014


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.bc

It'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.



More information about the llvm-dev mailing list