clear-super-register-2.s
5.65 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
# NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=x86-64 -iterations=100 -resource-pressure=false -timeline -timeline-max-iterations=3 < %s | FileCheck %s
# movss/movsd explicitly zeroes out the high bits of xmm,
# so addps can start immediately, without waiting for sqrtss to finish.
# AMD SOG for the AMD family 10h and 12h processors, 4.8 Partial-Register Writes
# LLVM-MCA-BEGIN
sqrtss %xmm0, %xmm0
movss (%eax), %xmm0
addps %xmm0, %xmm0
# LLVM-MCA-END
# LLVM-MCA-BEGIN
sqrtsd %xmm0, %xmm0
movsd (%eax), %xmm0
addps %xmm0, %xmm0
# LLVM-MCA-END
# CHECK: [0] Code Region
# CHECK: Iterations: 100
# CHECK-NEXT: Instructions: 300
# CHECK-NEXT: Total Cycles: 1403
# CHECK-NEXT: Total uOps: 300
# CHECK: Dispatch Width: 4
# CHECK-NEXT: uOps Per Cycle: 0.21
# CHECK-NEXT: IPC: 0.21
# CHECK-NEXT: Block RThroughput: 14.0
# CHECK: Instruction Info:
# CHECK-NEXT: [1]: #uOps
# CHECK-NEXT: [2]: Latency
# CHECK-NEXT: [3]: RThroughput
# CHECK-NEXT: [4]: MayLoad
# CHECK-NEXT: [5]: MayStore
# CHECK-NEXT: [6]: HasSideEffects (U)
# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
# CHECK-NEXT: 1 14 14.00 sqrtss %xmm0, %xmm0
# CHECK-NEXT: 1 6 0.50 * movss (%eax), %xmm0
# CHECK-NEXT: 1 3 1.00 addps %xmm0, %xmm0
# CHECK: Timeline view:
# CHECK-NEXT: 0123456789 0123456789
# CHECK-NEXT: Index 0123456789 0123456789 01234
# CHECK: [0,0] DeeeeeeeeeeeeeeER . . . . . . sqrtss %xmm0, %xmm0
# CHECK-NEXT: [0,1] DeeeeeeE--------R . . . . . . movss (%eax), %xmm0
# CHECK-NEXT: [0,2] D======eeeE-----R . . . . . . addps %xmm0, %xmm0
# CHECK-NEXT: [1,0] D==============eeeeeeeeeeeeeeER . . . sqrtss %xmm0, %xmm0
# CHECK-NEXT: [1,1] .DeeeeeeE---------------------R . . . movss (%eax), %xmm0
# CHECK-NEXT: [1,2] .D======eeeE------------------R . . . addps %xmm0, %xmm0
# CHECK-NEXT: [2,0] .D===========================eeeeeeeeeeeeeeER sqrtss %xmm0, %xmm0
# CHECK-NEXT: [2,1] .DeeeeeeE-----------------------------------R movss (%eax), %xmm0
# CHECK-NEXT: [2,2] . D======eeeE-------------------------------R addps %xmm0, %xmm0
# CHECK: Average Wait times (based on the timeline view):
# CHECK-NEXT: [0]: Executions
# CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
# CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
# CHECK: [0] [1] [2] [3]
# CHECK-NEXT: 0. 3 14.7 8.0 0.0 sqrtss %xmm0, %xmm0
# CHECK-NEXT: 1. 3 1.0 1.0 21.3 movss (%eax), %xmm0
# CHECK-NEXT: 2. 3 7.0 0.3 18.0 addps %xmm0, %xmm0
# CHECK-NEXT: 3 7.6 3.1 13.1 <total>
# CHECK: [1] Code Region
# CHECK: Iterations: 100
# CHECK-NEXT: Instructions: 300
# CHECK-NEXT: Total Cycles: 2103
# CHECK-NEXT: Total uOps: 300
# CHECK: Dispatch Width: 4
# CHECK-NEXT: uOps Per Cycle: 0.14
# CHECK-NEXT: IPC: 0.14
# CHECK-NEXT: Block RThroughput: 21.0
# CHECK: Instruction Info:
# CHECK-NEXT: [1]: #uOps
# CHECK-NEXT: [2]: Latency
# CHECK-NEXT: [3]: RThroughput
# CHECK-NEXT: [4]: MayLoad
# CHECK-NEXT: [5]: MayStore
# CHECK-NEXT: [6]: HasSideEffects (U)
# CHECK: [1] [2] [3] [4] [5] [6] Instructions:
# CHECK-NEXT: 1 21 21.00 sqrtsd %xmm0, %xmm0
# CHECK-NEXT: 1 6 0.50 * movsd (%eax), %xmm0
# CHECK-NEXT: 1 3 1.00 addps %xmm0, %xmm0
# CHECK: Timeline view:
# CHECK-NEXT: 0123456789 0123456789 0123456789
# CHECK-NEXT: Index 0123456789 0123456789 0123456789 012345
# CHECK: [0,0] DeeeeeeeeeeeeeeeeeeeeeER . . . . . . . . . sqrtsd %xmm0, %xmm0
# CHECK-NEXT: [0,1] DeeeeeeE---------------R . . . . . . . . . movsd (%eax), %xmm0
# CHECK-NEXT: [0,2] D======eeeE------------R . . . . . . . . . addps %xmm0, %xmm0
# CHECK-NEXT: [1,0] D=====================eeeeeeeeeeeeeeeeeeeeeER. . . . . sqrtsd %xmm0, %xmm0
# CHECK-NEXT: [1,1] .DeeeeeeE-----------------------------------R. . . . . movsd (%eax), %xmm0
# CHECK-NEXT: [1,2] .D======eeeE--------------------------------R. . . . . addps %xmm0, %xmm0
# CHECK-NEXT: [2,0] .D=========================================eeeeeeeeeeeeeeeeeeeeeER sqrtsd %xmm0, %xmm0
# CHECK-NEXT: [2,1] .DeeeeeeE--------------------------------------------------------R movsd (%eax), %xmm0
# CHECK-NEXT: [2,2] . D======eeeE----------------------------------------------------R addps %xmm0, %xmm0
# CHECK: Average Wait times (based on the timeline view):
# CHECK-NEXT: [0]: Executions
# CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
# CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
# CHECK: [0] [1] [2] [3]
# CHECK-NEXT: 0. 3 21.7 15.0 0.0 sqrtsd %xmm0, %xmm0
# CHECK-NEXT: 1. 3 1.0 1.0 35.3 movsd (%eax), %xmm0
# CHECK-NEXT: 2. 3 7.0 0.3 32.0 addps %xmm0, %xmm0
# CHECK-NEXT: 3 9.9 5.4 22.4 <total>