1# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -instruction-tables < %s | FileCheck %s
3
4bzhi        %eax, %ebx, %ecx
5bzhi        %eax, (%rbx), %ecx
6
7bzhi        %rax, %rbx, %rcx
8bzhi        %rax, (%rbx), %rcx
9
10mulx        %eax, %ebx, %ecx
11mulx        (%rax), %ebx, %ecx
12
13mulx        %rax, %rbx, %rcx
14mulx        (%rax), %rbx, %rcx
15
16pdep        %eax, %ebx, %ecx
17pdep        (%rax), %ebx, %ecx
18
19pdep        %rax, %rbx, %rcx
20pdep        (%rax), %rbx, %rcx
21
22pext        %eax, %ebx, %ecx
23pext        (%rax), %ebx, %ecx
24
25pext        %rax, %rbx, %rcx
26pext        (%rax), %rbx, %rcx
27
28rorx        $1, %eax, %ecx
29rorx        $1, (%rax), %ecx
30
31rorx        $1, %rax, %rcx
32rorx        $1, (%rax), %rcx
33
34sarx        %eax, %ebx, %ecx
35sarx        %eax, (%rbx), %ecx
36
37sarx        %rax, %rbx, %rcx
38sarx        %rax, (%rbx), %rcx
39
40shlx        %eax, %ebx, %ecx
41shlx        %eax, (%rbx), %ecx
42
43shlx        %rax, %rbx, %rcx
44shlx        %rax, (%rbx), %rcx
45
46shrx        %eax, %ebx, %ecx
47shrx        %eax, (%rbx), %ecx
48
49shrx        %rax, %rbx, %rcx
50shrx        %rax, (%rbx), %rcx
51
52# CHECK:      Instruction Info:
53# CHECK-NEXT: [1]: #uOps
54# CHECK-NEXT: [2]: Latency
55# CHECK-NEXT: [3]: RThroughput
56# CHECK-NEXT: [4]: MayLoad
57# CHECK-NEXT: [5]: MayStore
58# CHECK-NEXT: [6]: HasSideEffects (U)
59
60# CHECK:      [1]    [2]    [3]    [4]    [5]    [6]    Instructions:
61# CHECK-NEXT:  1      1     1.00                        bzhil	%eax, %ebx, %ecx
62# CHECK-NEXT:  2      6     1.00    *                   bzhil	%eax, (%rbx), %ecx
63# CHECK-NEXT:  1      1     1.00                        bzhiq	%rax, %rbx, %rcx
64# CHECK-NEXT:  2      6     1.00    *                   bzhiq	%rax, (%rbx), %rcx
65# CHECK-NEXT:  4      4     1.00                        mulxl	%eax, %ebx, %ecx
66# CHECK-NEXT:  5      9     1.00    *                   mulxl	(%rax), %ebx, %ecx
67# CHECK-NEXT:  3      4     1.00                        mulxq	%rax, %rbx, %rcx
68# CHECK-NEXT:  4      9     1.00    *                   mulxq	(%rax), %rbx, %rcx
69# CHECK-NEXT:  1      1     0.33                        pdepl	%eax, %ebx, %ecx
70# CHECK-NEXT:  2      6     0.50    *                   pdepl	(%rax), %ebx, %ecx
71# CHECK-NEXT:  1      1     0.33                        pdepq	%rax, %rbx, %rcx
72# CHECK-NEXT:  2      6     0.50    *                   pdepq	(%rax), %rbx, %rcx
73# CHECK-NEXT:  1      1     0.33                        pextl	%eax, %ebx, %ecx
74# CHECK-NEXT:  2      6     0.50    *                   pextl	(%rax), %ebx, %ecx
75# CHECK-NEXT:  1      1     0.33                        pextq	%rax, %rbx, %rcx
76# CHECK-NEXT:  2      6     0.50    *                   pextq	(%rax), %rbx, %rcx
77# CHECK-NEXT:  1      1     0.50                        rorxl	$1, %eax, %ecx
78# CHECK-NEXT:  2      6     0.50    *                   rorxl	$1, (%rax), %ecx
79# CHECK-NEXT:  1      1     0.50                        rorxq	$1, %rax, %rcx
80# CHECK-NEXT:  2      6     0.50    *                   rorxq	$1, (%rax), %rcx
81# CHECK-NEXT:  1      1     0.50                        sarxl	%eax, %ebx, %ecx
82# CHECK-NEXT:  2      6     0.50    *                   sarxl	%eax, (%rbx), %ecx
83# CHECK-NEXT:  1      1     0.50                        sarxq	%rax, %rbx, %rcx
84# CHECK-NEXT:  2      6     0.50    *                   sarxq	%rax, (%rbx), %rcx
85# CHECK-NEXT:  1      1     0.50                        shlxl	%eax, %ebx, %ecx
86# CHECK-NEXT:  2      6     0.50    *                   shlxl	%eax, (%rbx), %ecx
87# CHECK-NEXT:  1      1     0.50                        shlxq	%rax, %rbx, %rcx
88# CHECK-NEXT:  2      6     0.50    *                   shlxq	%rax, (%rbx), %rcx
89# CHECK-NEXT:  1      1     0.50                        shrxl	%eax, %ebx, %ecx
90# CHECK-NEXT:  2      6     0.50    *                   shrxl	%eax, (%rbx), %ecx
91# CHECK-NEXT:  1      1     0.50                        shrxq	%rax, %rbx, %rcx
92# CHECK-NEXT:  2      6     0.50    *                   shrxq	%rax, (%rbx), %rcx
93
94# CHECK:      Resources:
95# CHECK-NEXT: [0]   - SBDivider
96# CHECK-NEXT: [1]   - SBFPDivider
97# CHECK-NEXT: [2]   - SBPort0
98# CHECK-NEXT: [3]   - SBPort1
99# CHECK-NEXT: [4]   - SBPort4
100# CHECK-NEXT: [5]   - SBPort5
101# CHECK-NEXT: [6.0] - SBPort23
102# CHECK-NEXT: [6.1] - SBPort23
103
104# CHECK:      Resource pressure per iteration:
105# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]
106# CHECK-NEXT:  -      -     14.33  11.33   -     12.33  8.00   8.00
107
108# CHECK:      Resource pressure by instruction:
109# CHECK-NEXT: [0]    [1]    [2]    [3]    [4]    [5]    [6.0]  [6.1]  Instructions:
110# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     bzhil	%eax, %ebx, %ecx
111# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   bzhil	%eax, (%rbx), %ecx
112# CHECK-NEXT:  -      -      -     1.00    -      -      -      -     bzhiq	%rax, %rbx, %rcx
113# CHECK-NEXT:  -      -      -     1.00    -      -     0.50   0.50   bzhiq	%rax, (%rbx), %rcx
114# CHECK-NEXT:  -      -     0.83   1.33    -     0.83    -      -     mulxl	%eax, %ebx, %ecx
115# CHECK-NEXT:  -      -     0.83   1.33    -     0.83   0.50   0.50   mulxl	(%rax), %ebx, %ecx
116# CHECK-NEXT:  -      -     1.00   1.00    -      -      -      -     mulxq	%rax, %rbx, %rcx
117# CHECK-NEXT:  -      -     1.00   1.00    -      -     0.50   0.50   mulxq	(%rax), %rbx, %rcx
118# CHECK-NEXT:  -      -     0.33   0.33    -     0.33    -      -     pdepl	%eax, %ebx, %ecx
119# CHECK-NEXT:  -      -     0.33   0.33    -     0.33   0.50   0.50   pdepl	(%rax), %ebx, %ecx
120# CHECK-NEXT:  -      -     0.33   0.33    -     0.33    -      -     pdepq	%rax, %rbx, %rcx
121# CHECK-NEXT:  -      -     0.33   0.33    -     0.33   0.50   0.50   pdepq	(%rax), %rbx, %rcx
122# CHECK-NEXT:  -      -     0.33   0.33    -     0.33    -      -     pextl	%eax, %ebx, %ecx
123# CHECK-NEXT:  -      -     0.33   0.33    -     0.33   0.50   0.50   pextl	(%rax), %ebx, %ecx
124# CHECK-NEXT:  -      -     0.33   0.33    -     0.33    -      -     pextq	%rax, %rbx, %rcx
125# CHECK-NEXT:  -      -     0.33   0.33    -     0.33   0.50   0.50   pextq	(%rax), %rbx, %rcx
126# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     rorxl	$1, %eax, %ecx
127# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   rorxl	$1, (%rax), %ecx
128# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     rorxq	$1, %rax, %rcx
129# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   rorxq	$1, (%rax), %rcx
130# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     sarxl	%eax, %ebx, %ecx
131# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   sarxl	%eax, (%rbx), %ecx
132# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     sarxq	%rax, %rbx, %rcx
133# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   sarxq	%rax, (%rbx), %rcx
134# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     shlxl	%eax, %ebx, %ecx
135# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   shlxl	%eax, (%rbx), %ecx
136# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     shlxq	%rax, %rbx, %rcx
137# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   shlxq	%rax, (%rbx), %rcx
138# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     shrxl	%eax, %ebx, %ecx
139# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   shrxl	%eax, (%rbx), %ecx
140# CHECK-NEXT:  -      -     0.50    -      -     0.50    -      -     shrxq	%rax, %rbx, %rcx
141# CHECK-NEXT:  -      -     0.50    -      -     0.50   0.50   0.50   shrxq	%rax, (%rbx), %rcx
142