[llvm] [Inliner] Propagate callee argument memory access attributes before inlining (PR #89024)
via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 20:59:18 PDT 2024
================
@@ -496,3 +495,13 @@ define void @prop_cb_def_mustprogress(ptr %p) {
call void @foo1(ptr %p) mustprogress
ret void
}
+
+define void @prop_no_conflict_writable(ptr writable %p) {
+; CHECK-LABEL: define {{[^@]+}}@prop_no_conflict_writable
+; CHECK-SAME: (ptr writable [[P:%.*]]) {
+; CHECK-NEXT: call void @bar1(ptr readonly [[P]])
+; CHECK-NEXT: ret void
+;
+ call void @foo1_rdonly(ptr readonly %p)
+ ret void
+}
----------------
goldsteinn wrote:
Yeah, you're right. Fixed. Should be propagating `readonly`/`readnone` now to a `bar` w/ `writable`.
https://github.com/llvm/llvm-project/pull/89024
More information about the llvm-commits
mailing list