@@ -28,37 +28,37 @@ pub fn boolean(x: bool) -> bool {
2828 x
2929}
3030
31- // CHECK: @readonly_borrow(i32* noalias readonly dereferenceable(4) %arg0)
31+ // CHECK: @readonly_borrow(i32* noalias readonly align 4 dereferenceable(4) %arg0)
3232// FIXME #25759 This should also have `nocapture`
3333#[ no_mangle]
3434pub fn readonly_borrow ( _: & i32 ) {
3535}
3636
37- // CHECK: @static_borrow(i32* noalias readonly dereferenceable(4) %arg0)
37+ // CHECK: @static_borrow(i32* noalias readonly align 4 dereferenceable(4) %arg0)
3838// static borrow may be captured
3939#[ no_mangle]
4040pub fn static_borrow ( _: & ' static i32 ) {
4141}
4242
43- // CHECK: @named_borrow(i32* noalias readonly dereferenceable(4) %arg0)
43+ // CHECK: @named_borrow(i32* noalias readonly align 4 dereferenceable(4) %arg0)
4444// borrow with named lifetime may be captured
4545#[ no_mangle]
4646pub fn named_borrow < ' r > ( _: & ' r i32 ) {
4747}
4848
49- // CHECK: @unsafe_borrow(i16* dereferenceable(2) %arg0)
49+ // CHECK: @unsafe_borrow(i16* align 2 dereferenceable(2) %arg0)
5050// unsafe interior means this isn't actually readonly and there may be aliases ...
5151#[ no_mangle]
5252pub fn unsafe_borrow ( _: & UnsafeInner ) {
5353}
5454
55- // CHECK: @mutable_unsafe_borrow(i16* dereferenceable(2) %arg0)
55+ // CHECK: @mutable_unsafe_borrow(i16* align 2 dereferenceable(2) %arg0)
5656// ... unless this is a mutable borrow, those never alias
5757#[ no_mangle]
5858pub fn mutable_unsafe_borrow ( _: & mut UnsafeInner ) {
5959}
6060
61- // CHECK: @mutable_borrow(i32* dereferenceable(4) %arg0)
61+ // CHECK: @mutable_borrow(i32* align 4 dereferenceable(4) %arg0)
6262// FIXME #25759 This should also have `nocapture`
6363#[ no_mangle]
6464pub fn mutable_borrow ( _: & mut i32 ) {
@@ -69,13 +69,13 @@ pub fn mutable_borrow(_: &mut i32) {
6969pub fn indirect_struct ( _: S ) {
7070}
7171
72- // CHECK: @borrowed_struct(%S* noalias readonly dereferenceable(32) %arg0)
72+ // CHECK: @borrowed_struct(%S* noalias readonly align 4 dereferenceable(32) %arg0)
7373// FIXME #25759 This should also have `nocapture`
7474#[ no_mangle]
7575pub fn borrowed_struct ( _: & S ) {
7676}
7777
78- // CHECK: noalias align 4 dereferenceable(4) i32* @_box(i32* noalias dereferenceable(4) %x)
78+ // CHECK: noalias align 4 dereferenceable(4) i32* @_box(i32* noalias align 4 dereferenceable(4) %x)
7979#[ no_mangle]
8080pub fn _box ( x : Box < i32 > ) -> Box < i32 > {
8181 x
@@ -95,48 +95,48 @@ pub fn struct_return() -> S {
9595pub fn helper ( _: usize ) {
9696}
9797
98- // CHECK: @slice([0 x i8]* noalias nonnull readonly %arg0.0, [[USIZE]] %arg0.1)
98+ // CHECK: @slice([0 x i8]* noalias nonnull readonly align 1 %arg0.0, [[USIZE]] %arg0.1)
9999// FIXME #25759 This should also have `nocapture`
100100#[ no_mangle]
101101pub fn slice ( _: & [ u8 ] ) {
102102}
103103
104- // CHECK: @mutable_slice([0 x i8]* nonnull %arg0.0, [[USIZE]] %arg0.1)
104+ // CHECK: @mutable_slice([0 x i8]* nonnull align 1 %arg0.0, [[USIZE]] %arg0.1)
105105// FIXME #25759 This should also have `nocapture`
106106#[ no_mangle]
107107pub fn mutable_slice ( _: & mut [ u8 ] ) {
108108}
109109
110- // CHECK: @unsafe_slice([0 x i16]* nonnull %arg0.0, [[USIZE]] %arg0.1)
110+ // CHECK: @unsafe_slice([0 x i16]* nonnull align 2 %arg0.0, [[USIZE]] %arg0.1)
111111// unsafe interior means this isn't actually readonly and there may be aliases ...
112112#[ no_mangle]
113113pub fn unsafe_slice ( _: & [ UnsafeInner ] ) {
114114}
115115
116- // CHECK: @str([0 x i8]* noalias nonnull readonly %arg0.0, [[USIZE]] %arg0.1)
116+ // CHECK: @str([0 x i8]* noalias nonnull readonly align 1 %arg0.0, [[USIZE]] %arg0.1)
117117// FIXME #25759 This should also have `nocapture`
118118#[ no_mangle]
119119pub fn str ( _: & [ u8 ] ) {
120120}
121121
122- // CHECK: @trait_borrow({}* nonnull %arg0.0, [3 x [[USIZE]]]* noalias readonly dereferenceable({{.*}}) %arg0.1)
122+ // CHECK: @trait_borrow({}* nonnull align 1 %arg0.0, [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}) %arg0.1)
123123// FIXME #25759 This should also have `nocapture`
124124#[ no_mangle]
125125pub fn trait_borrow ( _: & Drop ) {
126126}
127127
128- // CHECK: @trait_box({}* noalias nonnull, [3 x [[USIZE]]]* noalias readonly dereferenceable({{.*}}))
128+ // CHECK: @trait_box({}* noalias nonnull align 1 , [3 x [[USIZE]]]* noalias readonly align {{.*}} dereferenceable({{.*}}))
129129#[ no_mangle]
130130pub fn trait_box ( _: Box < Drop > ) {
131131}
132132
133- // CHECK: { i8*, i8* } @trait_option(i8* noalias %x.0, i8* %x.1)
133+ // CHECK: { i8*, i8* } @trait_option(i8* noalias align 1 %x.0, i8* %x.1)
134134#[ no_mangle]
135135pub fn trait_option ( x : Option < Box < Drop > > ) -> Option < Box < Drop > > {
136136 x
137137}
138138
139- // CHECK: { [0 x i16]*, [[USIZE]] } @return_slice([0 x i16]* noalias nonnull readonly %x.0, [[USIZE]] %x.1)
139+ // CHECK: { [0 x i16]*, [[USIZE]] } @return_slice([0 x i16]* noalias nonnull readonly align 2 %x.0, [[USIZE]] %x.1)
140140#[ no_mangle]
141141pub fn return_slice ( x : & [ u16 ] ) -> & [ u16 ] {
142142 x
0 commit comments