@@ -28,37 +28,37 @@ pub fn boolean(x: bool) -> bool {
28
28
x
29
29
}
30
30
31
- // CHECK: @readonly_borrow(i32* noalias readonly dereferenceable(4) %arg0)
31
+ // CHECK: @readonly_borrow(i32* noalias readonly align 4 dereferenceable(4) %arg0)
32
32
// FIXME #25759 This should also have `nocapture`
33
33
#[ no_mangle]
34
34
pub fn readonly_borrow ( _: & i32 ) {
35
35
}
36
36
37
- // CHECK: @static_borrow(i32* noalias readonly dereferenceable(4) %arg0)
37
+ // CHECK: @static_borrow(i32* noalias readonly align 4 dereferenceable(4) %arg0)
38
38
// static borrow may be captured
39
39
#[ no_mangle]
40
40
pub fn static_borrow ( _: & ' static i32 ) {
41
41
}
42
42
43
- // CHECK: @named_borrow(i32* noalias readonly dereferenceable(4) %arg0)
43
+ // CHECK: @named_borrow(i32* noalias readonly align 4 dereferenceable(4) %arg0)
44
44
// borrow with named lifetime may be captured
45
45
#[ no_mangle]
46
46
pub fn named_borrow < ' r > ( _: & ' r i32 ) {
47
47
}
48
48
49
- // CHECK: @unsafe_borrow(i16* dereferenceable(2) %arg0)
49
+ // CHECK: @unsafe_borrow(i16* align 2 dereferenceable(2) %arg0)
50
50
// unsafe interior means this isn't actually readonly and there may be aliases ...
51
51
#[ no_mangle]
52
52
pub fn unsafe_borrow ( _: & UnsafeInner ) {
53
53
}
54
54
55
- // CHECK: @mutable_unsafe_borrow(i16* dereferenceable(2) %arg0)
55
+ // CHECK: @mutable_unsafe_borrow(i16* align 2 dereferenceable(2) %arg0)
56
56
// ... unless this is a mutable borrow, those never alias
57
57
#[ no_mangle]
58
58
pub fn mutable_unsafe_borrow ( _: & mut UnsafeInner ) {
59
59
}
60
60
61
- // CHECK: @mutable_borrow(i32* dereferenceable(4) %arg0)
61
+ // CHECK: @mutable_borrow(i32* align 4 dereferenceable(4) %arg0)
62
62
// FIXME #25759 This should also have `nocapture`
63
63
#[ no_mangle]
64
64
pub fn mutable_borrow ( _: & mut i32 ) {
@@ -69,13 +69,13 @@ pub fn mutable_borrow(_: &mut i32) {
69
69
pub fn indirect_struct ( _: S ) {
70
70
}
71
71
72
- // CHECK: @borrowed_struct(%S* noalias readonly dereferenceable(32) %arg0)
72
+ // CHECK: @borrowed_struct(%S* noalias readonly align 4 dereferenceable(32) %arg0)
73
73
// FIXME #25759 This should also have `nocapture`
74
74
#[ no_mangle]
75
75
pub fn borrowed_struct ( _: & S ) {
76
76
}
77
77
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)
79
79
#[ no_mangle]
80
80
pub fn _box ( x : Box < i32 > ) -> Box < i32 > {
81
81
x
@@ -95,48 +95,48 @@ pub fn struct_return() -> S {
95
95
pub fn helper ( _: usize ) {
96
96
}
97
97
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)
99
99
// FIXME #25759 This should also have `nocapture`
100
100
#[ no_mangle]
101
101
pub fn slice ( _: & [ u8 ] ) {
102
102
}
103
103
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)
105
105
// FIXME #25759 This should also have `nocapture`
106
106
#[ no_mangle]
107
107
pub fn mutable_slice ( _: & mut [ u8 ] ) {
108
108
}
109
109
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)
111
111
// unsafe interior means this isn't actually readonly and there may be aliases ...
112
112
#[ no_mangle]
113
113
pub fn unsafe_slice ( _: & [ UnsafeInner ] ) {
114
114
}
115
115
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)
117
117
// FIXME #25759 This should also have `nocapture`
118
118
#[ no_mangle]
119
119
pub fn str ( _: & [ u8 ] ) {
120
120
}
121
121
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)
123
123
// FIXME #25759 This should also have `nocapture`
124
124
#[ no_mangle]
125
125
pub fn trait_borrow ( _: & Drop ) {
126
126
}
127
127
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({{.*}}))
129
129
#[ no_mangle]
130
130
pub fn trait_box ( _: Box < Drop > ) {
131
131
}
132
132
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)
134
134
#[ no_mangle]
135
135
pub fn trait_option ( x : Option < Box < Drop > > ) -> Option < Box < Drop > > {
136
136
x
137
137
}
138
138
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)
140
140
#[ no_mangle]
141
141
pub fn return_slice ( x : & [ u16 ] ) -> & [ u16 ] {
142
142
x
0 commit comments