[llvm] [SROA] Allow rewriting memcpy depending on tbaa.struct (PR #77597)
via llvm-commits
llvm-commits at lists.llvm.org
Wed Jan 10 04:56:26 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 b8dca4fa729fcbd5d42ce3ca056dc4d278da2548 db74d290b229efb64698996e8647e1cca264d84f -- llvm/lib/Transforms/Scalar/SROA.cpp
``````````
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/lib/Transforms/Scalar/SROA.cpp b/llvm/lib/Transforms/Scalar/SROA.cpp
index 4439765f68..aea2e06af6 100644
--- a/llvm/lib/Transforms/Scalar/SROA.cpp
+++ b/llvm/lib/Transforms/Scalar/SROA.cpp
@@ -3292,9 +3292,10 @@ private:
unsigned Count = 0;
for (size_t i = 0, size = MD->getNumOperands(); i < size; i += 3) {
uint64_t InnerOffset =
- mdconst::extract<ConstantInt>(MD->getOperand(i))->getZExtValue();
+ mdconst::extract<ConstantInt>(MD->getOperand(i))->getZExtValue();
uint64_t InnerSize =
- mdconst::extract<ConstantInt>(MD->getOperand(i + 1))->getZExtValue();
+ mdconst::extract<ConstantInt>(MD->getOperand(i + 1))
+ ->getZExtValue();
// Ignore entries that aren't overlapping with our slice.
if (InnerOffset + InnerSize <= Offset ||
InnerOffset >= Offset + SliceSize)
``````````
</details>
https://github.com/llvm/llvm-project/pull/77597
More information about the llvm-commits
mailing list