@@ -555,10 +555,12 @@ cont2:
555555; *ptr = 4;
556556; }
557557; }
558+ ;
559+ ; FIXME: %ptr should be dereferenceable(4)
558560define dso_local void @rec-branch-1 (i32 %a , i32 %b , i32 %c , ptr %ptr ) {
559561; CHECK: Function Attrs: mustprogress nofree norecurse nosync nounwind willreturn memory(argmem: write)
560562; CHECK-LABEL: define {{[^@]+}}@rec-branch-1
561- ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], ptr nofree nonnull writeonly align 4 captures(none) dereferenceable(4 ) [[PTR:%.*]]) #[[ATTR3]] {
563+ ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], ptr nofree writeonly captures(none) [[PTR:%.*]]) #[[ATTR3]] {
562564; CHECK-NEXT: entry:
563565; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0
564566; CHECK-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]]
@@ -628,10 +630,11 @@ if.end8: ; preds = %if.then5, %if.else6
628630; rec-branch-2(1, 1, 1, ptr);
629631; }
630632; }
633+ ; FIXME: %ptr should be dereferenceable(4)
631634define dso_local void @rec-branch-2 (i32 %a , i32 %b , i32 %c , ptr %ptr ) {
632635; CHECK: Function Attrs: nofree nosync nounwind memory(argmem: write)
633636; CHECK-LABEL: define {{[^@]+}}@rec-branch-2
634- ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], ptr nofree nonnull writeonly align 4 captures(none) dereferenceable(4 ) [[PTR:%.*]]) #[[ATTR5:[0-9]+]] {
637+ ; CHECK-SAME: (i32 [[A:%.*]], i32 [[B:%.*]], i32 [[C:%.*]], ptr nofree writeonly captures(none) [[PTR:%.*]]) #[[ATTR5:[0-9]+]] {
635638; CHECK-NEXT: entry:
636639; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i32 [[A]], 0
637640; CHECK-NEXT: br i1 [[TOBOOL]], label [[IF_ELSE3:%.*]], label [[IF_THEN:%.*]]
@@ -651,7 +654,7 @@ define dso_local void @rec-branch-2(i32 %a, i32 %b, i32 %c, ptr %ptr) {
651654; CHECK-NEXT: store i32 3, ptr [[PTR]], align 4
652655; CHECK-NEXT: br label [[IF_END8]]
653656; CHECK: if.else6:
654- ; CHECK-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, ptr nofree nonnull writeonly align 4 captures(none) dereferenceable(4 ) [[PTR]]) #[[ATTR8:[0-9]+]]
657+ ; CHECK-NEXT: tail call void @rec-branch-2(i32 noundef 1, i32 noundef 1, i32 noundef 1, ptr nofree writeonly captures(none) [[PTR]]) #[[ATTR8:[0-9]+]]
655658; CHECK-NEXT: br label [[IF_END8]]
656659; CHECK: if.end8:
657660; CHECK-NEXT: ret void
0 commit comments