66declare void @bar1 (ptr %p )
77declare void @bar2 (ptr %p , ptr %p2 )
88declare void @bar3 (ptr writable %p )
9- declare void @bar4 (ptr byval ([4 x i32 ]) %p )
109define dso_local void @foo1_rdonly (ptr readonly %p ) {
1110; CHECK-LABEL: define {{[^@]+}}@foo1_rdonly
1211; CHECK-SAME: (ptr readonly [[P:%.*]]) {
@@ -187,19 +186,10 @@ define dso_local void @foo2_through_obj(ptr %p, ptr %p2) {
187186 ret void
188187}
189188
190- define dso_local void @foo_byval_readonly (ptr readonly %p ) {
191- ; CHECK-LABEL: define {{[^@]+}}@foo_byval_readonly
192- ; CHECK-SAME: (ptr readonly [[P:%.*]])
193- ; CHECK-NEXT: call void @bar4(ptr byval([4 x i32]) [[P]])
194- ; CHECK-NEXT: ret void
195- call void @bar4 (ptr byval ([4 x i32 ]) %p )
196- ret void
197- }
198-
199189define void @prop_param_func_decl (ptr %p ) {
200190; CHECK-LABEL: define {{[^@]+}}@prop_param_func_decl
201191; CHECK-SAME: (ptr [[P:%.*]]) {
202- ; CHECK-NEXT: call void @bar1(ptr readonly [[P]])
192+ ; CHECK-NEXT: call void @bar1(ptr [[P]])
203193; CHECK-NEXT: ret void
204194;
205195 call void @foo1_rdonly (ptr %p )
@@ -209,7 +199,7 @@ define void @prop_param_func_decl(ptr %p) {
209199define void @prop_param_callbase_def (ptr %p ) {
210200; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def
211201; CHECK-SAME: (ptr [[P:%.*]]) {
212- ; CHECK-NEXT: call void @bar1(ptr readonly [[P]])
202+ ; CHECK-NEXT: call void @bar1(ptr [[P]])
213203; CHECK-NEXT: call void @bar1(ptr [[P]])
214204; CHECK-NEXT: ret void
215205;
@@ -221,7 +211,7 @@ define void @prop_param_callbase_def(ptr %p) {
221211define void @prop_param_callbase_def_2x (ptr %p , ptr %p2 ) {
222212; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x
223213; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
224- ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readonly [[P]])
214+ ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P]])
225215; CHECK-NEXT: ret void
226216;
227217 call void @foo2 (ptr readonly %p , ptr %p )
@@ -233,7 +223,7 @@ define void @prop_param_callbase_def_2x_2(ptr %p, ptr %p2) {
233223; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
234224; CHECK-NEXT: [[PP_I:%.*]] = getelementptr i8, ptr [[P]], i64 9
235225; CHECK-NEXT: [[P2P_I:%.*]] = getelementptr i8, ptr [[P2]], i64 123
236- ; CHECK-NEXT: call void @bar2(ptr writeonly [[P2P_I]], ptr readonly [[PP_I]])
226+ ; CHECK-NEXT: call void @bar2(ptr [[P2P_I]], ptr [[PP_I]])
237227; CHECK-NEXT: ret void
238228;
239229 call void @foo2_through_obj (ptr readonly %p , ptr writeonly %p2 )
@@ -245,7 +235,7 @@ define void @prop_param_callbase_def_2x_incompat(ptr %p, ptr %p2) {
245235; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
246236; CHECK-NEXT: [[PP_I:%.*]] = getelementptr i8, ptr [[P]], i64 9
247237; CHECK-NEXT: [[P2P_I:%.*]] = getelementptr i8, ptr [[P]], i64 123
248- ; CHECK-NEXT: call void @bar2(ptr readonly [[P2P_I]], ptr readnone [[PP_I]])
238+ ; CHECK-NEXT: call void @bar2(ptr [[P2P_I]], ptr [[PP_I]])
249239; CHECK-NEXT: ret void
250240;
251241 call void @foo2_through_obj (ptr readnone %p , ptr readonly %p )
@@ -255,7 +245,7 @@ define void @prop_param_callbase_def_2x_incompat(ptr %p, ptr %p2) {
255245define void @prop_param_callbase_def_2x_incompat_2 (ptr %p , ptr %p2 ) {
256246; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x_incompat_2
257247; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
258- ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readonly [[P]])
248+ ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P]])
259249; CHECK-NEXT: ret void
260250;
261251 call void @foo2 (ptr readonly %p , ptr readnone %p )
@@ -265,7 +255,7 @@ define void @prop_param_callbase_def_2x_incompat_2(ptr %p, ptr %p2) {
265255define void @prop_param_callbase_def_2x_incompat_3 (ptr %p , ptr %p2 ) {
266256; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_2x_incompat_3
267257; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
268- ; CHECK-NEXT: call void @bar2(ptr readnone [[P]], ptr readnone [[P]])
258+ ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P]])
269259; CHECK-NEXT: ret void
270260;
271261 call void @foo2_2 (ptr readonly %p , ptr readnone %p )
@@ -275,7 +265,7 @@ define void @prop_param_callbase_def_2x_incompat_3(ptr %p, ptr %p2) {
275265define void @prop_param_callbase_def_1x_partial (ptr %p , ptr %p2 ) {
276266; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_1x_partial
277267; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
278- ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readonly [[P]])
268+ ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P]])
279269; CHECK-NEXT: ret void
280270;
281271 call void @foo2 (ptr readonly %p , ptr %p )
@@ -295,7 +285,7 @@ define void @prop_param_callbase_def_1x_partial_2(ptr %p, ptr %p2) {
295285define void @prop_param_callbase_def_1x_partial_3 (ptr %p , ptr %p2 ) {
296286; CHECK-LABEL: define {{[^@]+}}@prop_param_callbase_def_1x_partial_3
297287; CHECK-SAME: (ptr [[P:%.*]], ptr [[P2:%.*]]) {
298- ; CHECK-NEXT: call void @bar2(ptr readonly [[P]], ptr readnone [[P]])
288+ ; CHECK-NEXT: call void @bar2(ptr [[P]], ptr [[P]])
299289; CHECK-NEXT: ret void
300290;
301291 call void @foo2_3 (ptr readonly %p , ptr %p )
@@ -531,7 +521,7 @@ define void @prop_cb_def_mustprogress(ptr %p) {
531521define void @prop_no_conflict_writable (ptr %p ) {
532522; CHECK-LABEL: define {{[^@]+}}@prop_no_conflict_writable
533523; CHECK-SAME: (ptr [[P:%.*]]) {
534- ; CHECK-NEXT: call void @bar1(ptr readonly [[P]])
524+ ; CHECK-NEXT: call void @bar1(ptr writable [[P]])
535525; CHECK-NEXT: ret void
536526;
537527 call void @foo1_writable (ptr readonly %p )
@@ -542,18 +532,10 @@ define void @prop_no_conflict_writable(ptr %p) {
542532define void @prop_no_conflict_writable2 (ptr %p ) {
543533; CHECK-LABEL: define {{[^@]+}}@prop_no_conflict_writable2
544534; CHECK-SAME: (ptr [[P:%.*]]) {
545- ; CHECK-NEXT: call void @bar3(ptr readnone [[P]])
535+ ; CHECK-NEXT: call void @bar3(ptr [[P]])
546536; CHECK-NEXT: ret void
547537;
548538 call void @foo3_writable (ptr readnone %p )
549539 ret void
550540}
551541
552- define void @prop_byval_readonly (ptr %p ) {
553- ; CHECK-LABEL: define {{[^@]+}}@prop_byval_readonly
554- ; CHECK-SAME: (ptr [[P:%.*]]) {
555- ; CHECK-NEXT: call void @bar4(ptr byval([4 x i32]) [[P]])
556- ; CHECK-NEXT: ret void
557- call void @foo_byval_readonly (ptr %p )
558- ret void
559- }
0 commit comments