2024-05-20 15:39:26 -05:00
|
|
|
//@ assembly-output: emit-asm
|
2024-06-11 02:45:16 -05:00
|
|
|
//@ compile-flags: -Copt-level=3
|
2024-05-20 15:39:26 -05:00
|
|
|
//@ only-x86_64
|
|
|
|
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
type T = u8;
|
|
|
|
type T1 = (T, T, T, T, T, T, T, T);
|
|
|
|
|
|
|
|
// CHECK-LABEL: foo1a
|
2024-06-11 02:45:16 -05:00
|
|
|
// CHECK: cmpq
|
2024-06-09 08:25:12 -05:00
|
|
|
// CHECK-NEXT: sete
|
2024-06-11 02:45:16 -05:00
|
|
|
// CHECK-NEXT: {{retq|popq}}
|
2024-06-09 08:25:12 -05:00
|
|
|
#[no_mangle]
|
2024-05-20 15:39:26 -05:00
|
|
|
pub fn foo1a(a: T1, b: T1) -> bool {
|
|
|
|
a == b
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK-LABEL: foo1b
|
2024-06-11 02:45:16 -05:00
|
|
|
// CHECK: movq
|
|
|
|
// CHECK: cmpq
|
2024-06-09 08:25:12 -05:00
|
|
|
// CHECK-NEXT: sete
|
2024-06-11 02:45:16 -05:00
|
|
|
// CHECK-NEXT: {{retq|popq}}
|
2024-06-09 08:25:12 -05:00
|
|
|
#[no_mangle]
|
2024-05-20 15:39:26 -05:00
|
|
|
pub fn foo1b(a: &T1, b: &T1) -> bool {
|
|
|
|
a == b
|
|
|
|
}
|