add codegen test for array::repeat
This commit is contained in:
parent
39a918002e
commit
1a8b0d7c53
1 changed files with 15 additions and 0 deletions
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…
Add table
Add a link
Reference in a new issue