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

Shilei Tian via All-commits all-commits at lists.llvm.org
Fri Jul 10 13:41:41 PDT 2026


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

  Changed paths:
    M llvm/lib/Transforms/Utils/SimplifyCFG.cpp
    M llvm/test/Transforms/SimplifyCFG/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