<div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<br><br><div class="gmail_quote"><div dir="ltr">On Tue, Dec 4, 2018 at 5:00 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">If that's the only guarantee (& there's no guarantee on non-zero address space's null pointer representation) is that sufficient to address some cases you're dealing with, or is the address space not known at the point where you're trying to make this decision? (ie: you could only use zero if you know all address spaces have zero null pointers)<br></div></blockquote><div> </div><div>The address space is known at the relevant point, and the "zero valued in address space zero" guarantee is sufficient for the overwhelmingly common case. However I'd prefer completeness, and it seemed to me that there must be some way of determining a null bit-value from an address space number.</div><div><br></div><div>I guess a revised question would be: given that in this AMDGPU test [0] some null pointer constants eventually get lowered to be valued "-1", how would I go about doing the same for the corresponding debug info? Clearly that information is available somewhere, I need guidance however on where to look.</div><div><br></div><div>[0] <a href="https://github.com/llvm-mirror/llvm/blob/5018f6ea8fcd1c655d36a2ae1900e0ccee906b96/test/CodeGen/AMDGPU/nullptr.ll#L100">https://github.com/llvm-mirror/llvm/blob/5018f6ea8fcd1c655d36a2ae1900e0ccee906b96/test/CodeGen/AMDGPU/nullptr.ll#L100</a></div><div><br></div><div>--</div><div>Thanks,</div><div>Jeremy</div><div><br></div></div></div></div></div>