[llvm-dev] new @llvm.memcpy and @llvm.memset API in trunk - how to use alignment?
Andrew Kelley via llvm-dev
llvm-dev at lists.llvm.org
Thu Mar 22 15:15:34 PDT 2018
The new @llvm.memcpy API does not have an alignment parameter. Instead the
docs say to use the align <n> attribute. How is this supposed to work with
different alignments?
For example, I have one memcpy with align 4, align 4, and another with
align 1, align 1.
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64(i8* nocapture writeonly align 4,
i8* nocapture readonly align 4, i64, i1) #3
; Function Attrs: argmemonly nounwind
declare void @llvm.memcpy.p0i8.p0i8.i64.1(i8* nocapture writeonly align 1,
i8* nocapture readonly align 1, i64, i1) #3
When I add these multiple definitions to the module, llvm mangles the name,
adding `.1` to the second one, and I get "Intrinsic name not mangled
correctly for type arguments!"
What's the correct way to do this?
Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180322/7adb77cb/attachment.html>
More information about the llvm-dev
mailing list