[InstCombine] Signed saturation patterns
[llvm-complete.git] / test / tools / llvm-mca / X86 / BtVer2 / xadd.s
blob64b6490861c2af087859a0abff7151bba93f847f
1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=2 -timeline < %s | FileCheck %s
4 # LLVM-MCA-BEGIN
5 xadd %ecx, (%rsp)
6 add %ecx, %ecx
7 add %ecx, %ecx
8 imul %ecx, %ecx
9 imul %ecx, %ecx
10 # LLVM-MCA-END
12 # LLVM-MCA-BEGIN
13 lock xadd %ecx, (%rsp)
14 add %ecx, %ecx
15 add %ecx, %ecx
16 imul %ecx, %ecx
17 imul %ecx, %ecx
18 # LLVM-MCA-END
20 # CHECK: [0] Code Region
22 # CHECK: Iterations: 2
23 # CHECK-NEXT: Instructions: 10
24 # CHECK-NEXT: Total Cycles: 27
25 # CHECK-NEXT: Total uOps: 16
27 # CHECK: Dispatch Width: 2
28 # CHECK-NEXT: uOps Per Cycle: 0.59
29 # CHECK-NEXT: IPC: 0.37
30 # CHECK-NEXT: Block RThroughput: 4.0
32 # CHECK: Instruction Info:
33 # CHECK-NEXT: [1]: #uOps
34 # CHECK-NEXT: [2]: Latency
35 # CHECK-NEXT: [3]: RThroughput
36 # CHECK-NEXT: [4]: MayLoad
37 # CHECK-NEXT: [5]: MayStore
38 # CHECK-NEXT: [6]: HasSideEffects (U)
40 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
41 # CHECK-NEXT: 4 11 1.50 * * xaddl %ecx, (%rsp)
42 # CHECK-NEXT: 1 1 0.50 addl %ecx, %ecx
43 # CHECK-NEXT: 1 1 0.50 addl %ecx, %ecx
44 # CHECK-NEXT: 1 3 1.00 imull %ecx, %ecx
45 # CHECK-NEXT: 1 3 1.00 imull %ecx, %ecx
47 # CHECK: Resources:
48 # CHECK-NEXT: [0] - JALU0
49 # CHECK-NEXT: [1] - JALU1
50 # CHECK-NEXT: [2] - JDiv
51 # CHECK-NEXT: [3] - JFPA
52 # CHECK-NEXT: [4] - JFPM
53 # CHECK-NEXT: [5] - JFPU0
54 # CHECK-NEXT: [6] - JFPU1
55 # CHECK-NEXT: [7] - JLAGU
56 # CHECK-NEXT: [8] - JMul
57 # CHECK-NEXT: [9] - JSAGU
58 # CHECK-NEXT: [10] - JSTC
59 # CHECK-NEXT: [11] - JVALU0
60 # CHECK-NEXT: [12] - JVALU1
61 # CHECK-NEXT: [13] - JVIMUL
63 # CHECK: Resource pressure per iteration:
64 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
65 # CHECK-NEXT: 2.50 4.50 - - - - - 1.00 2.00 1.00 - - - -
67 # CHECK: Resource pressure by instruction:
68 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
69 # CHECK-NEXT: 1.50 1.50 - - - - - 1.00 - 1.00 - - - - xaddl %ecx, (%rsp)
70 # CHECK-NEXT: 1.00 - - - - - - - - - - - - - addl %ecx, %ecx
71 # CHECK-NEXT: - 1.00 - - - - - - - - - - - - addl %ecx, %ecx
72 # CHECK-NEXT: - 1.00 - - - - - - 1.00 - - - - - imull %ecx, %ecx
73 # CHECK-NEXT: - 1.00 - - - - - - 1.00 - - - - - imull %ecx, %ecx
75 # CHECK: Timeline view:
76 # CHECK-NEXT: 0123456789
77 # CHECK-NEXT: Index 0123456789 0123456
79 # CHECK: [0,0] DeeeeeeeeeeeER . . .. xaddl %ecx, (%rsp)
80 # CHECK-NEXT: [0,1] . D=eE-------R . . .. addl %ecx, %ecx
81 # CHECK-NEXT: [0,2] . D==eE-------R. . .. addl %ecx, %ecx
82 # CHECK-NEXT: [0,3] . D==eeeE----R. . .. imull %ecx, %ecx
83 # CHECK-NEXT: [0,4] . D=====eeeE--R . .. imull %ecx, %ecx
84 # CHECK-NEXT: [1,0] . D=======eeeeeeeeeeeER.. xaddl %ecx, (%rsp)
85 # CHECK-NEXT: [1,1] . .D========eE-------R.. addl %ecx, %ecx
86 # CHECK-NEXT: [1,2] . .D=========eE-------R. addl %ecx, %ecx
87 # CHECK-NEXT: [1,3] . . D=========eeeE----R. imull %ecx, %ecx
88 # CHECK-NEXT: [1,4] . . D============eeeE--R imull %ecx, %ecx
90 # CHECK: Average Wait times (based on the timeline view):
91 # CHECK-NEXT: [0]: Executions
92 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
93 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
94 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
96 # CHECK: [0] [1] [2] [3]
97 # CHECK-NEXT: 0. 2 4.5 0.5 0.0 xaddl %ecx, (%rsp)
98 # CHECK-NEXT: 1. 2 5.5 0.0 7.0 addl %ecx, %ecx
99 # CHECK-NEXT: 2. 2 6.5 0.0 7.0 addl %ecx, %ecx
100 # CHECK-NEXT: 3. 2 6.5 0.0 4.0 imull %ecx, %ecx
101 # CHECK-NEXT: 4. 2 9.5 0.0 2.0 imull %ecx, %ecx
102 # CHECK-NEXT: 2 6.5 0.1 4.0 <total>
104 # CHECK: [1] Code Region
106 # CHECK: Iterations: 2
107 # CHECK-NEXT: Instructions: 10
108 # CHECK-NEXT: Total Cycles: 38
109 # CHECK-NEXT: Total uOps: 16
111 # CHECK: Dispatch Width: 2
112 # CHECK-NEXT: uOps Per Cycle: 0.42
113 # CHECK-NEXT: IPC: 0.26
114 # CHECK-NEXT: Block RThroughput: 16.0
116 # CHECK: Instruction Info:
117 # CHECK-NEXT: [1]: #uOps
118 # CHECK-NEXT: [2]: Latency
119 # CHECK-NEXT: [3]: RThroughput
120 # CHECK-NEXT: [4]: MayLoad
121 # CHECK-NEXT: [5]: MayStore
122 # CHECK-NEXT: [6]: HasSideEffects (U)
124 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
125 # CHECK-NEXT: 4 16 16.00 * * lock xaddl %ecx, (%rsp)
126 # CHECK-NEXT: 1 1 0.50 addl %ecx, %ecx
127 # CHECK-NEXT: 1 1 0.50 addl %ecx, %ecx
128 # CHECK-NEXT: 1 3 1.00 imull %ecx, %ecx
129 # CHECK-NEXT: 1 3 1.00 imull %ecx, %ecx
131 # CHECK: Resources:
132 # CHECK-NEXT: [0] - JALU0
133 # CHECK-NEXT: [1] - JALU1
134 # CHECK-NEXT: [2] - JDiv
135 # CHECK-NEXT: [3] - JFPA
136 # CHECK-NEXT: [4] - JFPM
137 # CHECK-NEXT: [5] - JFPU0
138 # CHECK-NEXT: [6] - JFPU1
139 # CHECK-NEXT: [7] - JLAGU
140 # CHECK-NEXT: [8] - JMul
141 # CHECK-NEXT: [9] - JSAGU
142 # CHECK-NEXT: [10] - JSTC
143 # CHECK-NEXT: [11] - JVALU0
144 # CHECK-NEXT: [12] - JVALU1
145 # CHECK-NEXT: [13] - JVIMUL
147 # CHECK: Resource pressure per iteration:
148 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
149 # CHECK-NEXT: 2.50 4.50 - - - - - 16.00 2.00 16.00 - - - -
151 # CHECK: Resource pressure by instruction:
152 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
153 # CHECK-NEXT: 1.50 1.50 - - - - - 16.00 - 16.00 - - - - lock xaddl %ecx, (%rsp)
154 # CHECK-NEXT: 1.00 - - - - - - - - - - - - - addl %ecx, %ecx
155 # CHECK-NEXT: - 1.00 - - - - - - - - - - - - addl %ecx, %ecx
156 # CHECK-NEXT: - 1.00 - - - - - - 1.00 - - - - - imull %ecx, %ecx
157 # CHECK-NEXT: - 1.00 - - - - - - 1.00 - - - - - imull %ecx, %ecx
159 # CHECK: Timeline view:
160 # CHECK-NEXT: 0123456789 01234567
161 # CHECK-NEXT: Index 0123456789 0123456789
163 # CHECK: [0,0] DeeeeeeeeeeeeeeeeER . . . . . lock xaddl %ecx, (%rsp)
164 # CHECK-NEXT: [0,1] . D=========eE----R . . . . . addl %ecx, %ecx
165 # CHECK-NEXT: [0,2] . D==========eE----R. . . . . addl %ecx, %ecx
166 # CHECK-NEXT: [0,3] . D==========eeeE-R. . . . . imull %ecx, %ecx
167 # CHECK-NEXT: [0,4] . D=============eeeER . . . . imull %ecx, %ecx
168 # CHECK-NEXT: [1,0] . D============eeeeeeeeeeeeeeeeER. . lock xaddl %ecx, (%rsp)
169 # CHECK-NEXT: [1,1] . .D=====================eE----R. . addl %ecx, %ecx
170 # CHECK-NEXT: [1,2] . .D======================eE----R . addl %ecx, %ecx
171 # CHECK-NEXT: [1,3] . . D======================eeeE-R . imull %ecx, %ecx
172 # CHECK-NEXT: [1,4] . . D=========================eeeER imull %ecx, %ecx
174 # CHECK: Average Wait times (based on the timeline view):
175 # CHECK-NEXT: [0]: Executions
176 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
177 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
178 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
180 # CHECK: [0] [1] [2] [3]
181 # CHECK-NEXT: 0. 2 7.0 0.5 0.0 lock xaddl %ecx, (%rsp)
182 # CHECK-NEXT: 1. 2 16.0 0.0 4.0 addl %ecx, %ecx
183 # CHECK-NEXT: 2. 2 17.0 0.0 4.0 addl %ecx, %ecx
184 # CHECK-NEXT: 3. 2 17.0 0.0 1.0 imull %ecx, %ecx
185 # CHECK-NEXT: 4. 2 20.0 0.0 0.0 imull %ecx, %ecx
186 # CHECK-NEXT: 2 15.4 0.1 1.8 <total>