[llvm] [SimplifyCFG] Fix `SimplifyCFG` pass to skip folding when both blocks contain convergence intrinsics. (PR #166452)
Steven Perron via llvm-commits
llvm-commits at lists.llvm.org
Wed Nov 5 12:47:46 PST 2025
s-perron wrote:
> It seems like the best outcome would be that we relax the LangRef rules so fewer passes are required to scan for this non-local information.
@ssahasra Do you know which backends use the convergence tokens? Do you have any thoughts on modifying the spec?
I think the SPIR-V backend could handle having two tokens defined in the same BB as long as the second is a loop that uses the first. We just have to do a type of copy propagation on it.
However, I'm not convinced many transforms will benefit from the rule change. We still need any transform that replicates code to be skipped if it replicates the token. How many transformations merge two block without replicating code? We will still need to add a legality check to other passes.
https://github.com/llvm/llvm-project/pull/166452
More information about the llvm-commits
mailing list