[llvm] [UBSan] make ubsantrap IntrInaccessibleMemOnly (PR #156100)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 29 13:30:29 PDT 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Florian Mayer (fmayer)
<details>
<summary>Changes</summary>
This is consistent with the normal trap. This will allow more
optimizations to work on it (e.g. it can be reordered more
freely).
---
Full diff: https://github.com/llvm/llvm-project/pull/156100.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/Intrinsics.td (+2-1)
``````````diff
diff --git a/llvm/include/llvm/IR/Intrinsics.td b/llvm/include/llvm/IR/Intrinsics.td
index e0ee12391b31d..ca8bf6d7b912e 100644
--- a/llvm/include/llvm/IR/Intrinsics.td
+++ b/llvm/include/llvm/IR/Intrinsics.td
@@ -1834,7 +1834,8 @@ def int_trap : Intrinsic<[], [], [IntrNoReturn, IntrCold, IntrInaccessibleMemOnl
def int_debugtrap : Intrinsic<[]>,
ClangBuiltin<"__builtin_debugtrap">;
def int_ubsantrap : Intrinsic<[], [llvm_i8_ty],
- [IntrNoReturn, IntrCold, ImmArg<ArgIndex<0>>]>;
+ [IntrNoReturn, IntrCold, ImmArg<ArgIndex<0>>,
+ IntrInaccessibleMemOnly, IntrWriteMem]>;
// Return true if ubsan check is allowed.
def int_allow_ubsan_check : DefaultAttrsIntrinsic<[llvm_i1_ty], [llvm_i8_ty],
``````````
</details>
https://github.com/llvm/llvm-project/pull/156100
More information about the llvm-commits
mailing list