[llvm-branch-commits] [llvm] [SimplifyCFG] Set branch weights when merging conditional store to address (PR #154841)

via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Thu Aug 21 13:58:30 PDT 2025


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff HEAD~1 HEAD --extensions h,cpp -- llvm/include/llvm/IR/ProfDataUtils.h llvm/lib/Transforms/Utils/SimplifyCFG.cpp
``````````

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/IR/ProfDataUtils.h b/llvm/include/llvm/IR/ProfDataUtils.h
index c9284c1bc..c5b792689 100644
--- a/llvm/include/llvm/IR/ProfDataUtils.h
+++ b/llvm/include/llvm/IR/ProfDataUtils.h
@@ -195,7 +195,7 @@ getDisjunctionWeights(const SmallVector<uint32_t, 2> &B1,
                       const SmallVector<uint32_t, 2> &B2) {
   // the probability of the new branch being taken is:
   // P = p(b1) + p(b2) - p (b1 and b2)
-  // not P = p((not b1) and (not b2)) = 
+  // not P = p((not b1) and (not b2)) =
   //       = B1[1] / (B1[0]+B1[1]) * B2[1] / (B2[0]+B2[1]) =
   //       = B1[1] * B2[1] / (B1[0] + B1[1]) * (B2[0] + B2[1])
   // P = 1 - (not P)

``````````

</details>


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


More information about the llvm-branch-commits mailing list