[llvm] [MemCpyOpt] Drop dead `memmove` calls on `memset`'d source data (PR #101930)

via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 29 08:19:29 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 ef86a31a593a023946a2dc805948360efdad3930 35100f77c3842e43f7c4a99f2a6894e26d69b29d --extensions h,cpp -- llvm/include/llvm/Transforms/Scalar/MemCpyOptimizer.h llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
``````````

</details>

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

``````````diff
diff --git a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
index 4a5a72285c..5d99e9ea65 100644
--- a/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
+++ b/llvm/lib/Transforms/Scalar/MemCpyOptimizer.cpp
@@ -1855,7 +1855,7 @@ bool MemCpyOptPass::isMemMoveMemSetDependency(MemMoveInst *M) {
   auto *MemMoveSourceOp = M->getSource();
   auto *Source = dyn_cast<GEPOperator>(MemMoveSourceOp);
   if (!Source)
-      return false;
+    return false;
 
   APInt Offset(DL.getIndexTypeSizeInBits(Source->getType()), 0);
   LocationSize MemMoveLocSize = SourceLoc.Size;

``````````

</details>


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


More information about the llvm-commits mailing list