rust/tests/assembly/issue-83585-small-pod-struct-equality.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
470 B
Rust
Raw Normal View History

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
// CHECK-NEXT: sete
2024-06-11 07:45:16 +00:00
// CHECK-NEXT: {{retq|popq}}
#[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
// CHECK-NEXT: sete
2024-06-11 07:45:16 +00:00
// CHECK-NEXT: {{retq|popq}}
#[no_mangle]
2024-05-20 20:39:26 +00:00
pub fn foo1b(a: &T1, b: &T1) -> bool {
a == b
}