[cfe-dev] Code generated for pointer pair -> pointer + size -> pointer pair conversion

Stephan Tolksdorf st at quanttec.com
Sun Jun 16 05:42:36 PDT 2013


On 16.06.13 13:59, Stephan Tolksdorf wrote:
> Is there any way to tell clang in the vector implementation that the
> array is aligned, so that it could reduce this code to a simple load
> `movq 8(%rdi), %rax`?

Sorry, I should have been more precise here: Is there a way to tell the 
optimizer that it can safely assume that the difference between the 
address values of two given pointers is a multiple of the pointee type 
size? (I had no luck using __builtin_unreachable for this purpose.)

- Stephan






More information about the cfe-dev mailing list