From 246f239d9f40f633160f0c18f87a20922d4e77bb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:37 +0200 Subject: Merging debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- src/test/codegen/issue-85872-multiple-reverse.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/test/codegen/issue-85872-multiple-reverse.rs (limited to 'src/test/codegen/issue-85872-multiple-reverse.rs') diff --git a/src/test/codegen/issue-85872-multiple-reverse.rs b/src/test/codegen/issue-85872-multiple-reverse.rs new file mode 100644 index 000000000..591a1aca7 --- /dev/null +++ b/src/test/codegen/issue-85872-multiple-reverse.rs @@ -0,0 +1,20 @@ +// min-llvm-version: 15.0.0 +// compile-flags: -O + +#![crate_type = "lib"] + +#[no_mangle] +pub fn u16_be_to_arch(mut data: [u8; 2]) -> [u8; 2] { + // CHECK-LABEL: @u16_be_to_arch + // CHECK: @llvm.bswap.i16 + data.reverse(); + data +} + +#[no_mangle] +pub fn u32_be_to_arch(mut data: [u8; 4]) -> [u8; 4] { + // CHECK-LABEL: @u32_be_to_arch + // CHECK: @llvm.bswap.i32 + data.reverse(); + data +} -- cgit v1.2.3