Control-divergence finds joins by propagating labels from the divergent control branch. The code that checks the early stop for propagation is not correct in some cases. This PR, also included changes from ssahasra, fixes this issue by stopping no early than the post-dominator of the divergent branch. https://github.com/llvm/llvm-project/issues/137277 --------- Co-authored-by: Sameer Sahasrabuddhe <sameer.sahasrabuddhe@amd.com>