Ryan Taylor
2012-Jun-28 22:04 UTC
[LLVMdev] Why does llvm bitcast a struct pointer to an integer pointer?
I have some C code that does a memcpy (though it doesn't use the memcpy instrinsic at all) on structure like: x = y; Where x and y are of the same structure type. My question is in the LLVM code, it firsts get the address from the GEP using the struct type but then before the load and store, it bitcasts this to i64 for some reason? Why does this occur in the IR? Doesn't seem like the IR would care either way. Just to clarify any confusion, I'm not talking about the pointer width, I'm talking about the type that the pointer is pointing to. Thanks. Also, is there anyway to make LLVM do an element by element copy in this case? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120628/37714c9e/attachment.html>
Possibly Parallel Threads
- [LLVMdev] Why does llvm bitcast a struct pointer to an integer pointer?
- [LLVMdev] About user of bitcast/GEP instruction
- [LLVMdev] About user of bitcast/GEP instruction
- [LLVMdev] About user of bitcast/GEP instruction
- [LLVMdev] [LLVMDev] About user of bitcast/GEP instruction