llvm-project
8a65ee8b - [AMDGPU] don't mark control-flow intrinsics as convergent (#90026)

Commit
1 year ago
[AMDGPU] don't mark control-flow intrinsics as convergent (#90026) This is really a workaround to allow control flow lowering in the presence of convergence control tokens. Control-flow intrinsics in LLVM IR are convergent because they indirectly represent the wave CFG, i.e., sets of threads that are "converged" or "execute in lock-step". But they exist during a small window in the lowering process, inserted after the structurizer and then translated to equivalent MIR pseudos. So rather than create convergence tokens for these builtins, we simply mark them as not convergent. The corresponding MIR pseudos are marked as having side effects, which is sufficient to prevent optimizations without having to mark them as convergent.
Author
Parents
Loading