summaryrefslogtreecommitdiffstats
path: root/src/test/codegen/issue-45466.rs
blob: c79542767774a3d7557e261868f5d65dde2315c5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
// compile-flags: -O
// ignore-debug: the debug assertions get in the way

#![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;
    }
}