rust/tests/codegen/array-repeat.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

16 lines
264 B
Rust
Raw Normal View History

//@ compile-flags: -O
2024-01-05 11:43:01 +00: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)
}