]> git.lizzy.rs Git - rust.git/blob - tests/codegen/issue-85872-multiple-reverse.rs
Rollup merge of #107756 - RalfJung:miri-out-of-addresses, r=oli-obk
[rust.git] / tests / codegen / issue-85872-multiple-reverse.rs
1 // min-llvm-version: 15.0.0
2 // compile-flags: -O
3
4 #![crate_type = "lib"]
5
6 #[no_mangle]
7 pub fn u16_be_to_arch(mut data: [u8; 2]) -> [u8; 2] {
8     // CHECK-LABEL: @u16_be_to_arch
9     // CHECK: @llvm.bswap.i16
10     data.reverse();
11     data
12 }
13
14 #[no_mangle]
15 pub fn u32_be_to_arch(mut data: [u8; 4]) -> [u8; 4] {
16     // CHECK-LABEL: @u32_be_to_arch
17     // CHECK: @llvm.bswap.i32
18     data.reverse();
19     data
20 }