From 1376c5a617be5c25655d0d7cb63e3beaa5a6e026 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:20:39 +0200 Subject: Merging upstream version 1.70.0+dfsg1. Signed-off-by: Daniel Baumann --- tests/codegen/issues/issue-45466.rs | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 tests/codegen/issues/issue-45466.rs (limited to 'tests/codegen/issues/issue-45466.rs') diff --git a/tests/codegen/issues/issue-45466.rs b/tests/codegen/issues/issue-45466.rs new file mode 100644 index 000000000..c79542767 --- /dev/null +++ b/tests/codegen/issues/issue-45466.rs @@ -0,0 +1,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; + } +} -- cgit v1.2.3