[llvm] [ObjCARC] Add more intrinsics that do not touch reference counts (PR #94919)
via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 9 15:22:53 PDT 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-analysis
Author: AtariDreams (AtariDreams)
<details>
<summary>Changes</summary>
memset, memmove, and memcpy have variations that are not covered by the switch case but should be. They do not touch the retain count either.
---
Full diff: https://github.com/llvm/llvm-project/pull/94919.diff
1 Files Affected:
- (modified) llvm/lib/Analysis/ObjCARCInstKind.cpp (+5)
``````````diff
diff --git a/llvm/lib/Analysis/ObjCARCInstKind.cpp b/llvm/lib/Analysis/ObjCARCInstKind.cpp
index d177ee056a93a..370ed88bf57df 100644
--- a/llvm/lib/Analysis/ObjCARCInstKind.cpp
+++ b/llvm/lib/Analysis/ObjCARCInstKind.cpp
@@ -201,8 +201,13 @@ static bool isUseOnlyIntrinsic(unsigned ID) {
// TODO: Expand this into a covered switch. There is a lot more here.
switch (ID) {
case Intrinsic::memcpy:
+ case Intrinsic::memcpy_element_unordered_atomic:
+ case Intrinsic::memcpy_inline:
case Intrinsic::memmove:
+ case Intrinsic::memmove_element_unordered_atomic:
case Intrinsic::memset:
+ case Intrinsic::memset_element_unordered_atomic:
+ case Intrinsic::memset_inline:
return true;
default:
return false;
``````````
</details>
https://github.com/llvm/llvm-project/pull/94919
More information about the llvm-commits
mailing list