Depending on the ABI alignment and the actual pointer size, some of the
most and least significant bits are not used for addressing. When used
for accessing memory, those bits have to be 0. Those unused bits can be
used to store additional information (tagged pointers) and this
additional information can be masked out using the pattern above. If
only insignificant bits are masked out, the location the pointer
references is not changed.
Does this make sense? Unfortunately I did not find anything in the
LangRef about what the 'size of a pointer' in the datalayout actually means.
This patch assumes that bits outside the maximum pointer size and ABI
alignment do not change the location the pointer points to.
This interpretation allows for better handling of AA for tagged
pointers. In any case, I intend to clarify the LangRef if it is indeed missing
information about that scenario.