llvm.memcpy for struct copy

Hi all
why does llvm.memcpy only support i8* ? and how does clang transform struct copy?
Thanks !

Regards
Jun

Hi all
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

There’s no need for anything else, you can bitcast any struct pointer to an i8 pointer (which is free/needs no instructions in all the targets I know of).

  • Matthias

tks

Regards
Jun