8
8
//@ compile-flags: -C no-prepopulate-passes -O
9
9
#![ crate_type = "lib" ]
10
10
11
- // CHECK: define noundef i64 @replace_short_array_u64x1(ptr noalias noundef align 8 dereferenceable(8) %r , i64 noundef %0 )
11
+ // CHECK: define noundef i64 @replace_short_array_u64x1(ptr {{.*}} , i64 noundef %{{.*}} )
12
12
#[ no_mangle]
13
13
pub fn replace_short_array_u64x1 ( r : & mut [ u64 ; 1 ] , v : [ u64 ; 1 ] ) -> [ u64 ; 1 ] {
14
14
std:: mem:: replace ( r, v)
15
15
}
16
16
17
- // CHECK: define noundef i32 @replace_short_array_u32x1(ptr noalias noundef align 4 dereferenceable(4) %r , i32 noundef %0 )
17
+ // CHECK: define noundef i32 @replace_short_array_u32x1(ptr {{.*}} , i32 noundef %{{.*}} )
18
18
#[ no_mangle]
19
19
pub fn replace_short_array_u32x1 ( r : & mut [ u32 ; 1 ] , v : [ u32 ; 1 ] ) -> [ u32 ; 1 ] {
20
20
std:: mem:: replace ( r, v)
21
21
}
22
22
23
- // CHECK: define noundef i64 @replace_short_array_u32x2(ptr noalias noundef align 4 dereferenceable(8) %r , i64 noundef %0 )
23
+ // CHECK: define noundef i64 @replace_short_array_u32x2(ptr {{.*}} , i64 noundef %{{.*}} )
24
24
#[ no_mangle]
25
25
pub fn replace_short_array_u32x2 ( r : & mut [ u32 ; 2 ] , v : [ u32 ; 2 ] ) -> [ u32 ; 2 ] {
26
26
std:: mem:: replace ( r, v)
27
27
}
28
28
29
- // CHECK: define noundef i16 @replace_short_array_u16x1(ptr noalias noundef align 2 dereferenceable(2) %r , i16 noundef %0 )
29
+ // CHECK: define noundef i16 @replace_short_array_u16x1(ptr {{.*}} , i16 noundef %{{.*}} )
30
30
#[ no_mangle]
31
31
pub fn replace_short_array_u16x1 ( r : & mut [ u16 ; 1 ] , v : [ u16 ; 1 ] ) -> [ u16 ; 1 ] {
32
32
std:: mem:: replace ( r, v)
33
33
}
34
34
35
- // CHECK: define noundef i32 @replace_short_array_u16x2(ptr noalias noundef align 2 dereferenceable(4) %r , i32 noundef %0 )
35
+ // CHECK: define noundef i32 @replace_short_array_u16x2(ptr {{.*}} , i32 noundef %{{.*}} )
36
36
#[ no_mangle]
37
37
pub fn replace_short_array_u16x2 ( r : & mut [ u16 ; 2 ] , v : [ u16 ; 2 ] ) -> [ u16 ; 2 ] {
38
38
std:: mem:: replace ( r, v)
39
39
}
40
40
41
- // CHECK: define noundef i48 @replace_short_array_u16x3(ptr noalias noundef align 2 dereferenceable(6) %r , i48 noundef %0 )
41
+ // CHECK: define noundef i48 @replace_short_array_u16x3(ptr {{.*}} , i48 noundef %{{.*}} )
42
42
#[ no_mangle]
43
43
pub fn replace_short_array_u16x3 ( r : & mut [ u16 ; 3 ] , v : [ u16 ; 3 ] ) -> [ u16 ; 3 ] {
44
44
std:: mem:: replace ( r, v)
45
45
}
46
46
47
- // CHECK: define noundef i64 @replace_short_array_u16x4(ptr noalias noundef align 2 dereferenceable(8) %r , i64 noundef %0 )
47
+ // CHECK: define noundef i64 @replace_short_array_u16x4(ptr {{.*}} , i64 noundef %{{.*}} )
48
48
#[ no_mangle]
49
49
pub fn replace_short_array_u16x4 ( r : & mut [ u16 ; 4 ] , v : [ u16 ; 4 ] ) -> [ u16 ; 4 ] {
50
50
std:: mem:: replace ( r, v)
51
51
}
52
52
53
- // CHECK: define noundef i8 @replace_short_array_u8x1(ptr noalias noundef align 1 dereferenceable(1) %r , i8 noundef %0 )
53
+ // CHECK: define noundef i8 @replace_short_array_u8x1(ptr {{.*}} , i8 noundef %{{.*}} )
54
54
#[ no_mangle]
55
55
pub fn replace_short_array_u8x1 ( r : & mut [ u8 ; 1 ] , v : [ u8 ; 1 ] ) -> [ u8 ; 1 ] {
56
56
std:: mem:: replace ( r, v)
57
57
}
58
58
59
- // CHECK: define noundef i16 @replace_short_array_u8x2(ptr noalias noundef align 1 dereferenceable(2) %r , i16 noundef %0 )
59
+ // CHECK: define noundef i16 @replace_short_array_u8x2(ptr {{.*}} , i16 noundef %{{.*}} )
60
60
#[ no_mangle]
61
61
pub fn replace_short_array_u8x2 ( r : & mut [ u8 ; 2 ] , v : [ u8 ; 2 ] ) -> [ u8 ; 2 ] {
62
62
std:: mem:: replace ( r, v)
63
63
}
64
64
65
- // CHECK: define noundef i24 @replace_short_array_u8x3(ptr noalias noundef align 1 dereferenceable(3) %r , i24 noundef %0 )
65
+ // CHECK: define noundef i24 @replace_short_array_u8x3(ptr {{.*}} , i24 noundef %{{.*}} )
66
66
#[ no_mangle]
67
67
pub fn replace_short_array_u8x3 ( r : & mut [ u8 ; 3 ] , v : [ u8 ; 3 ] ) -> [ u8 ; 3 ] {
68
68
std:: mem:: replace ( r, v)
69
69
}
70
70
71
- // CHECK: define noundef i64 @replace_short_array_u8x8(ptr noalias noundef align 1 dereferenceable(8) %r , i64 noundef %0 )
71
+ // CHECK: define noundef i64 @replace_short_array_u8x8(ptr {{.*}} , i64 noundef %{{.*}} )
72
72
#[ no_mangle]
73
73
pub fn replace_short_array_u8x8 ( r : & mut [ u8 ; 8 ] , v : [ u8 ; 8 ] ) -> [ u8 ; 8 ] {
74
74
std:: mem:: replace ( r, v)
@@ -77,7 +77,7 @@ pub fn replace_short_array_u8x8(r: &mut [u8; 8], v: [u8; 8]) -> [u8; 8] {
77
77
#[ repr( transparent) ]
78
78
pub struct Foo ( [ u8 ; 4 ] ) ;
79
79
80
- // CHECK: define noundef i32 @replace_repr_transparent_struct_short_array(ptr noalias noundef align 1 dereferenceable(4) %r , i32 noundef %0 )
80
+ // CHECK: define noundef i32 @replace_repr_transparent_struct_short_array(ptr {{.*}} , i32 noundef %{{.*}} )
81
81
#[ no_mangle]
82
82
pub fn replace_repr_transparent_struct_short_array ( r : & mut Foo , v : Foo ) -> Foo {
83
83
std:: mem:: replace ( r, v)
@@ -88,8 +88,23 @@ pub enum Bar {
88
88
Default ( [ u8 ; 4 ] )
89
89
}
90
90
91
- // CHECK: define noundef i32 @replace_repr_transparent_enum_short_array(ptr noalias noundef align 1 dereferenceable(4) %r , i32 noundef %0 )
91
+ // CHECK: define noundef i32 @replace_repr_transparent_enum_short_array(ptr {{.*}} , i32 noundef %{{.*}} )
92
92
#[ no_mangle]
93
93
pub fn replace_repr_transparent_enum_short_array ( r : & mut Bar , v : Bar ) -> Bar {
94
94
std:: mem:: replace ( r, v)
95
95
}
96
+
97
+ #[ repr( transparent) ]
98
+ pub struct Owo ( [ u8 ; 4 ] ) ;
99
+
100
+ #[ repr( transparent) ]
101
+ pub struct Uwu ( Owo ) ;
102
+
103
+ #[ repr( transparent) ]
104
+ pub struct Oowoo ( Uwu ) ;
105
+
106
+ // CHECK: define noundef i32 @replace_repr_transparent_nested_struct_short_array(ptr {{.*}}, i32 noundef %{{.*}})
107
+ #[ no_mangle]
108
+ pub fn replace_repr_transparent_nested_struct_short_array ( r : & mut Oowoo , v : Oowoo ) -> Oowoo {
109
+ std:: mem:: replace ( r, v)
110
+ }
0 commit comments