[llvm-branch-commits] [llvm] [SimplifyCFG] Do not thread branches into uncontrolled convergent regions (PR #204958)

Sameer Sahasrabuddhe via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Mon Jul 27 01:08:44 PDT 2026


ssahasra wrote:

> SimplifyCFG's foldCondBranchOnValueKnownInPredecessor can thread an edge past a block that acts as a reconvergence point. If the threaded destination reaches an uncontrolled convergent operation before returning to the threaded-through block, the transform can change which dynamic instance of the convergent operation is executed.

"thread an edge past a block" and "threaded-through block" mean the same thing, right? How does control return to a threaded-through block?

The lit test demonstrate a situation where a reducible cycle gets replaced by an irreducible cycle, which is bad if that cycle contains a convergent operation. But the description seems to imply that the situation does not depend on the presence of cycles. Does that mean that the same fix is required when a structured DAG becomes unstructured?


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


More information about the llvm-branch-commits mailing list