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

Xin Russell Liu via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 14 02:41:36 PST 2024


GinShio wrote:

> The problem is when `x` is uniform inside the `if` but divergent outside the `if`. Then `z` is defined but `y` is undefined, so it is not OK to replace a use of `z` with a use of `y`.

Sorry, confused again.

`y = readanylane(x)` that means x is uniform outside of if, and `z = readanylane(x)` that means x is uniform inside of if.
Looks like okay, OTOW, x is always uniform in this case, either inside or outside of the if. Right?

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


More information about the llvm-commits mailing list