[PATCH] D142924: [llvm][IfConversion] update successor list when merging INLINEASM_BR

Nick Desaulniers via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 16:18:07 PST 2023


nickdesaulniers added inline comments.


================
Comment at: llvm/lib/CodeGen/IfConversion.cpp:2254
+          if (MO.isMBB() && !ToBBI.BB->isSuccessor(MO.getMBB()))
+            ToBBI.BB->addSuccessor(MO.getMBB(), BranchProbability::getZero());
+
----------------
Perhaps it might be best to see if the prior branch had a branch probability, and if so, reuse that?


See calls to `getEdgeProbability` below.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D142924/new/

https://reviews.llvm.org/D142924



More information about the llvm-commits mailing list