[llvm] [SelectionDAG] Update MemOp to distinguish memmove from memcpy (PR #206005)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 26 01:17:02 PDT 2026
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 origin/main HEAD --extensions h,cpp -- llvm/include/llvm/CodeGen/TargetLowering.h llvm/lib/CodeGen/GlobalISel/Utils.cpp llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp llvm/lib/Target/ARM/ARMISelLowering.cpp llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp llvm/lib/Target/RISCV/RISCVISelLowering.cpp llvm/lib/Target/X86/X86ISelLoweringCall.cpp --diff_from_common_commit
``````````
:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:
</details>
<details>
<summary>
View the diff from clang-format here.
</summary>
``````````diff
diff --git a/llvm/include/llvm/CodeGen/TargetLowering.h b/llvm/include/llvm/CodeGen/TargetLowering.h
index 587708282..b61e6321a 100644
--- a/llvm/include/llvm/CodeGen/TargetLowering.h
+++ b/llvm/include/llvm/CodeGen/TargetLowering.h
@@ -125,8 +125,8 @@ private:
// not overlap
MemcpyStrSrc, // memcpy source is an in-register constant, so it does not
// need to be loaded
- Memmove, // memmove: like memcpy for source and destination regions may
- // overlap
+ Memmove, // memmove: like memcpy for source and destination regions may
+ // overlap
};
// Shared
@@ -189,12 +189,8 @@ public:
bool isMemcpy() const {
return Kind == MemOpKind::Memcpy || Kind == MemOpKind::MemcpyStrSrc;
}
- bool isMemmove() const {
- return Kind == MemOpKind::Memmove;
- }
- bool isMemcpyOrMemmove() const {
- return isMemcpy() || isMemmove();
- }
+ bool isMemmove() const { return Kind == MemOpKind::Memmove; }
+ bool isMemcpyOrMemmove() const { return isMemcpy() || isMemmove(); }
bool isMemcpyOrMemmoveWithFixedDstAlign() const {
return isMemcpyOrMemmove() && !DstAlignCanChange;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/206005
More information about the llvm-commits
mailing list