]> git.lizzy.rs Git - rust.git/blob - src/test/codegen/swap-small-types.rs
Auto merge of #61421 - vorner:string-in-rc-into-raw-docs, r=RalfJung
[rust.git] / src / test / codegen / swap-small-types.rs
1 // compile-flags: -O
2 // only-x86_64
3
4 #![crate_type = "lib"]
5
6 use std::mem::swap;
7
8 type RGB48 = [u16; 3];
9
10 // CHECK-LABEL: @swap_rgb48
11 #[no_mangle]
12 pub fn swap_rgb48(x: &mut RGB48, y: &mut RGB48) {
13 // CHECK-NOT: alloca
14 // CHECK: load i48
15 // CHECK: store i48
16     swap(x, y)
17 }