@llvm.memset.* documentation

Hi everyone,
I was looking at the @llvm.memset.* documentation and something seemed a bit off. The <len> argument type seems wrong. It's the same as the <val> type, but it would seem to me that only being able to memset 255 bytes in an i8 array is a bit limiting. :)

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

It takes i32 for <len> just fine btw.

Cheers,

Jean-Paul Kogelman

Hi everyone,
I was looking at the @llvm.memset.* documentation and something seemed a bit off. The <len> argument type seems wrong. It's the same as the <val> type, but it would seem to me that only being able to memset 255 bytes in an i8 array is a bit limiting. :)

It is right, the size isn’t tied to the value. The value is always i8, the size can be any integer type:
http://llvm.org/docs/LangRef.html#int_memset

-Chris