On 12/06/2026 15:47, Andrew Stubbs wrote:
On 12/06/2026 15:42, Arsen Arsenović wrote:
Andrew Stubbs <[email protected]> writes:

I did not know about this hook (or is it new?), so I can't comment on that
usage, but the rest of the patch looks good.

I think only LDS has this problem*, and technically you could have
used AS_LDS_P, but that only exists for parity with the more
complicated cases so you're good.

See https://llvm.org/docs/AMDGPUUsage.html#address-spaces for a
reference (I wonder whether we need to/can tell gcc to treat -1 as NULL
in these cases).

Seems to be LDS and scratch.

There will be one thread whose stack starts at address zero, but the compiler can't see that.  Accessing address zero explicitly is not likely to be useful, therefore optimizing accesses based on constant null pointers remains valid and desirable.

Sorry, I should have said, those comments relate to the "scratch" memory space.

Andrew

Reply via email to