[LLVMdev] Vector code

Nicolas Capens nicolas at capens.net
Thu May 8 10:09:59 PDT 2008


Hi Chris,

Thanks for the advise, but I'm actually not trying to compile code from
text. For now I'm just trying to construct the function directly. Think of
it as the vector equivalent of the HowToUseJIT.cpp example.

Cheers,

-Nicolas


-----Original Message-----
From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Chris Lattner
Sent: Thursday, 08 May, 2008 19:14
To: LLVM Developers Mailing List
Subject: Re: [LLVMdev] Vector code

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/
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list