[LLVMdev] vector compare

Eli Friedman eli.friedman at gmail.com
Thu Dec 25 02:02:19 PST 2008


On Thu, Dec 25, 2008 at 1:54 AM, Eli Friedman <eli.friedman at gmail.com> wrote:
> On Thu, Dec 25, 2008 at 1:28 AM, Claudio Basile <cbasile at tempo-da.com> wrote:
>> Hi all,
>>
>> is there any way to compare two 128bit values?
>> I have tried 3 different approaches and they all fail with an internal
>> assertion.
>> I'm running llvm 2.4 on x86 with the following command line:
>>
>>  > llvm-as test.ll -o test.bc
>>  > llc test.bc -filetype=asm
>>
>> I would expect the code generator to emit a sequence of SSE
>> instructions.
>
> Approaches 1 and 2 depend on some stuff that hasn't really stabilized
> yet... you should get much better results with vicmp.

Oh wait, I just realized vicmp is a post-2.4 thing... if you really
want to generate an SSE comparison using LLVM 2.4, you can use the x86
intrinsics, like @llvm.x86.sse2.pcmpeq.b.

-Eli



More information about the llvm-dev mailing list