summaryrefslogtreecommitdiffstats
path: root/tests/codegen/move-operands.rs
blob: 6c51324a312d0b9724b59be8e6fe402b3c9d0cf1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
// compile-flags: -C no-prepopulate-passes -Zmir-enable-passes=+DestinationPropagation

#![crate_type = "lib"]

type T = [u8; 256];

#[no_mangle]
pub fn f(a: T, b: fn(_: T, _: T)) {
    // CHECK: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 1 %{{.*}}, {{i8\*|ptr}} align 1 %{{.*}}, {{.*}} 256, i1 false)
    // CHECK-NOT: call void @llvm.memcpy.{{.*}}({{i8\*|ptr}} align 1 %{{.*}}, {{i8\*|ptr}} align 1 %{{.*}}, {{.*}} 256, i1 false)
    b(a, a)
}