[llvm] [Inliner] Propagate callee argument memory access attributes before inlining (PR #89024)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu May 2 19:56:12 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
+}
----------------
nikic wrote:
Hm, I don't think this is testing the right thing. Wouldn't we need the writable to be on the bar1 parameter, rather than the parameter of the outer function?
https://github.com/llvm/llvm-project/pull/89024
More information about the llvm-commits
mailing list