[PATCH] D147245: [AMDGPU] Make amdgcn.s.buffer.load a memory-reading intrinsic
Krzysztof Drewniak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 31 08:27:17 PDT 2023
krzysz00 added a comment.
>From what I can tell, if `!invariant.load` is supported for load-like intrinsics, that's not documented anywhere. It might be neat to make that work, but we can cross that bridge when we get there.
On the other hand, I'm imaging the following sequence of rewrites:
%v = load T, ptr addrspace(7) %const.buffer, !invariant.load
=> (late in the frontend)
%buf, %offset = ...(%const.buffer)
%v = call T @llvm.amdgcn.raw.buffer.load(%buf, i32 %off. [...]) !invariant.load
=> (in IR translation)
INTRINSIC_W_SIDE_EFFECT(@llvm.amdgcn.raw.buffer.load, ...) :: (dereferencable invariant load from BufferAddr(%buf, %off) ....)
=>(because the load was marked invariant, assuming `%off` is uniform)
AMDGCN_S_BUFFER_LOAD %buf, %off, ... :: (...)
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147245/new/
https://reviews.llvm.org/D147245
More information about the llvm-commits
mailing list