llvm.memset.p0i8.* intrinsics

Hi,

are the llvm.memset.p0i8.i32 and llvm.memset.p0i8.i64 intrinsics meant
to be used for 32-bit and 64-bit architectures, respectively depending
on the module's target datalayout? Or can I use any of them? If yes,
why are there two functions?
Sorry, if it's obvious, but the documentation wasn't that clear.

Thanks and ciao,
Mario

From: llvmdev-bounces@cs.uiuc.edu [mailto:llvmdev-bounces@cs.uiuc.edu]
On Behalf Of Mario Schwalbe
Subject: [LLVMdev] llvm.memset.p0i8.* intrinsics

are the llvm.memset.p0i8.i32 and llvm.memset.p0i8.i64 intrinsics meant
to be used for 32-bit and 64-bit architectures, respectively

Not necessarily. If you look at the declarations:

  declare void @llvm.memset.p0i8.i32(i8* <dest>, i8 <val>,
                                     i32 <len>, i32 <align>, i1 <isvolatile>)
  declare void @llvm.memset.p0i8.i64(i8* <dest>, i8 <val>,
                                     i64 <len>, i32 <align>, i1 <isvolatile>)

you'll see that the i32 and i64 refer to the type of the length parameter. You should be able to use either.

- Chuck

THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY MATERIAL and is thus for use only by the intended recipient. If you received this in error, please contact the sender and delete the e-mail and its attachments from all computers.