[llvm] [EarlyCSE] merge consecutive bitfield accesses in case of pointers (PR #76053)

via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 20 05:33:37 PST 2023


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 d14d52158bc444e2d036067305cf54aeea7c9edb 2f9d5a2e747a8115b7f79b9c53abbe1a9f3c3dc3 -- llvm/lib/Transforms/Scalar/EarlyCSE.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
index 2bf4e7b665..5b42608949 100644
--- a/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
+++ b/llvm/lib/Transforms/Scalar/EarlyCSE.cpp
@@ -1744,7 +1744,6 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
           // fallthrough - we can exploit information about this store
         }
 
-
         // For loading from pointers we use two load instructions, one for
         // loading the address and then another one to load the value from the
         // address.
@@ -1754,7 +1753,8 @@ bool EarlyCSE::processNode(DomTreeNode *Node) {
         //   store x, 0
         // In order to be able to remove redundant load/store of this pattern,
         // before we update the previously stored value load instruction in the
-        // hash table we should update the generation of the pointer load as well.
+        // hash table we should update the generation of the pointer load as
+        // well.
         LoadValue PrevLoad = AvailableLoads.lookup(MemInst.getPointerOperand());
         if (PrevLoad.DefInst != nullptr) {
           LoadInst *PtrLoad = dyn_cast<LoadInst>(MemInst.getPointerOperand());

``````````

</details>


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


More information about the llvm-commits mailing list