add assembly test for #83585

This commit is contained in:
Lzu Tao 2024-05-20 20:39:26 +00:00
parent 8bd6c04cfc
commit 2120ea5a91

View File

@ -0,0 +1,30 @@
//@ assembly-output: emit-asm
//@ compile-flags:-Copt-level=3
//@ only-x86_64
#![crate_type = "lib"]
#[no_mangle]
type T = u8;
type T1 = (T, T, T, T, T, T, T, T);
type T2 = [T; 8];
#[no_mangle]
// CHECK-LABEL: foo1a
// CHECK: cmp
// CHECK-NEXT: set
// CHECK-NEXT: ret
pub fn foo1a(a: T1, b: T1) -> bool {
a == b
}
#[no_mangle]
// CHECK-LABEL: foo1b
// CHECK: mov
// CHECK-NEXT: cmp
// CHECK-NEXT: set
// CHECK-NEXT: ret
pub fn foo1b(a: &T1, b: &T1) -> bool {
a == b
}