[LLVMdev] Vector code

Dan Gohman gohman at apple.com
Thu May 8 10:47:03 PDT 2008


On Thu, May 8, 2008 8:24 am, Nicolas Capens wrote:
> Hi all,
>
>
>
> 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.

What is your target set to? If LLVM thinks it's targeting a processor
that doesn't have SIMD instructions, it'll split vectors into
scalars like this.

Dan





More information about the llvm-dev mailing list