[llvm] [AMDGPU] Add intrinsic readanylane (PR #115696)
Sameer Sahasrabuddhe via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 14 23:20:42 PST 2024
ssahasra wrote:
> Would this new attribute be in addition to `convergent`, or instead of it? I still think `readanylane` should be `convergent` because it depends on the set of active threads, so I see this as a special case where we know the rules can be relaxed: in general `readanylane` should not be moved past divergent control flow, but in the specific case of sinking into an `if` it is OK.
There should probably be a family of attributes, where `convergent` is the most conservative. The other attributes will add nuance that relaxes what `convergent` means. For example, the property that we need here is that "this convergent call is valid for the subset of threads that implicitly reach here, but not for a superset". This is more specific than saying things like "may sink" or "may add control dependencies". Alternatively we could even implement this as metadata that goes along with the `convergent` attribute.
https://github.com/llvm/llvm-project/pull/115696
More information about the llvm-commits
mailing list