[llvm] [WIP][AMDGPU] combine uniform AMDGPU lane Intrinsics (PR #116953)

Sameer Sahasrabuddhe via llvm-commits llvm-commits at lists.llvm.org
Thu Dec 12 07:08:27 PST 2024


ssahasra wrote:

> After hoisting:
> 
> ```
>   y = speculatable_use(x) // convergent
>   if (ballot_all(x)) {
>     use(y)
>   }
> ```
> 
> So x may not be uniform when we call speculatable_use, but we only use y if x was uniform. This seems fine, even if speculatable_use returns poison when its argument is not uniform. (As long as it doesn't trigger undefined behavior...)

So bottom-line is that both `speculatable` and `convergent` are orthogonal to this transformation.

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


More information about the llvm-commits mailing list