@@ -11,7 +11,7 @@ pub struct UnsafeInner {
1111 _field : std:: cell:: UnsafeCell < i16 > ,
1212}
1313
14- // CHECK: zeroext i1 @boolean(i1 zeroext %x)
14+ // CHECK: noundef zeroext i1 @boolean(i1 noundef zeroext %x)
1515#[ no_mangle]
1616pub fn boolean ( x : bool ) -> bool {
1717 x
@@ -64,9 +64,14 @@ pub fn indirect_struct(_: S) {
6464pub fn borrowed_struct ( _: & S ) {
6565}
6666
67+ // CHECK: @raw_struct(%S* %_1)
68+ #[ no_mangle]
69+ pub fn raw_struct ( _: * const S ) {
70+ }
71+
6772// `Box` can get deallocated during execution of the function, so it should
6873// not get `dereferenceable`.
69- // CHECK: noalias nonnull align 4 i32* @_box(i32* noalias nonnull align 4 %x)
74+ // CHECK: noalias noundef nonnull align 4 i32* @_box(i32* noalias noundef nonnull align 4 %x)
7075#[ no_mangle]
7176pub fn _box ( x : Box < i32 > ) -> Box < i32 > {
7277 x
@@ -86,48 +91,58 @@ pub fn struct_return() -> S {
8691pub fn helper ( _: usize ) {
8792}
8893
89- // CHECK: @slice([0 x i8]* noalias nonnull readonly align 1 %_1.0, [[USIZE]] %_1.1)
94+ // CHECK: @slice([0 x i8]* noalias noundef nonnull readonly align 1 %_1.0, [[USIZE]] %_1.1)
9095// FIXME #25759 This should also have `nocapture`
9196#[ no_mangle]
9297pub fn slice ( _: & [ u8 ] ) {
9398}
9499
95- // CHECK: @mutable_slice([0 x i8]* noalias nonnull align 1 %_1.0, [[USIZE]] %_1.1)
100+ // CHECK: @mutable_slice([0 x i8]* noalias noundef nonnull align 1 %_1.0, [[USIZE]] %_1.1)
96101// FIXME #25759 This should also have `nocapture`
97102#[ no_mangle]
98103pub fn mutable_slice ( _: & mut [ u8 ] ) {
99104}
100105
101- // CHECK: @unsafe_slice([0 x i16]* nonnull align 2 %_1.0, [[USIZE]] %_1.1)
106+ // CHECK: @unsafe_slice([0 x i16]* noundef nonnull align 2 %_1.0, [[USIZE]] %_1.1)
102107// unsafe interior means this isn't actually readonly and there may be aliases ...
103108#[ no_mangle]
104109pub fn unsafe_slice ( _: & [ UnsafeInner ] ) {
105110}
106111
107- // CHECK: @str([0 x i8]* noalias nonnull readonly align 1 %_1.0, [[USIZE]] %_1.1)
112+ // CHECK: @raw_slice([0 x i8]* %_1.0, [[USIZE]] %_1.1)
113+ #[ no_mangle]
114+ pub fn raw_slice ( _: * const [ u8 ] ) {
115+ }
116+
117+ // CHECK: @str([0 x i8]* noalias noundef nonnull readonly align 1 %_1.0, [[USIZE]] %_1.1)
108118// FIXME #25759 This should also have `nocapture`
109119#[ no_mangle]
110120pub fn str ( _: & [ u8 ] ) {
111121}
112122
113- // CHECK: @trait_borrow({}* nonnull align 1 %_1.0, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}) %_1.1)
123+ // CHECK: @trait_borrow({}* noundef nonnull align 1 %_1.0, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}) %_1.1)
114124// FIXME #25759 This should also have `nocapture`
115125#[ no_mangle]
116126pub fn trait_borrow ( _: & Drop ) {
117127}
118128
119- // CHECK: @trait_box({}* noalias nonnull align 1{{( %0)?}}, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}){{( %1)?}})
129+ // CHECK: @trait_raw({}* %_1.0, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}) %_1.1)
130+ #[ no_mangle]
131+ pub fn trait_raw ( _: * const Drop ) {
132+ }
133+
134+ // CHECK: @trait_box({}* noalias noundef nonnull align 1{{( %0)?}}, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}){{( %1)?}})
120135#[ no_mangle]
121136pub fn trait_box ( _: Box < Drop > ) {
122137}
123138
124- // CHECK: { i8*, i8* } @trait_option(i8* noalias align 1 %x.0, i8* %x.1)
139+ // CHECK: { i8*, i8* } @trait_option(i8* noalias noundef align 1 %x.0, i8* %x.1)
125140#[ no_mangle]
126141pub fn trait_option ( x : Option < Box < Drop > > ) -> Option < Box < Drop > > {
127142 x
128143}
129144
130- // CHECK: { [0 x i16]*, [[USIZE]] } @return_slice([0 x i16]* noalias nonnull readonly align 2 %x.0, [[USIZE]] %x.1)
145+ // CHECK: { [0 x i16]*, [[USIZE]] } @return_slice([0 x i16]* noalias noundef nonnull readonly align 2 %x.0, [[USIZE]] %x.1)
131146#[ no_mangle]
132147pub fn return_slice ( x : & [ u16 ] ) -> & [ u16 ] {
133148 x
@@ -139,7 +154,7 @@ pub fn enum_id_1(x: Option<Result<u16, u16>>) -> Option<Result<u16, u16>> {
139154 x
140155}
141156
142- // CHECK: { i8, i8 } @enum_id_2(i1 zeroext %x.0, i8 %x.1)
157+ // CHECK: { i8, i8 } @enum_id_2(i1 noundef zeroext %x.0, i8 %x.1)
143158#[ no_mangle]
144159pub fn enum_id_2 ( x : Option < u8 > ) -> Option < u8 > {
145160 x
0 commit comments