[llvm-dev] llvm.memcpy for struct copy
Craig Topper via llvm-dev
llvm-dev at lists.llvm.org
Mon Jan 29 23:24:05 PST 2018
The i8 type in the pointers doesn't matter a whole lot. There's a long term
plan to remove the type from all pointers in llvm IR.
Yes, clang will use memcpy for struct copies. You can see example IR here
https://godbolt.org/g/8gQ18m. You'll see that the struct pointers are
bitcasted to i8* before the call.
~Craig
On Mon, Jan 29, 2018 at 11:12 PM, ma jun via llvm-dev <
llvm-dev at lists.llvm.org> wrote:
>
> Hi all
> I'm new here, and I have some question about llvm.memcpy intrinsic.
> why does llvm.memcpy intrinsic only support i8* for first two
> arguments? and does clang will also transform struct copy into llvm.memcpy
> ? what format does IR looks like?
> Thanks !
>
> Regards
> Jun
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180129/c71b5f60/attachment.html>
More information about the llvm-dev
mailing list