@@ -416,14 +416,14 @@ define void @test9_traversal(i1 %cnd, ptr align 4 %B, ptr align 8 %C) {
416
416
; FIXME: This will work with an upcoming patch (D66618 or similar)
417
417
; store i32 -1, ptr %g1, align 32
418
418
define ptr @test10a (ptr align 32 %p ) {
419
- ; TUNIT: Function Attrs: nofree nosync nounwind
419
+ ; TUNIT: Function Attrs: nofree nosync nounwind memory(argmem: readwrite)
420
420
; TUNIT-LABEL: define {{[^@]+}}@test10a
421
421
; TUNIT-SAME: (ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3:[0-9]+]] {
422
422
; TUNIT-NEXT: [[L:%.*]] = load i32, ptr [[P]], align 32
423
423
; TUNIT-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
424
424
; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
425
425
; TUNIT: t:
426
- ; TUNIT-NEXT: [[R:%.*]] = call align 32 ptr @test10a(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3 ]]
426
+ ; TUNIT-NEXT: [[R:%.*]] = call align 32 ptr @test10a(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR13:[0-9]+ ]]
427
427
; TUNIT-NEXT: store i32 1, ptr [[R]], align 32
428
428
; TUNIT-NEXT: [[G0:%.*]] = getelementptr i32, ptr [[P]], i32 8
429
429
; TUNIT-NEXT: br label [[E:%.*]]
@@ -435,14 +435,14 @@ define ptr @test10a(ptr align 32 %p) {
435
435
; TUNIT-NEXT: [[PHI:%.*]] = phi ptr [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
436
436
; TUNIT-NEXT: ret ptr [[PHI]]
437
437
;
438
- ; CGSCC: Function Attrs: nofree nosync nounwind
438
+ ; CGSCC: Function Attrs: nofree nosync nounwind memory(argmem: readwrite)
439
439
; CGSCC-LABEL: define {{[^@]+}}@test10a
440
440
; CGSCC-SAME: (ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4:[0-9]+]] {
441
441
; CGSCC-NEXT: [[L:%.*]] = load i32, ptr [[P]], align 32
442
442
; CGSCC-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
443
443
; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
444
444
; CGSCC: t:
445
- ; CGSCC-NEXT: [[R:%.*]] = call align 32 ptr @test10a(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4 ]]
445
+ ; CGSCC-NEXT: [[R:%.*]] = call align 32 ptr @test10a(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR16:[0-9]+ ]]
446
446
; CGSCC-NEXT: store i32 1, ptr [[R]], align 32
447
447
; CGSCC-NEXT: [[G0:%.*]] = getelementptr i32, ptr [[P]], i32 8
448
448
; CGSCC-NEXT: br label [[E:%.*]]
478
478
; FIXME: This will work with an upcoming patch (D66618 or similar)
479
479
; store i32 -1, ptr %g1, align 32
480
480
define ptr @test10b (ptr align 32 %p ) {
481
- ; TUNIT: Function Attrs: nofree nosync nounwind
481
+ ; TUNIT: Function Attrs: nofree nosync nounwind memory(argmem: readwrite)
482
482
; TUNIT-LABEL: define {{[^@]+}}@test10b
483
483
; TUNIT-SAME: (ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR3]] {
484
484
; TUNIT-NEXT: [[L:%.*]] = load i32, ptr [[P]], align 32
485
485
; TUNIT-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
486
486
; TUNIT-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
487
487
; TUNIT: t:
488
- ; TUNIT-NEXT: [[R:%.*]] = call align 32 ptr @test10b(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR3 ]]
488
+ ; TUNIT-NEXT: [[R:%.*]] = call align 32 ptr @test10b(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR13 ]]
489
489
; TUNIT-NEXT: store i32 1, ptr [[R]], align 32
490
490
; TUNIT-NEXT: [[G0:%.*]] = getelementptr i32, ptr [[P]], i32 8
491
491
; TUNIT-NEXT: br label [[E:%.*]]
@@ -497,14 +497,14 @@ define ptr @test10b(ptr align 32 %p) {
497
497
; TUNIT-NEXT: [[PHI:%.*]] = phi ptr [ [[G0]], [[T]] ], [ [[G1]], [[F]] ]
498
498
; TUNIT-NEXT: ret ptr [[PHI]]
499
499
;
500
- ; CGSCC: Function Attrs: nofree nosync nounwind
500
+ ; CGSCC: Function Attrs: nofree nosync nounwind memory(argmem: readwrite)
501
501
; CGSCC-LABEL: define {{[^@]+}}@test10b
502
502
; CGSCC-SAME: (ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P:%.*]]) #[[ATTR4]] {
503
503
; CGSCC-NEXT: [[L:%.*]] = load i32, ptr [[P]], align 32
504
504
; CGSCC-NEXT: [[C:%.*]] = icmp eq i32 [[L]], 0
505
505
; CGSCC-NEXT: br i1 [[C]], label [[T:%.*]], label [[F:%.*]]
506
506
; CGSCC: t:
507
- ; CGSCC-NEXT: [[R:%.*]] = call align 32 ptr @test10b(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR4 ]]
507
+ ; CGSCC-NEXT: [[R:%.*]] = call align 32 ptr @test10b(ptr nofree noundef nonnull align 32 dereferenceable(4) "no-capture-maybe-returned" [[P]]) #[[ATTR16 ]]
508
508
; CGSCC-NEXT: store i32 1, ptr [[R]], align 32
509
509
; CGSCC-NEXT: [[G0:%.*]] = getelementptr i32, ptr [[P]], i32 8
510
510
; CGSCC-NEXT: br label [[E:%.*]]
@@ -946,7 +946,7 @@ define i32 @musttail_caller_1(ptr %p) {
946
946
; TUNIT-NEXT: [[C:%.*]] = load i1, ptr @cnd, align 1
947
947
; TUNIT-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
948
948
; TUNIT: mt:
949
- ; TUNIT-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(ptr nocapture nofree noundef readonly [[P]]) #[[ATTR13 :[0-9]+]]
949
+ ; TUNIT-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(ptr nocapture nofree noundef readonly [[P]]) #[[ATTR14 :[0-9]+]]
950
950
; TUNIT-NEXT: ret i32 [[V]]
951
951
; TUNIT: exit:
952
952
; TUNIT-NEXT: ret i32 0
@@ -957,7 +957,7 @@ define i32 @musttail_caller_1(ptr %p) {
957
957
; CGSCC-NEXT: [[C:%.*]] = load i1, ptr @cnd, align 1
958
958
; CGSCC-NEXT: br i1 [[C]], label [[MT:%.*]], label [[EXIT:%.*]]
959
959
; CGSCC: mt:
960
- ; CGSCC-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(ptr nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR16 :[0-9]+]]
960
+ ; CGSCC-NEXT: [[V:%.*]] = musttail call i32 @musttail_callee_1(ptr nocapture nofree noundef nonnull readonly dereferenceable(4) [[P]]) #[[ATTR17 :[0-9]+]]
961
961
; CGSCC-NEXT: ret i32 [[V]]
962
962
; CGSCC: exit:
963
963
; CGSCC-NEXT: ret i32 0
@@ -1089,7 +1089,7 @@ define ptr @aligned_8_return_caller(ptr align(16) %a, i1 %c1, i1 %c2) {
1089
1089
; TUNIT: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(none)
1090
1090
; TUNIT-LABEL: define {{[^@]+}}@aligned_8_return_caller
1091
1091
; TUNIT-SAME: (ptr nofree readnone align 16 "no-capture-maybe-returned" [[A:%.*]], i1 [[C1:%.*]], i1 [[C2:%.*]]) #[[ATTR10]] {
1092
- ; TUNIT-NEXT: [[R:%.*]] = call align 8 ptr @aligned_8_return(ptr noalias nofree readnone align 16 "no-capture-maybe-returned" [[A]], i1 noundef [[C1]], i1 [[C2]]) #[[ATTR14 :[0-9]+]]
1092
+ ; TUNIT-NEXT: [[R:%.*]] = call align 8 ptr @aligned_8_return(ptr noalias nofree readnone align 16 "no-capture-maybe-returned" [[A]], i1 noundef [[C1]], i1 [[C2]]) #[[ATTR15 :[0-9]+]]
1093
1093
; TUNIT-NEXT: ret ptr [[R]]
1094
1094
;
1095
1095
; CGSCC: Function Attrs: mustprogress nofree nosync nounwind willreturn memory(none)
@@ -1221,7 +1221,7 @@ attributes #2 = { null_pointer_is_valid }
1221
1221
; TUNIT: attributes #[[ATTR0]] = { mustprogress nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable }
1222
1222
; TUNIT: attributes #[[ATTR1]] = { mustprogress nofree noinline nosync nounwind willreturn memory(none) uwtable }
1223
1223
; TUNIT: attributes #[[ATTR2]] = { nounwind }
1224
- ; TUNIT: attributes #[[ATTR3]] = { nofree nosync nounwind }
1224
+ ; TUNIT: attributes #[[ATTR3]] = { nofree nosync nounwind memory(argmem: readwrite) }
1225
1225
; TUNIT: attributes #[[ATTR4]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) }
1226
1226
; TUNIT: attributes #[[ATTR5]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) }
1227
1227
; TUNIT: attributes #[[ATTR6]] = { nounwind willreturn }
@@ -1231,14 +1231,15 @@ attributes #2 = { null_pointer_is_valid }
1231
1231
; TUNIT: attributes #[[ATTR10]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(none) }
1232
1232
; TUNIT: attributes #[[ATTR11]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(read) }
1233
1233
; TUNIT: attributes #[[ATTR12]] = { mustprogress nofree norecurse nounwind willreturn memory(argmem: readwrite) }
1234
- ; TUNIT: attributes #[[ATTR13]] = { nofree nosync nounwind willreturn memory(read) }
1235
- ; TUNIT: attributes #[[ATTR14]] = { nofree nosync nounwind willreturn }
1234
+ ; TUNIT: attributes #[[ATTR13]] = { nofree nosync nounwind }
1235
+ ; TUNIT: attributes #[[ATTR14]] = { nofree nosync nounwind willreturn memory(read) }
1236
+ ; TUNIT: attributes #[[ATTR15]] = { nofree nosync nounwind willreturn }
1236
1237
;.
1237
1238
; CGSCC: attributes #[[ATTR0]] = { mustprogress nofree noinline norecurse nosync nounwind willreturn memory(none) uwtable }
1238
1239
; CGSCC: attributes #[[ATTR1]] = { mustprogress nofree noinline nosync nounwind willreturn memory(none) uwtable }
1239
1240
; CGSCC: attributes #[[ATTR2]] = { noinline nounwind uwtable }
1240
1241
; CGSCC: attributes #[[ATTR3]] = { nounwind }
1241
- ; CGSCC: attributes #[[ATTR4]] = { nofree nosync nounwind }
1242
+ ; CGSCC: attributes #[[ATTR4]] = { nofree nosync nounwind memory(argmem: readwrite) }
1242
1243
; CGSCC: attributes #[[ATTR5]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: read) }
1243
1244
; CGSCC: attributes #[[ATTR6]] = { mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write) }
1244
1245
; CGSCC: attributes #[[ATTR7]] = { nounwind willreturn }
@@ -1250,5 +1251,6 @@ attributes #2 = { null_pointer_is_valid }
1250
1251
; CGSCC: attributes #[[ATTR13]] = { mustprogress nofree nosync nounwind willreturn memory(none) }
1251
1252
; CGSCC: attributes #[[ATTR14]] = { mustprogress nofree norecurse nounwind willreturn memory(argmem: readwrite) }
1252
1253
; CGSCC: attributes #[[ATTR15]] = { nofree nosync willreturn }
1253
- ; CGSCC: attributes #[[ATTR16]] = { nofree willreturn memory(read) }
1254
+ ; CGSCC: attributes #[[ATTR16]] = { nofree nosync nounwind }
1255
+ ; CGSCC: attributes #[[ATTR17]] = { nofree willreturn memory(read) }
1254
1256
;.
0 commit comments