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

Jay Foad via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 19 06:54:16 PDT 2025


jayfoad wrote:

> 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

???

v_prng_b32 is a deterministic instruction. You always get the same result from the same input, just like any normal VALU instruction. Also, even if different instances gave different results, I don't see why that would forbid folding it to undef.

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


More information about the llvm-commits mailing list