Skip to content
/ rustc Public
forked from rust-lang/rust

Commit 5cccf3f

Browse files
committed
add assembly test for rust-lang#83585
1 parent 882f64c commit 5cccf3f

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
//@ assembly-output: emit-asm
2+
//@ compile-flags:-Copt-level=3
3+
//@ only-x86_64
4+
5+
#![crate_type = "lib"]
6+
7+
#[no_mangle]
8+
type T = u8;
9+
type T1 = (T, T, T, T, T, T, T, T);
10+
type T2 = [T; 8];
11+
12+
#[no_mangle]
13+
// CHECK-LABEL: foo1a
14+
// CHECK: cmp
15+
// CHECK-NEXT: set
16+
// CHECK-NEXT: ret
17+
pub fn foo1a(a: T1, b: T1) -> bool {
18+
a == b
19+
}
20+
21+
#[no_mangle]
22+
// CHECK-LABEL: foo1b
23+
// CHECK: mov
24+
// CHECK-NEXT: cmp
25+
// CHECK-NEXT: set
26+
// CHECK-NEXT: ret
27+
pub fn foo1b(a: &T1, b: &T1) -> bool {
28+
a == b
29+
}
30+

0 commit comments

Comments
 (0)