about summary refs log tree commit diff
path: root/tests/codegen-llvm/array-repeat.rs
blob: 1c45341d764cd44caa436148819107cb5ac9acb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ compile-flags: -Copt-level=3

#![crate_type = "lib"]

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)
}