diff options
| author | Oli Scherer <github333195615777966@oli-obk.de> | 2025-01-08 15:00:25 +0000 |
|---|---|---|
| committer | Oli Scherer <github333195615777966@oli-obk.de> | 2025-01-21 08:27:21 +0000 |
| commit | dfa4c01b2e03ad740012236db00adfddc82883e8 (patch) | |
| tree | 10229fd0e767c5d6f316dfef9f40d8a0427a814f /tests/codegen | |
| parent | 964c58a7d96d4cd2dbda8fb40ff0f15ef10b78e3 (diff) | |
Treat undef bytes as equal to any other byte
Diffstat (limited to 'tests/codegen')
| -rw-r--r-- | tests/codegen/slice-init.rs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/codegen/slice-init.rs b/tests/codegen/slice-init.rs index 52b96cf8cd0..73f808db461 100644 --- a/tests/codegen/slice-init.rs +++ b/tests/codegen/slice-init.rs @@ -2,6 +2,8 @@ #![crate_type = "lib"] +use std::mem::MaybeUninit; + // CHECK-LABEL: @zero_sized_elem #[no_mangle] pub fn zero_sized_elem() { @@ -76,16 +78,14 @@ pub fn u16_init_one_bytes() -> [u16; N] { [const { u16::from_be_bytes([1, 1]) }; N] } -// FIXME: undef bytes can just be initialized with the same value as the -// defined bytes, if the defines bytes are all the same. // CHECK-LABEL: @option_none_init #[no_mangle] pub fn option_none_init() -> [Option<u8>; N] { // CHECK-NOT: select - // CHECK: br label %repeat_loop_header{{.*}} + // CHECK-NOT: br // CHECK-NOT: switch - // CHECK: icmp - // CHECK-NOT: call void @llvm.memset.p0 + // CHECK-NOT: icmp + // CHECK: call void @llvm.memset.p0 [const { None }; N] } |
