[llvm-branch-commits] [llvm] [SimplifyCFG] Do not thread branches into uncontrolled convergent regions (PR #204958)
Nikita Popov via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Wed Jul 15 04:15:20 PDT 2026
================
@@ -3543,6 +3543,39 @@ static ConstantInt *getKnownValueOnEdge(Value *V, BasicBlock *From,
return nullptr;
}
+static bool isUncontrolledConvergentCall(CallBase *CB) {
+ return CB->isConvergent() && !isa<ConvergenceControlInst>(CB) &&
+ !CB->getConvergenceControlToken();
+}
+
+static bool reachesUncontrolledConvergentCallBeforeBlock(BasicBlock *From,
+ BasicBlock *StopBB) {
+ SmallVector<BasicBlock *, 8> Worklist;
----------------
nikic wrote:
TTI hasBranchDivergence?
https://github.com/llvm/llvm-project/pull/204958
More information about the llvm-branch-commits
mailing list