[clang] [llvm] [AMDGPU] Apply alignment attr for make.buffer.rsrc (PR #166914)

Krzysztof Drewniak via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 18 07:49:31 PST 2025


krzysz00 wrote:

The pointer operand could be a function argument or a GEP result or ... anything you can do to a pointer, really.

I think the _simplest_ thing to do would be to say that `llvm.amdgpu.make.buffer.rsrc` *preserves* the alignment of its argument.

Therefore, if I have a `align(1)` input to `make.buffer.rsrc`, that should make all loads from/stores to it `align 1` as well (though the attributor could propagate things backwards, which is fine actually).

So I think that adding generic handling for "this returns an existing pointer without capturing" might be the right call

https://github.com/llvm/llvm-project/pull/166914


More information about the llvm-commits mailing list