1# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver2 -instruction-tables < %s | FileCheck %s
3
4andn        %eax, %ebx, %ecx
5andn        (%rax), %ebx, %ecx
6
7andn        %rax, %rbx, %rcx
8andn        (%rax), %rbx, %rcx
9
10bextr       %eax, %ebx, %ecx
11bextr       %eax, (%rbx), %ecx
12
13bextr       %rax, %rbx, %rcx
14bextr       %rax, (%rbx), %rcx
15
16blsi        %eax, %ecx
17blsi        (%rax), %ecx
18
19blsi        %rax, %rcx
20blsi        (%rax), %rcx
21
22blsmsk      %eax, %ecx
23blsmsk      (%rax), %ecx
24
25blsmsk      %rax, %rcx
26blsmsk      (%rax), %rcx
27
28blsr        %eax, %ecx
29blsr        (%rax), %ecx
30
31blsr        %rax, %rcx
32blsr        (%rax), %rcx
33
34tzcnt       %ax, %cx
35tzcnt       (%rax), %cx
36
37tzcnt       %eax, %ecx
38tzcnt       (%rax), %ecx
39
40tzcnt       %rax, %rcx
41tzcnt       (%rax), %rcx
42
43# CHECK:      Instruction Info:
44# CHECK-NEXT: [1]: #uOps
45# CHECK-NEXT: [2]: Latency
46# CHECK-NEXT: [3]: RThroughput
47# CHECK-NEXT: [4]: MayLoad
48# CHECK-NEXT: [5]: MayStore
49# CHECK-NEXT: [6]: HasSideEffects (U)
50
51# CHECK:      [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
52# CHECK-NEXT:  1      1     0.25                        andnl	%eax, %ebx, %ecx
53# CHECK-NEXT:  2      5     0.33    *                   andnl	(%rax), %ebx, %ecx
54# CHECK-NEXT:  1      1     0.25                        andnq	%rax, %rbx, %rcx
55# CHECK-NEXT:  2      5     0.33    *                   andnq	(%rax), %rbx, %rcx
56# CHECK-NEXT:  1      1     0.25                        bextrl	%eax, %ebx, %ecx
57# CHECK-NEXT:  2      5     0.33    *                   bextrl	%eax, (%rbx), %ecx
58# CHECK-NEXT:  1      1     0.25                        bextrq	%rax, %rbx, %rcx
59# CHECK-NEXT:  2      5     0.33    *                   bextrq	%rax, (%rbx), %rcx
60# CHECK-NEXT:  1      2     0.25                        blsil	%eax, %ecx
61# CHECK-NEXT:  1      6     0.33    *                   blsil	(%rax), %ecx
62# CHECK-NEXT:  1      2     0.25                        blsiq	%rax, %rcx
63# CHECK-NEXT:  1      6     0.33    *                   blsiq	(%rax), %rcx
64# CHECK-NEXT:  1      2     0.25                        blsmskl	%eax, %ecx
65# CHECK-NEXT:  1      6     0.33    *                   blsmskl	(%rax), %ecx
66# CHECK-NEXT:  1      2     0.25                        blsmskq	%rax, %rcx
67# CHECK-NEXT:  1      6     0.33    *                   blsmskq	(%rax), %rcx
68# CHECK-NEXT:  1      2     0.25                        blsrl	%eax, %ecx
69# CHECK-NEXT:  1      6     0.33    *                   blsrl	(%rax), %ecx
70# CHECK-NEXT:  1      2     0.25                        blsrq	%rax, %rcx
71# CHECK-NEXT:  1      6     0.33    *                   blsrq	(%rax), %rcx
72# CHECK-NEXT:  1      2     0.25                        tzcntw	%ax, %cx
73# CHECK-NEXT:  2      6     0.33    *                   tzcntw	(%rax), %cx
74# CHECK-NEXT:  1      2     0.25                        tzcntl	%eax, %ecx
75# CHECK-NEXT:  2      6     0.33    *                   tzcntl	(%rax), %ecx
76# CHECK-NEXT:  1      2     0.25                        tzcntq	%rax, %rcx
77# CHECK-NEXT:  2      6     0.33    *                   tzcntq	(%rax), %rcx
78
79# CHECK:      Resources:
80# CHECK-NEXT: [0]   - Zn2AGU0
81# CHECK-NEXT: [1]   - Zn2AGU1
82# CHECK-NEXT: [2]   - Zn2AGU2
83# CHECK-NEXT: [3]   - Zn2ALU0
84# CHECK-NEXT: [4]   - Zn2ALU1
85# CHECK-NEXT: [5]   - Zn2ALU2
86# CHECK-NEXT: [6]   - Zn2ALU3
87# CHECK-NEXT: [7]   - Zn2Divider
88# CHECK-NEXT: [8]   - Zn2FPU0
89# CHECK-NEXT: [9]   - Zn2FPU1
90# CHECK-NEXT: [10]  - Zn2FPU2
91# CHECK-NEXT: [11]  - Zn2FPU3
92# CHECK-NEXT: [12]  - Zn2Multiplier
93
94# CHECK:      Resource pressure per iteration:
95# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    [10]   [11]   [12]
96# CHECK-NEXT: 4.33   4.33   4.33   6.50   6.50   6.50   6.50    -      -      -      -      -      -
97
98# CHECK:      Resource pressure by instruction:
99# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6]    [7]    [8]    [9]    [10]   [11]   [12]   Instructions:
100# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     andnl	%eax, %ebx, %ecx
101# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     andnl	(%rax), %ebx, %ecx
102# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     andnq	%rax, %rbx, %rcx
103# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     andnq	(%rax), %rbx, %rcx
104# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     bextrl	%eax, %ebx, %ecx
105# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     bextrl	%eax, (%rbx), %ecx
106# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     bextrq	%rax, %rbx, %rcx
107# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     bextrq	%rax, (%rbx), %rcx
108# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsil	%eax, %ecx
109# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsil	(%rax), %ecx
110# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsiq	%rax, %rcx
111# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsiq	(%rax), %rcx
112# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsmskl	%eax, %ecx
113# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsmskl	(%rax), %ecx
114# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsmskq	%rax, %rcx
115# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsmskq	(%rax), %rcx
116# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsrl	%eax, %ecx
117# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsrl	(%rax), %ecx
118# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsrq	%rax, %rcx
119# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     blsrq	(%rax), %rcx
120# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     tzcntw	%ax, %cx
121# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     tzcntw	(%rax), %cx
122# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     tzcntl	%eax, %ecx
123# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     tzcntl	(%rax), %ecx
124# CHECK-NEXT:  -      -      -     0.25   0.25   0.25   0.25    -      -      -      -      -      -     tzcntq	%rax, %rcx
125# CHECK-NEXT: 0.33   0.33   0.33   0.25   0.25   0.25   0.25    -      -      -      -      -      -     tzcntq	(%rax), %rcx
126