2024-06-19 10:48:05 -05:00
|
|
|
//@ compile-flags: -O
|
2024-01-05 05:43:01 -06:00
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
#![feature(array_repeat)]
|
|
|
|
|
|
|
|
use std::array::repeat;
|
|
|
|
|
|
|
|
// CHECK-LABEL: @byte_repeat
|
|
|
|
#[no_mangle]
|
|
|
|
fn byte_repeat(b: u8) -> [u8; 1024] {
|
|
|
|
// CHECK-NOT: alloca
|
|
|
|
// CHECK-NOT: store
|
|
|
|
// CHECK: memset
|
|
|
|
repeat(b)
|
|
|
|
}
|