InstCountCI: add dead cmpxchg case

not super optimizable but worth tracking.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Alyssa Rosenzweig committed 2024-03-30 14:12:59 -04:00
1 parent d25ace43aa
commit 6866c3d0ac
1 file changed
+32
@@ -284,6 +284,38 @@
"mov x26, x5",
"cmn wzr, w26, lsl #24"
]
},
"Dead cmpxchg flags": {
"ExpectedInstructionCount": 23,
"x86Insts": [
"cmpxchg8b [rbp]",
"test rax, rax"
],
"ExpectedArm64ASM": [
"add x20, x9, #0x0 (0)",
"mov w21, w4",
"mov w22, w6",
"mov w23, w22",
"mov w22, w21",
"mov w21, w7",
"mov w24, w5",
"mov w25, w24",
"mov w24, w21",
"mov w2, w22",
"mov w3, w23",
"caspal w2, w3, w24, w25, [x20]",
"mov w20, w2",
"mov w21, w3",
"mov w24, w20",
"mov w25, w21",
"cmp x20, x22",
"ccmp x21, x23, #nzcv, eq",
"cset x20, eq",
"rmif x20, #62, #nZcv",
"csel x4, x24, x4, ne",
"csel x6, x25, x6, ne",
"ands x26, x4, x4"
]
}
}
}