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

via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 26 12:11:10 PST 2024


================
@@ -1028,7 +1028,14 @@ CanRedirectPredsOfEmptyBBToSucc(BasicBlock *BB, BasicBlock *Succ,
   if (!BB->hasNPredecessorsOrMore(2))
     return false;
 
-  // Get single common predecessors of both BB and Succ
+  if (any_of(BBPreds, [](const BasicBlock *Pred) {
+        return isa<PHINode>(Pred->begin()) &&
----------------
hiraditya wrote:

nvm i found a reduced testcase. Fix in #117778

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


More information about the llvm-commits mailing list