mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
16 lines
302 B
Rust
16 lines
302 B
Rust
// compile-flags: -O
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
// CHECK-LABEL: @array_clone
|
|
#[no_mangle]
|
|
pub fn array_clone(a: &[u8; 2]) -> [u8; 2] {
|
|
// CHECK-NOT: getelementptr
|
|
// CHECK-NOT: load i8
|
|
// CHECK-NOT: zext
|
|
// CHECK-NOT: shl
|
|
// CHECK: load i16
|
|
// CHECK-NEXT: ret i16
|
|
a.clone()
|
|
}
|