about summary refs log tree commit diff
path: root/tests/codegen-llvm/issues/issue-45466.rs
blob: 164a27ef5d4c4a7422e164d45fcdfc8d7f1733b0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
//@ compile-flags: -Copt-level=3

#![crate_type = "rlib"]

// CHECK-LABEL: @memzero
// CHECK-NOT: store
// CHECK: call void @llvm.memset
// CHECK-NOT: store
#[no_mangle]
pub fn memzero(data: &mut [u8]) {
    for i in 0..data.len() {
        data[i] = 0;
    }
}