@@ -80,7 +80,7 @@ pub fn option_nonzero_int(x: Option<NonZero<u64>>) -> Option<NonZero<u64>> {
8080 x
8181}
8282
83- // CHECK: @readonly_borrow(ptr noalias noundef readonly align 4 dereferenceable(4) %_1)
83+ // CHECK: @readonly_borrow(ptr noalias noundef readonly align 4{{( captures\(address, read_provenance\))?}} dereferenceable(4) %_1)
8484// FIXME #25759 This should also have `nocapture`
8585#[ no_mangle]
8686pub fn readonly_borrow ( _: & i32 ) { }
@@ -91,12 +91,12 @@ pub fn readonly_borrow_ret() -> &'static i32 {
9191 loop { }
9292}
9393
94- // CHECK: @static_borrow(ptr noalias noundef readonly align 4 dereferenceable(4) %_1)
94+ // CHECK: @static_borrow(ptr noalias noundef readonly align 4{{( captures\(address, read_provenance\))?}} dereferenceable(4) %_1)
9595// static borrow may be captured
9696#[ no_mangle]
9797pub fn static_borrow ( _: & ' static i32 ) { }
9898
99- // CHECK: @named_borrow(ptr noalias noundef readonly align 4 dereferenceable(4) %_1)
99+ // CHECK: @named_borrow(ptr noalias noundef readonly align 4{{( captures\(address, read_provenance\))?}} dereferenceable(4) %_1)
100100// borrow with named lifetime may be captured
101101#[ no_mangle]
102102pub fn named_borrow < ' r > ( _: & ' r i32 ) { }
@@ -129,7 +129,7 @@ pub fn mutable_borrow_ret() -> &'static mut i32 {
129129// <https://github.com/rust-lang/unsafe-code-guidelines/issues/381>.
130130pub fn mutable_notunpin_borrow ( _: & mut NotUnpin ) { }
131131
132- // CHECK: @notunpin_borrow(ptr noalias noundef readonly align 4 dereferenceable(4) %_1)
132+ // CHECK: @notunpin_borrow(ptr noalias noundef readonly align 4{{( captures\(address, read_provenance\))?}} dereferenceable(4) %_1)
133133// But `&NotUnpin` behaves perfectly normal.
134134#[ no_mangle]
135135pub fn notunpin_borrow ( _: & NotUnpin ) { }
@@ -138,12 +138,12 @@ pub fn notunpin_borrow(_: &NotUnpin) {}
138138#[ no_mangle]
139139pub fn indirect_struct ( _: S ) { }
140140
141- // CHECK: @borrowed_struct(ptr noalias noundef readonly align 4 dereferenceable(32) %_1)
141+ // CHECK: @borrowed_struct(ptr noalias noundef readonly align 4{{( captures\(address, read_provenance\))?}} dereferenceable(32) %_1)
142142// FIXME #25759 This should also have `nocapture`
143143#[ no_mangle]
144144pub fn borrowed_struct ( _: & S ) { }
145145
146- // CHECK: @option_borrow(ptr noalias noundef readonly align 4 dereferenceable_or_null(4) %_x)
146+ // CHECK: @option_borrow(ptr noalias noundef readonly align 4{{( captures\(address, read_provenance\))?}} dereferenceable_or_null(4) %_x)
147147#[ no_mangle]
148148pub fn option_borrow ( _x : Option < & i32 > ) { }
149149
@@ -185,7 +185,7 @@ pub fn _box(x: Box<i32>) -> Box<i32> {
185185// With a custom allocator, it should *not* have `noalias`. (See
186186// <https://github.com/rust-lang/miri/issues/3341> for why.) The second argument is the allocator,
187187// which is a reference here that still carries `noalias` as usual.
188- // CHECK: @_box_custom(ptr noundef nonnull align 4 %x.0, ptr noalias noundef nonnull readonly align 1 %x.1)
188+ // CHECK: @_box_custom(ptr noundef nonnull align 4 %x.0, ptr noalias noundef nonnull readonly align 1{{( captures\(address, read_provenance\))?}} %x.1)
189189#[ no_mangle]
190190pub fn _box_custom ( x : Box < i32 , & std:: alloc:: Global > ) {
191191 drop ( x)
@@ -208,7 +208,7 @@ pub fn struct_return() -> S {
208208#[ no_mangle]
209209pub fn helper ( _: usize ) { }
210210
211- // CHECK: @slice(ptr noalias noundef nonnull readonly align 1 %_1.0, [[USIZE]] noundef %_1.1)
211+ // CHECK: @slice(ptr noalias noundef nonnull readonly align 1{{( captures\(address, read_provenance\))?}} %_1.0, [[USIZE]] noundef %_1.1)
212212// FIXME #25759 This should also have `nocapture`
213213#[ no_mangle]
214214pub fn slice ( _: & [ u8 ] ) { }
@@ -227,7 +227,7 @@ pub fn unsafe_slice(_: &[UnsafeInner]) {}
227227#[ no_mangle]
228228pub fn raw_slice ( _: * const [ u8 ] ) { }
229229
230- // CHECK: @str(ptr noalias noundef nonnull readonly align 1 %_1.0, [[USIZE]] noundef %_1.1)
230+ // CHECK: @str(ptr noalias noundef nonnull readonly align 1{{( captures\(address, read_provenance\))?}} %_1.0, [[USIZE]] noundef %_1.1)
231231// FIXME #25759 This should also have `nocapture`
232232#[ no_mangle]
233233pub fn str ( _: & [ u8 ] ) { }
@@ -259,7 +259,7 @@ pub fn trait_option(x: Option<Box<dyn Drop + Unpin>>) -> Option<Box<dyn Drop + U
259259 x
260260}
261261
262- // CHECK: { ptr, [[USIZE]] } @return_slice(ptr noalias noundef nonnull readonly align 2 %x.0, [[USIZE]] noundef %x.1)
262+ // CHECK: { ptr, [[USIZE]] } @return_slice(ptr noalias noundef nonnull readonly align 2{{( captures\(address, read_provenance\))?}} %x.0, [[USIZE]] noundef %x.1)
263263#[ no_mangle]
264264pub fn return_slice ( x : & [ u16 ] ) -> & [ u16 ] {
265265 x
0 commit comments