We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
eq
1 parent cd90d5c commit 11b0e9aCopy full SHA for 11b0e9a
tests/assembly/manual-eq-efficient.rs
@@ -0,0 +1,22 @@
1
+// Regression test for #106269
2
+//@ assembly-output: emit-asm
3
+//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
4
+//@ only-x86_64
5
+//@ ignore-sgx
6
+
7
+pub struct S {
8
+ a: u8,
9
+ b: u8,
10
+ c: u8,
11
+ d: u8,
12
+}
13
14
+// CHECK-LABEL: manual_eq:
15
+#[no_mangle]
16
+pub fn manual_eq(s1: &S, s2: &S) -> bool {
17
+ // CHECK: mov [[REG:[a-z0-9]+]], dword ptr [{{[a-z0-9]+}}]
18
+ // CHECK-NEXT: cmp [[REG]], dword ptr [{{[a-z0-9]+}}]
19
+ // CHECK-NEXT: sete al
20
+ // CHECK-NEXT: ret
21
+ s1.a == s2.a && s1.b == s2.b && s1.c == s2.c && s1.d == s2.d
22
0 commit comments