[InstCombine] Signed saturation patterns
[llvm-core.git] / test / tools / llvm-mca / X86 / BdVer2 / one-idioms.s
blobd3a81e4da48acc93487729b855121f5abf7fe779
1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=bdver2 -timeline -timeline-max-iterations=1 -register-file-stats < %s | FileCheck %s
4 # These are dependency-breaking one-idioms.
5 # Much like zero-idioms, but they produce ones, and do consume resources.
7 # perf stats reports a throughput of 2.00 IPC.
9 pcmpeqb %mm2, %mm2
10 pcmpeqd %mm2, %mm2
11 pcmpeqw %mm2, %mm2
13 pcmpeqb %xmm2, %xmm2
14 pcmpeqd %xmm2, %xmm2
15 pcmpeqq %xmm2, %xmm2
16 pcmpeqw %xmm2, %xmm2
18 vpcmpeqb %xmm3, %xmm3, %xmm3
19 vpcmpeqd %xmm3, %xmm3, %xmm3
20 vpcmpeqq %xmm3, %xmm3, %xmm3
21 vpcmpeqw %xmm3, %xmm3, %xmm3
23 vpcmpeqb %xmm3, %xmm3, %xmm5
24 vpcmpeqd %xmm3, %xmm3, %xmm5
25 vpcmpeqq %xmm3, %xmm3, %xmm5
26 vpcmpeqw %xmm3, %xmm3, %xmm5
28 # FIXME: their handling is broken in llvm-mca.
30 # CHECK: Iterations: 100
31 # CHECK-NEXT: Instructions: 1500
32 # CHECK-NEXT: Total Cycles: 1353
33 # CHECK-NEXT: Total uOps: 1500
35 # CHECK: Dispatch Width: 4
36 # CHECK-NEXT: uOps Per Cycle: 1.11
37 # CHECK-NEXT: IPC: 1.11
38 # CHECK-NEXT: Block RThroughput: 13.5
40 # CHECK: Instruction Info:
41 # CHECK-NEXT: [1]: #uOps
42 # CHECK-NEXT: [2]: Latency
43 # CHECK-NEXT: [3]: RThroughput
44 # CHECK-NEXT: [4]: MayLoad
45 # CHECK-NEXT: [5]: MayStore
46 # CHECK-NEXT: [6]: HasSideEffects (U)
48 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
49 # CHECK-NEXT: 1 2 0.50 pcmpeqb %mm2, %mm2
50 # CHECK-NEXT: 1 2 0.50 pcmpeqd %mm2, %mm2
51 # CHECK-NEXT: 1 2 0.50 pcmpeqw %mm2, %mm2
52 # CHECK-NEXT: 1 2 1.00 pcmpeqb %xmm2, %xmm2
53 # CHECK-NEXT: 1 2 1.00 pcmpeqd %xmm2, %xmm2
54 # CHECK-NEXT: 1 2 1.00 pcmpeqq %xmm2, %xmm2
55 # CHECK-NEXT: 1 2 1.00 pcmpeqw %xmm2, %xmm2
56 # CHECK-NEXT: 1 2 1.00 vpcmpeqb %xmm3, %xmm3, %xmm3
57 # CHECK-NEXT: 1 2 1.00 vpcmpeqd %xmm3, %xmm3, %xmm3
58 # CHECK-NEXT: 1 2 1.00 vpcmpeqq %xmm3, %xmm3, %xmm3
59 # CHECK-NEXT: 1 2 1.00 vpcmpeqw %xmm3, %xmm3, %xmm3
60 # CHECK-NEXT: 1 2 1.00 vpcmpeqb %xmm3, %xmm3, %xmm5
61 # CHECK-NEXT: 1 2 1.00 vpcmpeqd %xmm3, %xmm3, %xmm5
62 # CHECK-NEXT: 1 2 1.00 vpcmpeqq %xmm3, %xmm3, %xmm5
63 # CHECK-NEXT: 1 2 1.00 vpcmpeqw %xmm3, %xmm3, %xmm5
65 # CHECK: Register File statistics:
66 # CHECK-NEXT: Total number of mappings created: 1500
67 # CHECK-NEXT: Max number of mappings used: 69
69 # CHECK: * Register File #1 -- PdFpuPRF:
70 # CHECK-NEXT: Number of physical registers: 160
71 # CHECK-NEXT: Total number of mappings created: 1500
72 # CHECK-NEXT: Max number of mappings used: 69
74 # CHECK: * Register File #2 -- PdIntegerPRF:
75 # CHECK-NEXT: Number of physical registers: 96
76 # CHECK-NEXT: Total number of mappings created: 0
77 # CHECK-NEXT: Max number of mappings used: 0
79 # CHECK: Resources:
80 # CHECK-NEXT: [0.0] - PdAGLU01
81 # CHECK-NEXT: [0.1] - PdAGLU01
82 # CHECK-NEXT: [1] - PdBranch
83 # CHECK-NEXT: [2] - PdCount
84 # CHECK-NEXT: [3] - PdDiv
85 # CHECK-NEXT: [4] - PdEX0
86 # CHECK-NEXT: [5] - PdEX1
87 # CHECK-NEXT: [6] - PdFPCVT
88 # CHECK-NEXT: [7.0] - PdFPFMA
89 # CHECK-NEXT: [7.1] - PdFPFMA
90 # CHECK-NEXT: [8.0] - PdFPMAL
91 # CHECK-NEXT: [8.1] - PdFPMAL
92 # CHECK-NEXT: [9] - PdFPMMA
93 # CHECK-NEXT: [10] - PdFPSTO
94 # CHECK-NEXT: [11] - PdFPU0
95 # CHECK-NEXT: [12] - PdFPU1
96 # CHECK-NEXT: [13] - PdFPU2
97 # CHECK-NEXT: [14] - PdFPU3
98 # CHECK-NEXT: [15] - PdFPXBR
99 # CHECK-NEXT: [16.0] - PdLoad
100 # CHECK-NEXT: [16.1] - PdLoad
101 # CHECK-NEXT: [17] - PdMul
102 # CHECK-NEXT: [18] - PdStore
104 # CHECK: Resource pressure per iteration:
105 # CHECK-NEXT: [0.0] [0.1] [1] [2] [3] [4] [5] [6] [7.0] [7.1] [8.0] [8.1] [9] [10] [11] [12] [13] [14] [15] [16.0] [16.1] [17] [18]
106 # CHECK-NEXT: - - - - - - - - - - 13.50 13.50 - - 7.50 7.50 - - - - - - -
108 # CHECK: Resource pressure by instruction:
109 # CHECK-NEXT: [0.0] [0.1] [1] [2] [3] [4] [5] [6] [7.0] [7.1] [8.0] [8.1] [9] [10] [11] [12] [13] [14] [15] [16.0] [16.1] [17] [18] Instructions:
110 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - pcmpeqb %mm2, %mm2
111 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - pcmpeqd %mm2, %mm2
112 # CHECK-NEXT: - - - - - - - - - - 0.50 0.50 - - 0.50 0.50 - - - - - - - pcmpeqw %mm2, %mm2
113 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - pcmpeqb %xmm2, %xmm2
114 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - pcmpeqd %xmm2, %xmm2
115 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - pcmpeqq %xmm2, %xmm2
116 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - pcmpeqw %xmm2, %xmm2
117 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqb %xmm3, %xmm3, %xmm3
118 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqd %xmm3, %xmm3, %xmm3
119 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqq %xmm3, %xmm3, %xmm3
120 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqw %xmm3, %xmm3, %xmm3
121 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqb %xmm3, %xmm3, %xmm5
122 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqd %xmm3, %xmm3, %xmm5
123 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqq %xmm3, %xmm3, %xmm5
124 # CHECK-NEXT: - - - - - - - - - - 1.00 1.00 - - 0.50 0.50 - - - - - - - vpcmpeqw %xmm3, %xmm3, %xmm5
126 # CHECK: Timeline view:
127 # CHECK-NEXT: 0123456
128 # CHECK-NEXT: Index 0123456789
130 # CHECK: [0,0] DeeER. . .. pcmpeqb %mm2, %mm2
131 # CHECK-NEXT: [0,1] DeeER. . .. pcmpeqd %mm2, %mm2
132 # CHECK-NEXT: [0,2] D=eeER . .. pcmpeqw %mm2, %mm2
133 # CHECK-NEXT: [0,3] D==eeER . .. pcmpeqb %xmm2, %xmm2
134 # CHECK-NEXT: [0,4] .DeeE-R . .. pcmpeqd %xmm2, %xmm2
135 # CHECK-NEXT: [0,5] .D==eeER . .. pcmpeqq %xmm2, %xmm2
136 # CHECK-NEXT: [0,6] .D===eeER . .. pcmpeqw %xmm2, %xmm2
137 # CHECK-NEXT: [0,7] .D=====eeER .. vpcmpeqb %xmm3, %xmm3, %xmm3
138 # CHECK-NEXT: [0,8] . D===eeE-R .. vpcmpeqd %xmm3, %xmm3, %xmm3
139 # CHECK-NEXT: [0,9] . D======eeER .. vpcmpeqq %xmm3, %xmm3, %xmm3
140 # CHECK-NEXT: [0,10] . D=====eeE-R .. vpcmpeqw %xmm3, %xmm3, %xmm3
141 # CHECK-NEXT: [0,11] . D=======eeER .. vpcmpeqb %xmm3, %xmm3, %xmm5
142 # CHECK-NEXT: [0,12] . D=======eeER.. vpcmpeqd %xmm3, %xmm3, %xmm5
143 # CHECK-NEXT: [0,13] . D========eeER. vpcmpeqq %xmm3, %xmm3, %xmm5
144 # CHECK-NEXT: [0,14] . D=========eeER vpcmpeqw %xmm3, %xmm3, %xmm5
146 # CHECK: Average Wait times (based on the timeline view):
147 # CHECK-NEXT: [0]: Executions
148 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
149 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
150 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
152 # CHECK: [0] [1] [2] [3]
153 # CHECK-NEXT: 0. 1 1.0 1.0 0.0 pcmpeqb %mm2, %mm2
154 # CHECK-NEXT: 1. 1 1.0 1.0 0.0 pcmpeqd %mm2, %mm2
155 # CHECK-NEXT: 2. 1 2.0 2.0 0.0 pcmpeqw %mm2, %mm2
156 # CHECK-NEXT: 3. 1 3.0 3.0 0.0 pcmpeqb %xmm2, %xmm2
157 # CHECK-NEXT: 4. 1 1.0 1.0 1.0 pcmpeqd %xmm2, %xmm2
158 # CHECK-NEXT: 5. 1 3.0 0.0 0.0 pcmpeqq %xmm2, %xmm2
159 # CHECK-NEXT: 6. 1 4.0 4.0 0.0 pcmpeqw %xmm2, %xmm2
160 # CHECK-NEXT: 7. 1 6.0 6.0 0.0 vpcmpeqb %xmm3, %xmm3, %xmm3
161 # CHECK-NEXT: 8. 1 4.0 4.0 1.0 vpcmpeqd %xmm3, %xmm3, %xmm3
162 # CHECK-NEXT: 9. 1 7.0 1.0 0.0 vpcmpeqq %xmm3, %xmm3, %xmm3
163 # CHECK-NEXT: 10. 1 6.0 6.0 1.0 vpcmpeqw %xmm3, %xmm3, %xmm3
164 # CHECK-NEXT: 11. 1 8.0 8.0 0.0 vpcmpeqb %xmm3, %xmm3, %xmm5
165 # CHECK-NEXT: 12. 1 8.0 8.0 0.0 vpcmpeqd %xmm3, %xmm3, %xmm5
166 # CHECK-NEXT: 13. 1 9.0 2.0 0.0 vpcmpeqq %xmm3, %xmm3, %xmm5
167 # CHECK-NEXT: 14. 1 10.0 10.0 0.0 vpcmpeqw %xmm3, %xmm3, %xmm5
168 # CHECK-NEXT: 1 4.9 3.8 0.2 <total>