[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / llvm-mca / X86 / Barcelona / zero-idioms.s
blob62ff7b54cb6c863aa5e4126ad797b7ca3cc4e372
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 -timeline -register-file-stats -iterations=1 < %s | FileCheck %s
4 subl %eax, %eax
5 subq %rax, %rax
6 xorl %eax, %eax
7 xorq %rax, %rax
9 pcmpgtb %mm2, %mm2
10 pcmpgtd %mm2, %mm2
11 # pcmpgtq %mm2, %mm2 # invalid operand for instruction
12 pcmpgtw %mm2, %mm2
14 pcmpgtb %xmm2, %xmm2
15 pcmpgtd %xmm2, %xmm2
16 pcmpgtq %xmm2, %xmm2
17 pcmpgtw %xmm2, %xmm2
19 psubb %mm2, %mm2
20 psubd %mm2, %mm2
21 psubq %mm2, %mm2
22 psubw %mm2, %mm2
23 psubb %xmm2, %xmm2
24 psubd %xmm2, %xmm2
25 psubq %xmm2, %xmm2
26 psubw %xmm2, %xmm2
28 psubsb %mm2, %mm2
29 psubsw %mm2, %mm2
30 psubsb %xmm2, %xmm2
31 psubsw %xmm2, %xmm2
33 psubusb %mm2, %mm2
34 psubusw %mm2, %mm2
35 psubusb %xmm2, %xmm2
36 psubusw %xmm2, %xmm2
38 andnps %xmm0, %xmm0
39 andnpd %xmm1, %xmm1
41 pandn %mm2, %mm2
42 pandn %xmm2, %xmm2
44 xorps %xmm0, %xmm0
45 xorpd %xmm1, %xmm1
47 pxor %mm2, %mm2
48 pxor %xmm2, %xmm2
50 # CHECK: Iterations: 1
51 # CHECK-NEXT: Instructions: 35
52 # CHECK-NEXT: Total Cycles: 39
53 # CHECK-NEXT: Total uOps: 35
55 # CHECK: Dispatch Width: 4
56 # CHECK-NEXT: uOps Per Cycle: 0.90
57 # CHECK-NEXT: IPC: 0.90
58 # CHECK-NEXT: Block RThroughput: 11.0
60 # CHECK: Instruction Info:
61 # CHECK-NEXT: [1]: #uOps
62 # CHECK-NEXT: [2]: Latency
63 # CHECK-NEXT: [3]: RThroughput
64 # CHECK-NEXT: [4]: MayLoad
65 # CHECK-NEXT: [5]: MayStore
66 # CHECK-NEXT: [6]: HasSideEffects (U)
68 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
69 # CHECK-NEXT: 1 0 0.25 subl %eax, %eax
70 # CHECK-NEXT: 1 0 0.25 subq %rax, %rax
71 # CHECK-NEXT: 1 0 0.25 xorl %eax, %eax
72 # CHECK-NEXT: 1 0 0.25 xorq %rax, %rax
73 # CHECK-NEXT: 1 3 1.00 pcmpgtb %mm2, %mm2
74 # CHECK-NEXT: 1 3 1.00 pcmpgtd %mm2, %mm2
75 # CHECK-NEXT: 1 3 1.00 pcmpgtw %mm2, %mm2
76 # CHECK-NEXT: 1 0 0.25 pcmpgtb %xmm2, %xmm2
77 # CHECK-NEXT: 1 0 0.25 pcmpgtd %xmm2, %xmm2
78 # CHECK-NEXT: 1 0 0.25 pcmpgtq %xmm2, %xmm2
79 # CHECK-NEXT: 1 0 0.25 pcmpgtw %xmm2, %xmm2
80 # CHECK-NEXT: 1 3 1.00 psubb %mm2, %mm2
81 # CHECK-NEXT: 1 3 1.00 psubd %mm2, %mm2
82 # CHECK-NEXT: 1 3 1.00 psubq %mm2, %mm2
83 # CHECK-NEXT: 1 3 1.00 psubw %mm2, %mm2
84 # CHECK-NEXT: 1 0 0.25 psubb %xmm2, %xmm2
85 # CHECK-NEXT: 1 0 0.25 psubd %xmm2, %xmm2
86 # CHECK-NEXT: 1 0 0.25 psubq %xmm2, %xmm2
87 # CHECK-NEXT: 1 0 0.25 psubw %xmm2, %xmm2
88 # CHECK-NEXT: 1 3 1.00 psubsb %mm2, %mm2
89 # CHECK-NEXT: 1 3 1.00 psubsw %mm2, %mm2
90 # CHECK-NEXT: 1 1 0.50 psubsb %xmm2, %xmm2
91 # CHECK-NEXT: 1 1 0.50 psubsw %xmm2, %xmm2
92 # CHECK-NEXT: 1 3 1.00 psubusb %mm2, %mm2
93 # CHECK-NEXT: 1 3 1.00 psubusw %mm2, %mm2
94 # CHECK-NEXT: 1 1 0.50 psubusb %xmm2, %xmm2
95 # CHECK-NEXT: 1 1 0.50 psubusw %xmm2, %xmm2
96 # CHECK-NEXT: 1 1 1.00 andnps %xmm0, %xmm0
97 # CHECK-NEXT: 1 1 1.00 andnpd %xmm1, %xmm1
98 # CHECK-NEXT: 1 1 0.33 pandn %mm2, %mm2
99 # CHECK-NEXT: 1 1 0.33 pandn %xmm2, %xmm2
100 # CHECK-NEXT: 1 0 0.25 xorps %xmm0, %xmm0
101 # CHECK-NEXT: 1 0 0.25 xorpd %xmm1, %xmm1
102 # CHECK-NEXT: 1 1 0.33 pxor %mm2, %mm2
103 # CHECK-NEXT: 1 0 0.25 pxor %xmm2, %xmm2
105 # CHECK: Register File statistics:
106 # CHECK-NEXT: Total number of mappings created: 39
107 # CHECK-NEXT: Max number of mappings used: 30
109 # CHECK: Resources:
110 # CHECK-NEXT: [0] - SBDivider
111 # CHECK-NEXT: [1] - SBFPDivider
112 # CHECK-NEXT: [2] - SBPort0
113 # CHECK-NEXT: [3] - SBPort1
114 # CHECK-NEXT: [4] - SBPort4
115 # CHECK-NEXT: [5] - SBPort5
116 # CHECK-NEXT: [6.0] - SBPort23
117 # CHECK-NEXT: [6.1] - SBPort23
119 # CHECK: Resource pressure per iteration:
120 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1]
121 # CHECK-NEXT: - - 2.00 12.00 - 6.00 - -
123 # CHECK: Resource pressure by instruction:
124 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6.0] [6.1] Instructions:
125 # CHECK-NEXT: - - - - - - - - subl %eax, %eax
126 # CHECK-NEXT: - - - - - - - - subq %rax, %rax
127 # CHECK-NEXT: - - - - - - - - xorl %eax, %eax
128 # CHECK-NEXT: - - - - - - - - xorq %rax, %rax
129 # CHECK-NEXT: - - - 1.00 - - - - pcmpgtb %mm2, %mm2
130 # CHECK-NEXT: - - - 1.00 - - - - pcmpgtd %mm2, %mm2
131 # CHECK-NEXT: - - - 1.00 - - - - pcmpgtw %mm2, %mm2
132 # CHECK-NEXT: - - - - - - - - pcmpgtb %xmm2, %xmm2
133 # CHECK-NEXT: - - - - - - - - pcmpgtd %xmm2, %xmm2
134 # CHECK-NEXT: - - - - - - - - pcmpgtq %xmm2, %xmm2
135 # CHECK-NEXT: - - - - - - - - pcmpgtw %xmm2, %xmm2
136 # CHECK-NEXT: - - - 1.00 - - - - psubb %mm2, %mm2
137 # CHECK-NEXT: - - - 1.00 - - - - psubd %mm2, %mm2
138 # CHECK-NEXT: - - - 1.00 - - - - psubq %mm2, %mm2
139 # CHECK-NEXT: - - - 1.00 - - - - psubw %mm2, %mm2
140 # CHECK-NEXT: - - - - - - - - psubb %xmm2, %xmm2
141 # CHECK-NEXT: - - - - - - - - psubd %xmm2, %xmm2
142 # CHECK-NEXT: - - - - - - - - psubq %xmm2, %xmm2
143 # CHECK-NEXT: - - - - - - - - psubw %xmm2, %xmm2
144 # CHECK-NEXT: - - - 1.00 - - - - psubsb %mm2, %mm2
145 # CHECK-NEXT: - - - 1.00 - - - - psubsw %mm2, %mm2
146 # CHECK-NEXT: - - - - - 1.00 - - psubsb %xmm2, %xmm2
147 # CHECK-NEXT: - - - - - 1.00 - - psubsw %xmm2, %xmm2
148 # CHECK-NEXT: - - - 1.00 - - - - psubusb %mm2, %mm2
149 # CHECK-NEXT: - - - 1.00 - - - - psubusw %mm2, %mm2
150 # CHECK-NEXT: - - - - - 1.00 - - psubusb %xmm2, %xmm2
151 # CHECK-NEXT: - - - 1.00 - - - - psubusw %xmm2, %xmm2
152 # CHECK-NEXT: - - - - - 1.00 - - andnps %xmm0, %xmm0
153 # CHECK-NEXT: - - - - - 1.00 - - andnpd %xmm1, %xmm1
154 # CHECK-NEXT: - - 1.00 - - - - - pandn %mm2, %mm2
155 # CHECK-NEXT: - - 1.00 - - - - - pandn %xmm2, %xmm2
156 # CHECK-NEXT: - - - - - - - - xorps %xmm0, %xmm0
157 # CHECK-NEXT: - - - - - - - - xorpd %xmm1, %xmm1
158 # CHECK-NEXT: - - - - - 1.00 - - pxor %mm2, %mm2
159 # CHECK-NEXT: - - - - - - - - pxor %xmm2, %xmm2
161 # CHECK: Timeline view:
162 # CHECK-NEXT: 0123456789 012345678
163 # CHECK-NEXT: Index 0123456789 0123456789
165 # CHECK: [0,0] DR . . . . . . . . subl %eax, %eax
166 # CHECK-NEXT: [0,1] DR . . . . . . . . subq %rax, %rax
167 # CHECK-NEXT: [0,2] DR . . . . . . . . xorl %eax, %eax
168 # CHECK-NEXT: [0,3] DR . . . . . . . . xorq %rax, %rax
169 # CHECK-NEXT: [0,4] .DeeeER . . . . . . . pcmpgtb %mm2, %mm2
170 # CHECK-NEXT: [0,5] .D===eeeER. . . . . . . pcmpgtd %mm2, %mm2
171 # CHECK-NEXT: [0,6] .D======eeeER . . . . . . pcmpgtw %mm2, %mm2
172 # CHECK-NEXT: [0,7] .D----------R . . . . . . pcmpgtb %xmm2, %xmm2
173 # CHECK-NEXT: [0,8] . D---------R . . . . . . pcmpgtd %xmm2, %xmm2
174 # CHECK-NEXT: [0,9] . D---------R . . . . . . pcmpgtq %xmm2, %xmm2
175 # CHECK-NEXT: [0,10] . D---------R . . . . . . pcmpgtw %xmm2, %xmm2
176 # CHECK-NEXT: [0,11] . D========eeeER . . . . . psubb %mm2, %mm2
177 # CHECK-NEXT: [0,12] . D==========eeeER . . . . . psubd %mm2, %mm2
178 # CHECK-NEXT: [0,13] . D=============eeeER . . . . psubq %mm2, %mm2
179 # CHECK-NEXT: [0,14] . D================eeeER. . . . psubw %mm2, %mm2
180 # CHECK-NEXT: [0,15] . D--------------------R. . . . psubb %xmm2, %xmm2
181 # CHECK-NEXT: [0,16] . D-------------------R. . . . psubd %xmm2, %xmm2
182 # CHECK-NEXT: [0,17] . D-------------------R. . . . psubq %xmm2, %xmm2
183 # CHECK-NEXT: [0,18] . D-------------------R. . . . psubw %xmm2, %xmm2
184 # CHECK-NEXT: [0,19] . D==================eeeER . . . psubsb %mm2, %mm2
185 # CHECK-NEXT: [0,20] . D====================eeeER . . psubsw %mm2, %mm2
186 # CHECK-NEXT: [0,21] . DeE----------------------R . . psubsb %xmm2, %xmm2
187 # CHECK-NEXT: [0,22] . D=eE---------------------R . . psubsw %xmm2, %xmm2
188 # CHECK-NEXT: [0,23] . D=======================eeeER . . psubusb %mm2, %mm2
189 # CHECK-NEXT: [0,24] . .D=========================eeeER . psubusw %mm2, %mm2
190 # CHECK-NEXT: [0,25] . .D=eE--------------------------R . psubusb %xmm2, %xmm2
191 # CHECK-NEXT: [0,26] . .D==eE-------------------------R . psubusw %xmm2, %xmm2
192 # CHECK-NEXT: [0,27] . .D==eE-------------------------R . andnps %xmm0, %xmm0
193 # CHECK-NEXT: [0,28] . . D==eE------------------------R . andnpd %xmm1, %xmm1
194 # CHECK-NEXT: [0,29] . . D===========================eER. pandn %mm2, %mm2
195 # CHECK-NEXT: [0,30] . . D==eE-------------------------R. pandn %xmm2, %xmm2
196 # CHECK-NEXT: [0,31] . . D==E--------------------------R. xorps %xmm0, %xmm0
197 # CHECK-NEXT: [0,32] . . D==E-------------------------R. xorpd %xmm1, %xmm1
198 # CHECK-NEXT: [0,33] . . D===========================eER pxor %mm2, %mm2
199 # CHECK-NEXT: [0,34] . . D==E--------------------------R pxor %xmm2, %xmm2
201 # CHECK: Average Wait times (based on the timeline view):
202 # CHECK-NEXT: [0]: Executions
203 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
204 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
205 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
207 # CHECK: [0] [1] [2] [3]
208 # CHECK-NEXT: 0. 1 0.0 0.0 0.0 subl %eax, %eax
209 # CHECK-NEXT: 1. 1 0.0 0.0 0.0 subq %rax, %rax
210 # CHECK-NEXT: 2. 1 0.0 0.0 0.0 xorl %eax, %eax
211 # CHECK-NEXT: 3. 1 0.0 0.0 0.0 xorq %rax, %rax
212 # CHECK-NEXT: 4. 1 1.0 1.0 0.0 pcmpgtb %mm2, %mm2
213 # CHECK-NEXT: 5. 1 4.0 0.0 0.0 pcmpgtd %mm2, %mm2
214 # CHECK-NEXT: 6. 1 7.0 0.0 0.0 pcmpgtw %mm2, %mm2
215 # CHECK-NEXT: 7. 1 0.0 0.0 10.0 pcmpgtb %xmm2, %xmm2
216 # CHECK-NEXT: 8. 1 0.0 0.0 9.0 pcmpgtd %xmm2, %xmm2
217 # CHECK-NEXT: 9. 1 0.0 0.0 9.0 pcmpgtq %xmm2, %xmm2
218 # CHECK-NEXT: 10. 1 0.0 0.0 9.0 pcmpgtw %xmm2, %xmm2
219 # CHECK-NEXT: 11. 1 9.0 0.0 0.0 psubb %mm2, %mm2
220 # CHECK-NEXT: 12. 1 11.0 0.0 0.0 psubd %mm2, %mm2
221 # CHECK-NEXT: 13. 1 14.0 0.0 0.0 psubq %mm2, %mm2
222 # CHECK-NEXT: 14. 1 17.0 0.0 0.0 psubw %mm2, %mm2
223 # CHECK-NEXT: 15. 1 0.0 0.0 20.0 psubb %xmm2, %xmm2
224 # CHECK-NEXT: 16. 1 0.0 0.0 19.0 psubd %xmm2, %xmm2
225 # CHECK-NEXT: 17. 1 0.0 0.0 19.0 psubq %xmm2, %xmm2
226 # CHECK-NEXT: 18. 1 0.0 0.0 19.0 psubw %xmm2, %xmm2
227 # CHECK-NEXT: 19. 1 19.0 0.0 0.0 psubsb %mm2, %mm2
228 # CHECK-NEXT: 20. 1 21.0 0.0 0.0 psubsw %mm2, %mm2
229 # CHECK-NEXT: 21. 1 1.0 1.0 22.0 psubsb %xmm2, %xmm2
230 # CHECK-NEXT: 22. 1 2.0 0.0 21.0 psubsw %xmm2, %xmm2
231 # CHECK-NEXT: 23. 1 24.0 0.0 0.0 psubusb %mm2, %mm2
232 # CHECK-NEXT: 24. 1 26.0 0.0 0.0 psubusw %mm2, %mm2
233 # CHECK-NEXT: 25. 1 2.0 0.0 26.0 psubusb %xmm2, %xmm2
234 # CHECK-NEXT: 26. 1 3.0 0.0 25.0 psubusw %xmm2, %xmm2
235 # CHECK-NEXT: 27. 1 3.0 3.0 25.0 andnps %xmm0, %xmm0
236 # CHECK-NEXT: 28. 1 3.0 3.0 24.0 andnpd %xmm1, %xmm1
237 # CHECK-NEXT: 29. 1 28.0 0.0 0.0 pandn %mm2, %mm2
238 # CHECK-NEXT: 30. 1 3.0 0.0 25.0 pandn %xmm2, %xmm2
239 # CHECK-NEXT: 31. 1 3.0 0.0 26.0 xorps %xmm0, %xmm0
240 # CHECK-NEXT: 32. 1 3.0 0.0 25.0 xorpd %xmm1, %xmm1
241 # CHECK-NEXT: 33. 1 28.0 0.0 0.0 pxor %mm2, %mm2
242 # CHECK-NEXT: 34. 1 3.0 0.0 26.0 pxor %xmm2, %xmm2
243 # CHECK-NEXT: 1 6.7 0.2 10.3 <total>