[llvm] Bail out jump threading on indirect branches (PR #103688)

Yingwei Zheng via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 14 00:20:21 PDT 2024


================
@@ -1029,11 +1031,12 @@ CanRedirectPredsOfEmptyBBToSucc(BasicBlock *BB, BasicBlock *Succ,
     return false;
 
   // Get single common predecessors of both BB and Succ
+  // TODO: Replace this with a proper `set intersect` algorithm
   for (BasicBlock *SuccPred : SuccPreds) {
     if (BBPreds.count(SuccPred)) {
+      CommonPred = SuccPred;
----------------
dtcxzyw wrote:

Can you explain this change?

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


More information about the llvm-commits mailing list