[llvm] [InferAddrSpaces] Correctly replace identical operands of insts (PR #82610)

via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 22 04:10:08 PST 2024


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 bcbffd99c48ed0cabd1b94e9ff252680f0968fc3 f7734c7f50b365299ebf07b866eb97ad9ee8ee5f -- llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp b/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
index 63e8c1bfaf..851eab04c8 100644
--- a/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
+++ b/llvm/lib/Transforms/Scalar/InferAddressSpaces.cpp
@@ -1315,8 +1315,9 @@ bool InferAddressSpacesImpl::rewriteWithNewAddressSpaces(
           CurUser->replaceUsesOfWith(
               V, new AddrSpaceCastInst(NewV, V->getType(), "", &*InsertPos));
         } else {
-          CurUser->replaceUsesOfWith(V, ConstantExpr::getAddrSpaceCast(cast<Constant>(NewV),
-                                               V->getType()));
+          CurUser->replaceUsesOfWith(
+              V, ConstantExpr::getAddrSpaceCast(cast<Constant>(NewV),
+                                                V->getType()));
         }
       }
     }

``````````

</details>


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


More information about the llvm-commits mailing list