add assembly test for #83585
This commit is contained in:
parent
8bd6c04cfc
commit
2120ea5a91
30
tests/assembly/issue-83585-small-pod-struct-equality.rs
Normal file
30
tests/assembly/issue-83585-small-pod-struct-equality.rs
Normal 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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user