about summary refs log tree commit diff
path: root/tests/assembly-llvm/issue-83585-small-pod-struct-equality.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/assembly-llvm/issue-83585-small-pod-struct-equality.rs')
-rw-r--r--tests/assembly-llvm/issue-83585-small-pod-struct-equality.rs27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests/assembly-llvm/issue-83585-small-pod-struct-equality.rs b/tests/assembly-llvm/issue-83585-small-pod-struct-equality.rs
new file mode 100644
index 00000000000..14bec1337f0
--- /dev/null
+++ b/tests/assembly-llvm/issue-83585-small-pod-struct-equality.rs
@@ -0,0 +1,27 @@
+//@ assembly-output: emit-asm
+//@ compile-flags: -Copt-level=3
+//@ only-x86_64
+
+#![crate_type = "lib"]
+
+type T = u8;
+type T1 = (T, T, T, T, T, T, T, T);
+
+// CHECK-LABEL: foo1a
+// CHECK: cmpq
+// CHECK-NEXT: sete
+// CHECK-NEXT: {{retq|popq}}
+#[no_mangle]
+pub fn foo1a(a: T1, b: T1) -> bool {
+    a == b
+}
+
+// CHECK-LABEL: foo1b
+// CHECK: movq
+// CHECK: cmpq
+// CHECK-NEXT: sete
+// CHECK-NEXT: {{retq|popq}}
+#[no_mangle]
+pub fn foo1b(a: &T1, b: &T1) -> bool {
+    a == b
+}