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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 12 01:53:48 PDT 2025


jayfoad wrote:

> 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.

As far as I can see the only IR it creates is in one call to `BinaryOperator::CreateNot` which happens to be uniform anyway, so I don't think there is a demonstrable bug in the current patch.

> 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 agree that something like that (or Nicolai's split) would make things safer and more maintainable, if the pass starts creating more IR in future.

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


More information about the llvm-commits mailing list