2024-05-20 20:39:26 +00:00
|
|
|
//@ assembly-output: emit-asm
|
2024-06-11 07:45:16 +00:00
|
|
|
//@ compile-flags: -Copt-level=3
|
2024-05-20 20:39:26 +00: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 07:45:16 +00:00
|
|
|
// CHECK: cmpq
|
2024-06-09 13:25:12 +00:00
|
|
|
// CHECK-NEXT: sete
|
2024-06-11 07:45:16 +00:00
|
|
|
// CHECK-NEXT: {{retq|popq}}
|
2024-06-09 13:25:12 +00:00
|
|
|
#[no_mangle]
|
2024-05-20 20:39:26 +00:00
|
|
|
pub fn foo1a(a: T1, b: T1) -> bool {
|
|
|
|
a == b
|
|
|
|
}
|
|
|
|
|
|
|
|
// CHECK-LABEL: foo1b
|
2024-06-11 07:45:16 +00:00
|
|
|
// CHECK: movq
|
|
|
|
// CHECK: cmpq
|
2024-06-09 13:25:12 +00:00
|
|
|
// CHECK-NEXT: sete
|
2024-06-11 07:45:16 +00:00
|
|
|
// CHECK-NEXT: {{retq|popq}}
|
2024-06-09 13:25:12 +00:00
|
|
|
#[no_mangle]
|
2024-05-20 20:39:26 +00:00
|
|
|
pub fn foo1b(a: &T1, b: &T1) -> bool {
|
|
|
|
a == b
|
|
|
|
}
|