[llvm] [Bitcode] Fix nondeterministic phi instruction order (PR #151006)

via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 29 00:59:06 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 cpp -- llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
index bf2905bc5..7279817de 100644
--- a/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
+++ b/llvm/lib/Bitcode/Writer/ValueEnumerator.cpp
@@ -211,7 +211,8 @@ static void predictValueUseListOrderImpl(const Value *V, const Function *F,
 
     // LID and RID are equal, so we have different operands of the same user.
     // Assume operands are added in order for all instructions.
-    // If operand numbers are equal, use pointer addresses for deterministic ordering.
+    // If operand numbers are equal, use pointer addresses for deterministic
+    // ordering.
     if (LU->getOperandNo() == RU->getOperandNo())
       return LU->getUser() < RU->getUser();
 

``````````

</details>


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


More information about the llvm-commits mailing list