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 1af717dCopy full SHA for 1af717d
tests/assembly/manual-eq-efficient.rs
@@ -0,0 +1,25 @@
1
+// Regression test for #106269
2
+//@ revisions: WIN LIN
3
+//@ [WIN] only-windows
4
+//@ [LIN] only-linux
5
+//@ assembly-output: emit-asm
6
+//@ compile-flags: --crate-type=lib -O -C llvm-args=-x86-asm-syntax=intel
7
+//@ only-x86_64
8
+//@ ignore-sgx
9
+
10
+pub struct S {
11
+ a: u8,
12
+ b: u8,
13
+ c: u8,
14
+ d: u8,
15
+}
16
17
+// CHECK-LABEL: manual_eq:
18
+#[no_mangle]
19
+pub fn manual_eq(s1: &S, s2: &S) -> bool {
20
+ // CHECK: mov [[REG:[a-z0-9]+]], dword ptr [{{rdi|rcx}}]
21
+ // CHECK-NEXT: cmp [[REG]], dword ptr [{{rsi|rdx}}]
22
+ // CHECK-NEXT: sete al
23
+ // CHECK-NEXT: ret
24
+ s1.a == s2.a && s1.b == s2.b && s1.c == s2.c && s1.d == s2.d
25
0 commit comments