summaryrefslogtreecommitdiffstats
path: root/tests/codegen/array-clone.rs
blob: 0d42963bcd2ceaba9b2d6dd426716cde6ff987e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// 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()
}