[LLVMdev] Using intrinsics with memory operands

Nicolas Capens nicolas at capens.net
Fri Aug 1 03:09:26 PDT 2008


I tried adding the following to IntrinsicsX86.td:

 

  def int_x86_sse41_pmovsxbd_m      :
GCCBuiltin<"__builtin_ia32_pmovsxbd128_m">,

              Intrinsic<[llvm_v4i32_ty, llvm_ptr_ty],

                        [IntrReadMem]>;

 

But while I now have a Intrinsic::x86_sse41_pmovsxbd_m that I can use for
'calling' the intrinsic, I'm getting a "cannot yet select" assert. Any clues
highly appreciated.

 

From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On
Behalf Of Nicolas Capens
Sent: Friday, 01 August, 2008 09:11
To: 'LLVM Developers Mailing List'
Subject: [LLVMdev] Using intrinsics with memory operands

 

Hi all,

 

I was wondering how to use variations of intrinsic functions that take a
memory operand.

 

Take for example the SSE4.1 pmovsxbd instruction. One variant takes two XMM
registers, while another has a 32-bit memory location as source operand. The
latter is quite interesting if you know you're reading from memory anyway,
and if it's not 16-byte aligned. It looks like LLVM's
Intrinsic::x86_sse41_pmovsxbd expects a v16i8 as source operand though. So
how do I achieve using the variant taking a memory operand?

 

Thanks a bunch,

 

Nicolas Capens

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080801/75ae457d/attachment.html>


More information about the llvm-dev mailing list