[llvm] [AMDGPU] Add intrinsic readanylane (PR #115696)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 28 20:38:12 PST 2024


ssahasra wrote:

> It is better to describe it as "readanylane(x) is x if x is uniform, otherwise readanylane(x) is undefined".

Compared to that, `@llvm.assume(@llvm.is.uniform())` actively tells the compiler that the user _knows_ that this use of the value is uniform. But then, if the user is wrong, then the result is undefined anyway. In what way is one better than the other?

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


More information about the llvm-commits mailing list