add codegen test for array::repeat
This commit is contained in:
parent
39a918002e
commit
1a8b0d7c53
15
tests/codegen/array-repeat.rs
Normal file
15
tests/codegen/array-repeat.rs
Normal file
@ -0,0 +1,15 @@
|
||||
// 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)
|
||||
}
|
Loading…
Reference in New Issue
Block a user