2024-02-22 06:10:29 -06:00
|
|
|
//@ compile-flags: -O
|
2021-11-09 23:43:20 -06:00
|
|
|
|
|
|
|
#![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()
|
|
|
|
}
|