From 1fe337562001e9d1a4b7eefe5ba1909179ba3463 Mon Sep 17 00:00:00 2001 From: "Andrew V. Tischenko" Date: Tue, 7 Aug 2018 14:36:43 +0000 Subject: [PATCH] [X86] MCA tests for XCHG*, XADD* and CMPXCHG* instructions Differential Revision: https://reviews.llvm.org/D49912 llvm-svn: 339145 --- .../llvm-mca/X86/Atom/resources-x86_64.s | 95 ++++++++++++++++++- .../llvm-mca/X86/Broadwell/resources-x86_64.s | 95 ++++++++++++++++++- .../llvm-mca/X86/BtVer2/resources-x86_64.s | 95 ++++++++++++++++++- .../llvm-mca/X86/Generic/resources-x86_64.s | 95 ++++++++++++++++++- .../llvm-mca/X86/Haswell/resources-x86_64.s | 95 ++++++++++++++++++- .../tools/llvm-mca/X86/SLM/resources-x86_64.s | 95 ++++++++++++++++++- .../X86/SandyBridge/resources-x86_64.s | 95 ++++++++++++++++++- .../X86/SkylakeClient/resources-x86_64.s | 95 ++++++++++++++++++- .../X86/SkylakeServer/resources-x86_64.s | 95 ++++++++++++++++++- .../llvm-mca/X86/Znver1/resources-x86_64.s | 95 ++++++++++++++++++- 10 files changed, 940 insertions(+), 10 deletions(-) diff --git a/llvm/test/tools/llvm-mca/X86/Atom/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/Atom/resources-x86_64.s index 9ed16516810d..03f6c4d1f41e 100644 --- a/llvm/test/tools/llvm-mca/X86/Atom/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/Atom/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 3 1.50 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1 3 1.50 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1 3 1.50 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 1 9 4.50 cmpxchgb %cl, %bl +# CHECK-NEXT: 1 6 3.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 1 15 7.50 cmpxchgw %cx, %bx +# CHECK-NEXT: 1 14 7.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 1 15 7.50 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 1 14 7.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 1 15 7.50 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 1 14 7.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 1 121 60.50 U cpuid # CHECK-NEXT: 1 1 0.50 decb %dil # CHECK-NEXT: 1 1 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.50 testq %rsi, %rdi # CHECK-NEXT: 1 1 1.00 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.50 * U ud2 +# CHECK-NEXT: 1 2 1.00 xaddb %bl, %cl +# CHECK-NEXT: 1 3 1.50 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 1 2 1.00 xaddw %bx, %cx +# CHECK-NEXT: 1 3 1.50 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 1 2 1.00 xaddl %ebx, %ecx +# CHECK-NEXT: 1 3 1.50 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 1 2 1.00 xaddq %rbx, %rcx +# CHECK-NEXT: 1 3 1.50 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 1 2 1.00 xchgb %bl, %cl +# CHECK-NEXT: 1 3 1.50 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 1 2 1.00 xchgw %bx, %ax +# CHECK-NEXT: 1 2 1.00 xchgw %bx, %cx +# CHECK-NEXT: 1 3 1.50 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 1 2 1.00 xchgl %ebx, %eax +# CHECK-NEXT: 1 2 1.00 xchgl %ebx, %ecx +# CHECK-NEXT: 1 3 1.50 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 1 2 1.00 xchgq %rbx, %rax +# CHECK-NEXT: 1 2 1.00 xchgq %rbx, %rcx +# CHECK-NEXT: 1 3 1.50 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 6 3.00 * xlatb # CHECK-NEXT: 1 1 0.50 xorb $7, %al # CHECK-NEXT: 1 1 0.50 xorb $7, %dil @@ -1548,7 +1614,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] -# CHECK-NEXT: 2318.00 1977.00 +# CHECK-NEXT: 2392.00 2051.00 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] Instructions: @@ -1747,6 +1813,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1.50 1.50 cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1.50 1.50 cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1.50 1.50 cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 4.50 4.50 cmpxchgb %cl, %bl +# CHECK-NEXT: 3.00 3.00 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 7.50 7.50 cmpxchgw %cx, %bx +# CHECK-NEXT: 7.00 7.00 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 7.50 7.50 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 7.00 7.00 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 7.50 7.50 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 7.00 7.00 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 60.50 60.50 cpuid # CHECK-NEXT: 0.50 0.50 decb %dil # CHECK-NEXT: 1.00 - decb (%rax) @@ -2240,6 +2314,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 0.50 0.50 testq %rsi, %rdi # CHECK-NEXT: 1.00 - testq %rsi, (%rax) # CHECK-NEXT: 0.50 0.50 ud2 +# CHECK-NEXT: 1.00 1.00 xaddb %bl, %cl +# CHECK-NEXT: 1.50 1.50 xaddb %bl, (%rcx) +# CHECK-NEXT: 1.00 1.00 xaddw %bx, %cx +# CHECK-NEXT: 1.50 1.50 xaddw %ax, (%rbx) +# CHECK-NEXT: 1.00 1.00 xaddl %ebx, %ecx +# CHECK-NEXT: 1.50 1.50 xaddl %eax, (%rbx) +# CHECK-NEXT: 1.00 1.00 xaddq %rbx, %rcx +# CHECK-NEXT: 1.50 1.50 xaddq %rax, (%rbx) +# CHECK-NEXT: 1.00 1.00 xchgb %bl, %cl +# CHECK-NEXT: 1.50 1.50 xchgb %bl, (%rbx) +# CHECK-NEXT: 1.00 1.00 xchgw %bx, %ax +# CHECK-NEXT: 1.00 1.00 xchgw %bx, %cx +# CHECK-NEXT: 1.50 1.50 xchgw %ax, (%rbx) +# CHECK-NEXT: 1.00 1.00 xchgl %ebx, %eax +# CHECK-NEXT: 1.00 1.00 xchgl %ebx, %ecx +# CHECK-NEXT: 1.50 1.50 xchgl %eax, (%rbx) +# CHECK-NEXT: 1.00 1.00 xchgq %rbx, %rax +# CHECK-NEXT: 1.00 1.00 xchgq %rbx, %rcx +# CHECK-NEXT: 1.50 1.50 xchgq %rax, (%rbx) # CHECK-NEXT: 3.00 3.00 xlatb # CHECK-NEXT: 0.50 0.50 xorb $7, %al # CHECK-NEXT: 0.50 0.50 xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s index 18ab98029dea..653c17b14779 100644 --- a/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/Broadwell/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 100 0.25 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 5 5 1.25 cmpxchgb %cl, %bl +# CHECK-NEXT: 6 8 1.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgw %cx, %bx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 8 18 2.00 U cpuid # CHECK-NEXT: 1 1 0.25 decb %dil # CHECK-NEXT: 3 7 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.25 testq %rsi, %rdi # CHECK-NEXT: 2 6 0.50 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.25 * U ud2 +# CHECK-NEXT: 3 2 0.75 xaddb %bl, %cl +# CHECK-NEXT: 5 7 1.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 3 2 0.75 xaddw %bx, %cx +# CHECK-NEXT: 5 7 1.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddl %ebx, %ecx +# CHECK-NEXT: 5 7 1.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddq %rbx, %rcx +# CHECK-NEXT: 5 7 1.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgb %bl, %cl +# CHECK-NEXT: 6 8 1.00 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %ax +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %cx +# CHECK-NEXT: 6 8 1.00 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %eax +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %ecx +# CHECK-NEXT: 6 8 1.00 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rax +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rcx +# CHECK-NEXT: 6 8 1.00 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 5 0.50 * xlatb # CHECK-NEXT: 1 1 0.25 xorb $7, %al # CHECK-NEXT: 1 1 0.25 xorb $7, %dil @@ -1556,7 +1622,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] -# CHECK-NEXT: 50.00 - 469.00 317.50 252.17 252.17 190.00 227.00 501.50 78.67 +# CHECK-NEXT: 50.00 - 494.25 334.75 262.17 262.17 202.00 244.25 526.75 82.67 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions: @@ -1755,6 +1821,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgb %cl, %bl +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgw %cx, %bx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgl %ecx, %ebx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgq %rcx, %rbx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - 1.75 1.25 - - - 2.25 2.75 - cpuid # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - decb %dil # CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 decb (%rax) @@ -2248,6 +2322,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - testq %rsi, %rdi # CHECK-NEXT: - - 0.25 0.25 0.50 0.50 - 0.25 0.25 - testq %rsi, (%rax) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - ud2 +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddb %bl, %cl +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddb %bl, (%rcx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddw %bx, %cx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddl %ebx, %ecx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddq %rbx, %rcx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddq %rax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgb %bl, %cl +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgb %bl, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %ax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %cx +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %eax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %ecx +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rcx +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgq %rax, (%rbx) # CHECK-NEXT: - - - - 0.50 0.50 - - - - xlatb # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %al # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/BtVer2/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/BtVer2/resources-x86_64.s index f08fddf84e24..df1fa381d016 100644 --- a/llvm/test/tools/llvm-mca/X86/BtVer2/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/BtVer2/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 100 0.50 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.50 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.50 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 1 1 0.50 cmpxchgb %cl, %bl +# CHECK-NEXT: 2 4 1.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 1 1 0.50 cmpxchgw %cx, %bx +# CHECK-NEXT: 2 4 1.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 1 1 0.50 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 2 4 1.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 1 1 0.50 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 2 4 1.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 1 100 0.50 U cpuid # CHECK-NEXT: 1 1 0.50 decb %dil # CHECK-NEXT: 2 5 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.50 testq %rsi, %rdi # CHECK-NEXT: 1 4 1.00 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.50 * U ud2 +# CHECK-NEXT: 1 1 0.50 xaddb %bl, %cl +# CHECK-NEXT: 2 4 1.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 1 1 0.50 xaddw %bx, %cx +# CHECK-NEXT: 2 4 1.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xaddl %ebx, %ecx +# CHECK-NEXT: 2 4 1.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xaddq %rbx, %rcx +# CHECK-NEXT: 2 4 1.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgb %bl, %cl +# CHECK-NEXT: 2 4 1.00 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgw %bx, %ax +# CHECK-NEXT: 1 1 0.50 xchgw %bx, %cx +# CHECK-NEXT: 2 4 1.00 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgl %ebx, %eax +# CHECK-NEXT: 1 1 0.50 xchgl %ebx, %ecx +# CHECK-NEXT: 2 4 1.00 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgq %rbx, %rax +# CHECK-NEXT: 1 1 0.50 xchgq %rbx, %rcx +# CHECK-NEXT: 2 4 1.00 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 5 1.00 * xlatb # CHECK-NEXT: 1 1 0.50 xorb $7, %al # CHECK-NEXT: 1 1 0.50 xorb $7, %dil @@ -1560,7 +1626,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] -# CHECK-NEXT: 544.00 594.00 380.00 - - - - 307.00 64.00 211.00 - - - - +# CHECK-NEXT: 557.50 607.50 380.00 - - - - 319.00 64.00 223.00 - - - - # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: @@ -1759,6 +1825,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cmpxchgb %cl, %bl +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cmpxchgw %cx, %bx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cmpxchgl %ecx, %ebx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cmpxchgq %rcx, %rbx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - cpuid # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - decb %dil # CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - decb (%rax) @@ -2252,6 +2326,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - testq %rsi, %rdi # CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - - - - - - testq %rsi, (%rax) # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - ud2 +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xaddb %bl, %cl +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xaddb %bl, (%rcx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xaddw %bx, %cx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xaddw %ax, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xaddl %ebx, %ecx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xaddl %eax, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xaddq %rbx, %rcx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xaddq %rax, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xchgb %bl, %cl +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xchgb %bl, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xchgw %bx, %ax +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xchgw %bx, %cx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xchgw %ax, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xchgl %ebx, %eax +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xchgl %ebx, %ecx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xchgl %eax, (%rbx) +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xchgq %rbx, %rax +# CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xchgq %rbx, %rcx +# CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - 1.00 - - - - xchgq %rax, (%rbx) # CHECK-NEXT: - - - - - - - 1.00 - - - - - - xlatb # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xorb $7, %al # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/Generic/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/Generic/resources-x86_64.s index d94b8dd659b3..3e671410b5eb 100644 --- a/llvm/test/tools/llvm-mca/X86/Generic/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/Generic/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 5 8 1.00 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 5 8 1.00 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 5 8 1.00 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 4 5 1.33 cmpxchgb %cl, %bl +# CHECK-NEXT: 4 8 1.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 4 5 1.33 cmpxchgw %cx, %bx +# CHECK-NEXT: 4 8 1.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 4 5 1.33 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 4 8 1.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 4 5 1.33 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 4 8 1.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 1 100 0.33 U cpuid # CHECK-NEXT: 1 1 0.33 decb %dil # CHECK-NEXT: 3 7 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.33 testq %rsi, %rdi # CHECK-NEXT: 2 6 0.50 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.33 * U ud2 +# CHECK-NEXT: 3 2 1.00 xaddb %bl, %cl +# CHECK-NEXT: 5 8 1.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 3 2 1.00 xaddw %bx, %cx +# CHECK-NEXT: 5 8 1.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xaddl %ebx, %ecx +# CHECK-NEXT: 5 8 1.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xaddq %rbx, %rcx +# CHECK-NEXT: 5 8 1.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgb %bl, %cl +# CHECK-NEXT: 3 6 1.00 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgw %bx, %ax +# CHECK-NEXT: 3 2 1.00 xchgw %bx, %cx +# CHECK-NEXT: 3 6 1.00 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgl %ebx, %eax +# CHECK-NEXT: 3 2 1.00 xchgl %ebx, %ecx +# CHECK-NEXT: 3 6 1.00 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgq %rbx, %rax +# CHECK-NEXT: 3 2 1.00 xchgq %rbx, %rcx +# CHECK-NEXT: 3 6 1.00 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 5 0.50 * xlatb # CHECK-NEXT: 1 1 0.33 xorb $7, %al # CHECK-NEXT: 1 1 0.33 xorb $7, %dil @@ -1554,7 +1620,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] -# CHECK-NEXT: 160.00 - 413.50 201.00 234.00 405.50 280.00 280.00 +# CHECK-NEXT: 160.00 - 438.50 224.00 242.00 430.50 290.00 290.00 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions: @@ -1753,6 +1819,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 1.00 1.00 - 1.00 1.00 1.00 cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - 1.00 1.00 - 1.00 1.00 1.00 cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - 1.00 1.00 - 1.00 1.00 1.00 cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgb %cl, %bl +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgw %cx, %bx +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgl %ecx, %ebx +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgq %rcx, %rbx +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - cpuid # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - decb %dil # CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 decb (%rax) @@ -2246,6 +2320,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - testq %rsi, %rdi # CHECK-NEXT: - - 0.33 0.33 - 0.33 0.50 0.50 testq %rsi, (%rax) # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - ud2 +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddb %bl, %cl +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddb %bl, (%rcx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddw %bx, %cx +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddw %ax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddl %ebx, %ecx +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddl %eax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddq %rbx, %rcx +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddq %rax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgb %bl, %cl +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgb %bl, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgw %bx, %ax +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgw %bx, %cx +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgw %ax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgl %ebx, %eax +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgl %ebx, %ecx +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgl %eax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgq %rbx, %rax +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgq %rbx, %rcx +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgq %rax, (%rbx) # CHECK-NEXT: - - - - - - 0.50 0.50 xlatb # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - xorb $7, %al # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s index 517c1bcfff8b..d4bf62d26b95 100644 --- a/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/Haswell/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 5 4 1.00 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 5 4 1.00 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 5 4 1.00 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 5 5 1.25 cmpxchgb %cl, %bl +# CHECK-NEXT: 6 9 1.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgw %cx, %bx +# CHECK-NEXT: 6 9 1.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 6 9 1.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 6 9 1.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 8 18 2.00 U cpuid # CHECK-NEXT: 1 1 0.25 decb %dil # CHECK-NEXT: 3 7 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.25 testq %rsi, %rdi # CHECK-NEXT: 2 6 0.50 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.25 * U ud2 +# CHECK-NEXT: 3 2 0.75 xaddb %bl, %cl +# CHECK-NEXT: 5 8 1.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 3 2 0.75 xaddw %bx, %cx +# CHECK-NEXT: 5 8 1.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddl %ebx, %ecx +# CHECK-NEXT: 5 8 1.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddq %rbx, %rcx +# CHECK-NEXT: 5 8 1.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgb %bl, %cl +# CHECK-NEXT: 6 9 1.00 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %ax +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %cx +# CHECK-NEXT: 6 9 1.00 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %eax +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %ecx +# CHECK-NEXT: 6 9 1.00 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rax +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rcx +# CHECK-NEXT: 6 9 1.00 * * xchgq %rax, (%rbx) # CHECK-NEXT: 3 7 0.75 * xlatb # CHECK-NEXT: 1 1 0.25 xorb $7, %al # CHECK-NEXT: 1 1 0.25 xorb $7, %dil @@ -1556,7 +1622,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] -# CHECK-NEXT: 80.00 - 523.50 342.00 252.67 252.67 185.00 253.50 585.00 75.67 +# CHECK-NEXT: 80.00 - 548.75 359.25 262.67 262.67 197.00 270.75 610.25 79.67 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions: @@ -1755,6 +1821,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.75 0.75 1.00 1.00 - 0.75 0.75 - cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.75 0.75 1.00 1.00 - 0.75 0.75 - cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.75 0.75 1.00 1.00 - 0.75 0.75 - cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgb %cl, %bl +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgw %cx, %bx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgl %ecx, %ebx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgq %rcx, %rbx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - 1.75 1.25 - - - 2.25 2.75 - cpuid # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - decb %dil # CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 decb (%rax) @@ -2248,6 +2322,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - testq %rsi, %rdi # CHECK-NEXT: - - 0.25 0.25 0.50 0.50 - 0.25 0.25 - testq %rsi, (%rax) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - ud2 +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddb %bl, %cl +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddb %bl, (%rcx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddw %bx, %cx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddl %ebx, %ecx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddq %rbx, %rcx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddq %rax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgb %bl, %cl +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgb %bl, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %ax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %cx +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %eax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %ecx +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rcx +# CHECK-NEXT: - - 0.75 0.75 0.83 0.83 1.00 0.75 0.75 0.33 xchgq %rax, (%rbx) # CHECK-NEXT: - - - - - - - - - - xlatb # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %al # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/SLM/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/SLM/resources-x86_64.s index 2fb1bb808d33..6a8f132e13bc 100644 --- a/llvm/test/tools/llvm-mca/X86/SLM/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/SLM/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 100 1.00 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 1.00 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 1.00 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 1 1 0.50 cmpxchgb %cl, %bl +# CHECK-NEXT: 2 4 2.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 1 1 0.50 cmpxchgw %cx, %bx +# CHECK-NEXT: 2 4 2.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 1 1 0.50 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 2 4 2.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 1 1 0.50 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 2 4 2.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 1 100 1.00 U cpuid # CHECK-NEXT: 1 1 0.50 decb %dil # CHECK-NEXT: 2 5 2.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.50 testq %rsi, %rdi # CHECK-NEXT: 1 4 1.00 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 1.00 * U ud2 +# CHECK-NEXT: 1 1 0.50 xaddb %bl, %cl +# CHECK-NEXT: 2 4 2.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 1 1 0.50 xaddw %bx, %cx +# CHECK-NEXT: 2 4 2.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xaddl %ebx, %ecx +# CHECK-NEXT: 2 4 2.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xaddq %rbx, %rcx +# CHECK-NEXT: 2 4 2.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgb %bl, %cl +# CHECK-NEXT: 2 4 2.00 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgw %bx, %ax +# CHECK-NEXT: 1 1 0.50 xchgw %bx, %cx +# CHECK-NEXT: 2 4 2.00 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgl %ebx, %eax +# CHECK-NEXT: 1 1 0.50 xchgl %ebx, %ecx +# CHECK-NEXT: 2 4 2.00 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 1 1 0.50 xchgq %rbx, %rax +# CHECK-NEXT: 1 1 0.50 xchgq %rbx, %rcx +# CHECK-NEXT: 2 4 2.00 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 3 1.00 * xlatb # CHECK-NEXT: 1 1 0.50 xorb $7, %al # CHECK-NEXT: 1 1 0.50 xorb $7, %dil @@ -1554,7 +1620,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] -# CHECK-NEXT: 400.00 - - 41.00 - 582.00 424.00 530.00 +# CHECK-NEXT: 400.00 - - 41.00 - 595.50 437.50 554.00 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions: @@ -1753,6 +1819,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - - 1.00 - - - - cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - - 1.00 - - - - cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - - 1.00 - - - - cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - - - - 0.50 0.50 - cmpxchgb %cl, %bl +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - cmpxchgw %cx, %bx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - cmpxchgl %ecx, %ebx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - cmpxchgq %rcx, %rbx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - - 1.00 - - - - cpuid # CHECK-NEXT: - - - - - 0.50 0.50 - decb %dil # CHECK-NEXT: - - - - - 1.00 1.00 2.00 decb (%rax) @@ -2246,6 +2320,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - - - - 0.50 0.50 - testq %rsi, %rdi # CHECK-NEXT: - - - - - 0.50 0.50 1.00 testq %rsi, (%rax) # CHECK-NEXT: - - - 1.00 - - - - ud2 +# CHECK-NEXT: - - - - - 0.50 0.50 - xaddb %bl, %cl +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xaddb %bl, (%rcx) +# CHECK-NEXT: - - - - - 0.50 0.50 - xaddw %bx, %cx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xaddw %ax, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - xaddl %ebx, %ecx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xaddl %eax, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - xaddq %rbx, %rcx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xaddq %rax, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - xchgb %bl, %cl +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xchgb %bl, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - xchgw %bx, %ax +# CHECK-NEXT: - - - - - 0.50 0.50 - xchgw %bx, %cx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xchgw %ax, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - xchgl %ebx, %eax +# CHECK-NEXT: - - - - - 0.50 0.50 - xchgl %ebx, %ecx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xchgl %eax, (%rbx) +# CHECK-NEXT: - - - - - 0.50 0.50 - xchgq %rbx, %rax +# CHECK-NEXT: - - - - - 0.50 0.50 - xchgq %rbx, %rcx +# CHECK-NEXT: - - - - - 0.50 0.50 2.00 xchgq %rax, (%rbx) # CHECK-NEXT: - - - - - - - 1.00 xlatb # CHECK-NEXT: - - - - - 0.50 0.50 - xorb $7, %al # CHECK-NEXT: - - - - - 0.50 0.50 - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/SandyBridge/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/SandyBridge/resources-x86_64.s index dd83d6752894..d3184bd4e54e 100644 --- a/llvm/test/tools/llvm-mca/X86/SandyBridge/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/SandyBridge/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 5 8 1.00 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 5 8 1.00 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 5 8 1.00 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 4 5 1.33 cmpxchgb %cl, %bl +# CHECK-NEXT: 4 8 1.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 4 5 1.33 cmpxchgw %cx, %bx +# CHECK-NEXT: 4 8 1.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 4 5 1.33 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 4 8 1.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 4 5 1.33 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 4 8 1.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 1 100 0.33 U cpuid # CHECK-NEXT: 1 1 0.33 decb %dil # CHECK-NEXT: 3 7 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.33 testq %rsi, %rdi # CHECK-NEXT: 2 6 0.50 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.33 * U ud2 +# CHECK-NEXT: 3 2 1.00 xaddb %bl, %cl +# CHECK-NEXT: 5 8 1.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 3 2 1.00 xaddw %bx, %cx +# CHECK-NEXT: 5 8 1.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xaddl %ebx, %ecx +# CHECK-NEXT: 5 8 1.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xaddq %rbx, %rcx +# CHECK-NEXT: 5 8 1.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgb %bl, %cl +# CHECK-NEXT: 3 6 1.00 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgw %bx, %ax +# CHECK-NEXT: 3 2 1.00 xchgw %bx, %cx +# CHECK-NEXT: 3 6 1.00 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgl %ebx, %eax +# CHECK-NEXT: 3 2 1.00 xchgl %ebx, %ecx +# CHECK-NEXT: 3 6 1.00 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 3 2 1.00 xchgq %rbx, %rax +# CHECK-NEXT: 3 2 1.00 xchgq %rbx, %rcx +# CHECK-NEXT: 3 6 1.00 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 5 0.50 * xlatb # CHECK-NEXT: 1 1 0.33 xorb $7, %al # CHECK-NEXT: 1 1 0.33 xorb $7, %dil @@ -1554,7 +1620,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] -# CHECK-NEXT: 160.00 - 413.50 201.00 234.00 405.50 280.00 280.00 +# CHECK-NEXT: 160.00 - 438.50 224.00 242.00 430.50 290.00 290.00 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions: @@ -1753,6 +1819,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 1.00 1.00 - 1.00 1.00 1.00 cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - 1.00 1.00 - 1.00 1.00 1.00 cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - 1.00 1.00 - 1.00 1.00 1.00 cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgb %cl, %bl +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgw %cx, %bx +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgl %ecx, %ebx +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - 1.50 1.00 - 1.50 - - cmpxchgq %rcx, %rbx +# CHECK-NEXT: - - 1.00 1.00 - 1.00 0.50 0.50 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - cpuid # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - decb %dil # CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 decb (%rax) @@ -2246,6 +2320,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - testq %rsi, %rdi # CHECK-NEXT: - - 0.33 0.33 - 0.33 0.50 0.50 testq %rsi, (%rax) # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - ud2 +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddb %bl, %cl +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddb %bl, (%rcx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddw %bx, %cx +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddw %ax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddl %ebx, %ecx +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddl %eax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xaddq %rbx, %rcx +# CHECK-NEXT: - - 0.67 0.67 1.00 0.67 1.00 1.00 xaddq %rax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgb %bl, %cl +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgb %bl, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgw %bx, %ax +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgw %bx, %cx +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgw %ax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgl %ebx, %eax +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgl %ebx, %ecx +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgl %eax, (%rbx) +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgq %rbx, %rax +# CHECK-NEXT: - - 1.00 1.00 - 1.00 - - xchgq %rbx, %rcx +# CHECK-NEXT: - - 0.33 0.33 1.00 0.33 1.00 1.00 xchgq %rax, (%rbx) # CHECK-NEXT: - - - - - - 0.50 0.50 xlatb # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - xorb $7, %al # CHECK-NEXT: - - 0.33 0.33 - 0.33 - - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s index fc5b7cbc4ab4..d6622ce8cd90 100644 --- a/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/SkylakeClient/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 100 0.25 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 5 5 1.25 cmpxchgb %cl, %bl +# CHECK-NEXT: 6 8 1.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgw %cx, %bx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 8 18 2.00 U cpuid # CHECK-NEXT: 1 1 0.25 decb %dil # CHECK-NEXT: 3 7 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.25 testq %rsi, %rdi # CHECK-NEXT: 2 6 0.50 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.25 * U ud2 +# CHECK-NEXT: 3 2 0.75 xaddb %bl, %cl +# CHECK-NEXT: 5 7 1.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 3 2 0.75 xaddw %bx, %cx +# CHECK-NEXT: 5 7 1.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddl %ebx, %ecx +# CHECK-NEXT: 5 7 1.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddq %rbx, %rcx +# CHECK-NEXT: 5 7 1.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgb %bl, %cl +# CHECK-NEXT: 8 10 1.25 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %ax +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %cx +# CHECK-NEXT: 8 10 1.25 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %eax +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %ecx +# CHECK-NEXT: 8 10 1.25 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rax +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rcx +# CHECK-NEXT: 8 10 1.25 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 5 0.50 * xlatb # CHECK-NEXT: 1 1 0.25 xorb $7, %al # CHECK-NEXT: 1 1 0.25 xorb $7, %dil @@ -1556,7 +1622,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] -# CHECK-NEXT: 60.00 - 537.25 297.25 252.17 252.17 190.00 261.75 588.75 78.67 +# CHECK-NEXT: 60.00 - 564.50 314.50 262.17 262.17 202.00 279.00 620.00 82.67 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions: @@ -1755,6 +1821,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgb %cl, %bl +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgw %cx, %bx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgl %ecx, %ebx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgq %rcx, %rbx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - 1.75 1.25 - - - 2.25 2.75 - cpuid # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - decb %dil # CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 decb (%rax) @@ -2248,6 +2322,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - testq %rsi, %rdi # CHECK-NEXT: - - 0.25 0.25 0.50 0.50 - 0.25 0.25 - testq %rsi, (%rax) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - ud2 +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddb %bl, %cl +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddb %bl, (%rcx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddw %bx, %cx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddl %ebx, %ecx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddq %rbx, %rcx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddq %rax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgb %bl, %cl +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgb %bl, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %ax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %cx +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %eax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %ecx +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rcx +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgq %rax, (%rbx) # CHECK-NEXT: - - - - 0.50 0.50 - - - - xlatb # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %al # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/SkylakeServer/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/SkylakeServer/resources-x86_64.s index c9f27e5e3d6a..803900e5d6dc 100644 --- a/llvm/test/tools/llvm-mca/X86/SkylakeServer/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/SkylakeServer/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 100 0.25 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 5 5 1.25 cmpxchgb %cl, %bl +# CHECK-NEXT: 6 8 1.00 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgw %cx, %bx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 5 5 1.25 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 6 8 1.00 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 8 18 2.00 U cpuid # CHECK-NEXT: 1 1 0.25 decb %dil # CHECK-NEXT: 3 7 1.00 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.25 testq %rsi, %rdi # CHECK-NEXT: 2 6 0.50 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.25 * U ud2 +# CHECK-NEXT: 3 2 0.75 xaddb %bl, %cl +# CHECK-NEXT: 5 7 1.00 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 3 2 0.75 xaddw %bx, %cx +# CHECK-NEXT: 5 7 1.00 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddl %ebx, %ecx +# CHECK-NEXT: 5 7 1.00 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xaddq %rbx, %rcx +# CHECK-NEXT: 5 7 1.00 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgb %bl, %cl +# CHECK-NEXT: 8 10 1.25 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %ax +# CHECK-NEXT: 3 2 0.75 xchgw %bx, %cx +# CHECK-NEXT: 8 10 1.25 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %eax +# CHECK-NEXT: 3 2 0.75 xchgl %ebx, %ecx +# CHECK-NEXT: 8 10 1.25 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rax +# CHECK-NEXT: 3 2 0.75 xchgq %rbx, %rcx +# CHECK-NEXT: 8 10 1.25 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 5 0.50 * xlatb # CHECK-NEXT: 1 1 0.25 xorb $7, %al # CHECK-NEXT: 1 1 0.25 xorb $7, %dil @@ -1556,7 +1622,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] -# CHECK-NEXT: 60.00 - 537.50 297.50 252.17 252.17 190.00 262.00 589.00 78.67 +# CHECK-NEXT: 60.00 - 564.75 314.75 262.17 262.17 202.00 279.25 620.25 82.67 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] Instructions: @@ -1755,6 +1821,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgb %cl, %bl +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgw %cx, %bx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgl %ecx, %ebx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - 1.75 0.75 - - - 0.75 1.75 - cmpxchgq %rcx, %rbx +# CHECK-NEXT: - - 1.25 0.25 0.83 0.83 1.00 0.25 1.25 0.33 cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - 1.75 1.25 - - - 2.25 2.75 - cpuid # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - decb %dil # CHECK-NEXT: - - 0.25 0.25 0.83 0.83 1.00 0.25 0.25 0.33 decb (%rax) @@ -2248,6 +2322,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - testq %rsi, %rdi # CHECK-NEXT: - - 0.25 0.25 0.50 0.50 - 0.25 0.25 - testq %rsi, (%rax) # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - ud2 +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddb %bl, %cl +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddb %bl, (%rcx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddw %bx, %cx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddl %ebx, %ecx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xaddq %rbx, %rcx +# CHECK-NEXT: - - 0.50 0.50 0.83 0.83 1.00 0.50 0.50 0.33 xaddq %rax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgb %bl, %cl +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgb %bl, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %ax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgw %bx, %cx +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgw %ax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %eax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgl %ebx, %ecx +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgl %eax, (%rbx) +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rax +# CHECK-NEXT: - - 0.75 0.75 - - - 0.75 0.75 - xchgq %rbx, %rcx +# CHECK-NEXT: - - 1.25 0.75 0.83 0.83 1.00 0.75 2.25 0.33 xchgq %rax, (%rbx) # CHECK-NEXT: - - - - 0.50 0.50 - - - - xlatb # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %al # CHECK-NEXT: - - 0.25 0.25 - - - 0.25 0.25 - xorb $7, %dil diff --git a/llvm/test/tools/llvm-mca/X86/Znver1/resources-x86_64.s b/llvm/test/tools/llvm-mca/X86/Znver1/resources-x86_64.s index a592ed2a0f4e..5a6eed42f7e8 100644 --- a/llvm/test/tools/llvm-mca/X86/Znver1/resources-x86_64.s +++ b/llvm/test/tools/llvm-mca/X86/Znver1/resources-x86_64.s @@ -222,6 +222,18 @@ cmpsw cmpsl cmpsq +cmpxchgb %cl, %bl +cmpxchgb %cl, (%rbx) + +cmpxchgw %cx, %bx +cmpxchgw %cx, (%rbx) + +cmpxchgl %ecx, %ebx +cmpxchgl %ecx, (%rbx) + +cmpxchgq %rcx, %rbx +cmpxchgq %rcx, (%rbx) + cpuid decb %dil @@ -777,6 +789,33 @@ testq %rsi, (%rax) ud2 +xaddb %bl, %cl +xaddb %bl, (%rcx) + +xaddw %bx, %cx +xaddw %ax, (%rbx) + +xaddl %ebx, %ecx +xaddl %eax, (%rbx) + +xaddq %rbx, %rcx +xaddq %rax, (%rbx) + +xchgb %bl, %cl +xchgb %bl, (%rbx) + +xchgw %ax, %bx +xchgw %bx, %cx +xchgw %ax, (%rbx) + +xchgl %eax, %ebx +xchgl %ebx, %ecx +xchgl %eax, (%rbx) + +xchgq %rax, %rbx +xchgq %rbx, %rcx +xchgq %rax, (%rbx) + xlatb xorb $7, %al @@ -1017,6 +1056,14 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 100 0.25 U cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: 1 100 0.25 U cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: 1 1 0.25 cmpxchgb %cl, %bl +# CHECK-NEXT: 5 8 0.50 * * cmpxchgb %cl, (%rbx) +# CHECK-NEXT: 1 1 0.25 cmpxchgw %cx, %bx +# CHECK-NEXT: 5 8 0.50 * * cmpxchgw %cx, (%rbx) +# CHECK-NEXT: 1 1 0.25 cmpxchgl %ecx, %ebx +# CHECK-NEXT: 5 8 0.50 * * cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: 1 1 0.25 cmpxchgq %rcx, %rbx +# CHECK-NEXT: 5 8 0.50 * * cmpxchgq %rcx, (%rbx) # CHECK-NEXT: 1 100 0.25 U cpuid # CHECK-NEXT: 1 1 0.25 decb %dil # CHECK-NEXT: 2 5 0.50 * * decb (%rax) @@ -1510,6 +1557,25 @@ xorq (%rax), %rdi # CHECK-NEXT: 1 1 0.25 testq %rsi, %rdi # CHECK-NEXT: 2 5 0.50 * testq %rsi, (%rax) # CHECK-NEXT: 1 100 0.25 * U ud2 +# CHECK-NEXT: 1 1 0.25 xaddb %bl, %cl +# CHECK-NEXT: 1 100 0.25 * * xaddb %bl, (%rcx) +# CHECK-NEXT: 1 1 0.25 xaddw %bx, %cx +# CHECK-NEXT: 1 100 0.25 * * xaddw %ax, (%rbx) +# CHECK-NEXT: 1 1 0.25 xaddl %ebx, %ecx +# CHECK-NEXT: 1 100 0.25 * * xaddl %eax, (%rbx) +# CHECK-NEXT: 1 1 0.25 xaddq %rbx, %rcx +# CHECK-NEXT: 1 100 0.25 * * xaddq %rax, (%rbx) +# CHECK-NEXT: 2 1 0.50 xchgb %bl, %cl +# CHECK-NEXT: 2 5 0.50 * * xchgb %bl, (%rbx) +# CHECK-NEXT: 2 1 0.50 xchgw %bx, %ax +# CHECK-NEXT: 2 1 0.50 xchgw %bx, %cx +# CHECK-NEXT: 2 5 0.50 * * xchgw %ax, (%rbx) +# CHECK-NEXT: 2 1 0.50 xchgl %ebx, %eax +# CHECK-NEXT: 2 1 0.50 xchgl %ebx, %ecx +# CHECK-NEXT: 2 5 0.50 * * xchgl %eax, (%rbx) +# CHECK-NEXT: 2 1 0.50 xchgq %rbx, %rax +# CHECK-NEXT: 2 1 0.50 xchgq %rbx, %rcx +# CHECK-NEXT: 2 5 0.50 * * xchgq %rax, (%rbx) # CHECK-NEXT: 1 100 0.25 * xlatb # CHECK-NEXT: 1 1 0.25 xorb $7, %al # CHECK-NEXT: 1 1 0.25 xorb $7, %dil @@ -1558,7 +1624,7 @@ xorq (%rax), %rdi # CHECK: Resource pressure per iteration: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] -# CHECK-NEXT: 161.00 161.00 146.00 180.00 162.00 146.00 392.00 - - - - 34.00 +# CHECK-NEXT: 165.00 165.00 153.50 187.50 169.50 153.50 392.00 - - - - 34.00 # CHECK: Resource pressure by instruction: # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] Instructions: @@ -1757,6 +1823,14 @@ xorq (%rax), %rdi # CHECK-NEXT: - - - - - - - - - - - - cmpsw %es:(%rdi), (%rsi) # CHECK-NEXT: - - - - - - - - - - - - cmpsl %es:(%rdi), (%rsi) # CHECK-NEXT: - - - - - - - - - - - - cmpsq %es:(%rdi), (%rsi) +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - cmpxchgb %cl, %bl +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - cmpxchgb %cl, (%rbx) +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - cmpxchgw %cx, %bx +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - cmpxchgw %cx, (%rbx) +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - cmpxchgl %ecx, %ebx +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - cmpxchgl %ecx, (%rbx) +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - cmpxchgq %rcx, %rbx +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - cmpxchgq %rcx, (%rbx) # CHECK-NEXT: - - - - - - - - - - - - cpuid # CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - decb %dil # CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - decb (%rax) @@ -2250,6 +2324,25 @@ xorq (%rax), %rdi # CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - testq %rsi, %rdi # CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - testq %rsi, (%rax) # CHECK-NEXT: - - - - - - - - - - - - ud2 +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - xaddb %bl, %cl +# CHECK-NEXT: - - - - - - - - - - - - xaddb %bl, (%rcx) +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - xaddw %bx, %cx +# CHECK-NEXT: - - - - - - - - - - - - xaddw %ax, (%rbx) +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - xaddl %ebx, %ecx +# CHECK-NEXT: - - - - - - - - - - - - xaddl %eax, (%rbx) +# CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - xaddq %rbx, %rcx +# CHECK-NEXT: - - - - - - - - - - - - xaddq %rax, (%rbx) +# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - xchgb %bl, %cl +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - xchgb %bl, (%rbx) +# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - xchgw %bx, %ax +# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - xchgw %bx, %cx +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - xchgw %ax, (%rbx) +# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - xchgl %ebx, %eax +# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - xchgl %ebx, %ecx +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - xchgl %eax, (%rbx) +# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - xchgq %rbx, %rax +# CHECK-NEXT: - - 0.50 0.50 0.50 0.50 - - - - - - xchgq %rbx, %rcx +# CHECK-NEXT: 0.50 0.50 0.25 0.25 0.25 0.25 - - - - - - xchgq %rax, (%rbx) # CHECK-NEXT: - - - - - - - - - - - - xlatb # CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - xorb $7, %al # CHECK-NEXT: - - 0.25 0.25 0.25 0.25 - - - - - - xorb $7, %dil