[llvm] [AMDGPU] Combine prng(undef) -> undef (PR #154160)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 06:11:56 PDT 2025


arsenm wrote:

> > I'm not sure this is safe
> 
> I believe it is safe because this instruction does a 1-to-1 mapping from the 2^32 possible input values to the 2^32 possible result value.

But you may get a different result on a different instance of it. e.g. you'll observe different behavior if this is in a loop across iterations 

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


More information about the llvm-commits mailing list