[all-commits] [llvm/llvm-project] a9a5ab: [SimplifyCFG] Do not thread branches into uncontro...

Shilei Tian via All-commits all-commits at lists.llvm.org
Mon Jul 27 15:44:51 PDT 2026


  Branch: refs/heads/users/shiltian/fix-simplify-cfg-convergent-issue
  Home:   https://github.com/llvm/llvm-project
  Commit: a9a5ab362c8beabefb6668101f9477a341d7f96e
      https://github.com/llvm/llvm-project/commit/a9a5ab362c8beabefb6668101f9477a341d7f96e
  Author: Shilei Tian <i at tianshilei.me>
  Date:   2026-07-27 (Mon, 27 Jul 2026)

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/AMDGPU/convergent-jump-threading.ll

  Log Message:
  -----------
  [SimplifyCFG] Do not thread branches into uncontrolled convergent regions

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.

Add a conservative destination scan for this fold and skip the threading
candidate when it can reach an uncontrolled convergent call before returning
to the original block. Controlled convergent operations using convergence
control tokens are left alone.

Fixes ROCM-26496.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list