File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,20 @@ pub fn option_none_init() -> [Option<u8>; N] {
8989 [ None ; N ]
9090}
9191
92+ use std:: mem:: MaybeUninit ;
93+
94+ // FIXME: This could be optimized into a memset.
95+ // Regression test for <https://github.com/rust-lang/rust/issues/137892>.
96+ #[ no_mangle]
97+ pub fn half_uninit ( ) -> [ ( u128 , MaybeUninit < u128 > ) ; N ] {
98+ // CHECK-NOT: select
99+ // CHECK: br label %repeat_loop_header{{.*}}
100+ // CHECK-NOT: switch
101+ // CHECK: icmp
102+ // CHECK-NOT: call void @llvm.memset.p0
103+ [ const { ( 0 , MaybeUninit :: uninit ( ) ) } ; N ]
104+ }
105+
92106// Use an opaque function to prevent rustc from removing useless drops.
93107#[ inline( never) ]
94108pub fn opaque ( _: impl Sized ) { }
You can’t perform that action at this time.
0 commit comments