[LLVMdev] Vector code
Chris Lattner
sabre at nondot.org
Thu May 8 10:14:16 PDT 2008
On Thu, 8 May 2008, Nicolas Capens wrote:
> I'm trying to use LLVM to generate SIMD code at runtime (in particular Intel
> SSE). But I'm having a bit of trouble understanding how to create even the
> simplest function; adding two vectors of four single-precision
> floating-point elements. I can get it to add the elements one at a time but
> not using one vector instruction.
I'd suggest writing code in C and seeing what llvm-gcc does with it.
You can also look at (for example) llvm/test/CodeGen/X86/*.ll for many
examples.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list