mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-22 14:55:26 +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)
|
|
}
|