mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-30 14:01:51 +00:00
16 lines
264 B
Rust
16 lines
264 B
Rust
//@ compile-flags: -O
|
|
|
|
#![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)
|
|
}
|