[llvm] [AMDGPU] Introduce "amdgpu-uniform-intrinsic-combine" pass to combine uniform AMDGPU lane Intrinsics. (PR #116953)

Pankaj Dwivedi via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 12 03:51:03 PDT 2025


PankajDwivedi-25 wrote:

> > What does make me uneasy about the pass as it is currently written is that it interleaves changes to the IR with queries from UniformityInfo, and so later queries might get stale results. This is more of an engineering issue though and not a fundamental problem.
> 
> To be specific, the problem is when this transform creates new values in the IR. UniformityInfo maintains a set of `Value*`'s that have been conservatively marked as divergent. When any of those values is RAUW'ed with another existing `Value*`, the set is not updated, but it should not cause any instability. It's only if the pass introduces a new `Value` and later queries UniformityInfo about it, that query will incorrectly return "uniform" without any actual analysis. The pass will need to maintain its own set of such newly created `Value`'s and decide their uniformity on its own until the analysis is recomputed.

I see the point. This approach looks much better.

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


More information about the llvm-commits mailing list