Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-mca / X86 / BtVer2 / stmxcsr-ldmxcsr.s
blobb1768957c58f4696d3b7c25512a063c28c2606cd
1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -timeline -timeline-max-iterations=3 < %s | FileCheck %s
4 # Code snippet taken from PR48024.
6 stmxcsr -4(%rsp)
7 movl $-24577, %eax # imm = 0x9FFF
8 andl -4(%rsp), %eax
9 movl %eax, -8(%rsp)
10 ldmxcsr -8(%rsp)
11 retq
13 # CHECK: Iterations: 100
14 # CHECK-NEXT: Instructions: 600
15 # CHECK-NEXT: Total Cycles: 407
16 # CHECK-NEXT: Total uOps: 600
18 # CHECK: Dispatch Width: 2
19 # CHECK-NEXT: uOps Per Cycle: 1.47
20 # CHECK-NEXT: IPC: 1.47
21 # CHECK-NEXT: Block RThroughput: 3.0
23 # CHECK: Instruction Info:
24 # CHECK-NEXT: [1]: #uOps
25 # CHECK-NEXT: [2]: Latency
26 # CHECK-NEXT: [3]: RThroughput
27 # CHECK-NEXT: [4]: MayLoad
28 # CHECK-NEXT: [5]: MayStore
29 # CHECK-NEXT: [6]: HasSideEffects (U)
31 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
32 # CHECK-NEXT: 1 1 1.00 * U stmxcsr -4(%rsp)
33 # CHECK-NEXT: 1 1 0.50 movl $-24577, %eax
34 # CHECK-NEXT: 1 4 1.00 * andl -4(%rsp), %eax
35 # CHECK-NEXT: 1 1 1.00 * movl %eax, -8(%rsp)
36 # CHECK-NEXT: 1 3 1.00 * * U ldmxcsr -8(%rsp)
37 # CHECK-NEXT: 1 4 1.00 U retq
39 # CHECK: Resources:
40 # CHECK-NEXT: [0] - JALU0
41 # CHECK-NEXT: [1] - JALU1
42 # CHECK-NEXT: [2] - JDiv
43 # CHECK-NEXT: [3] - JFPA
44 # CHECK-NEXT: [4] - JFPM
45 # CHECK-NEXT: [5] - JFPU0
46 # CHECK-NEXT: [6] - JFPU1
47 # CHECK-NEXT: [7] - JLAGU
48 # CHECK-NEXT: [8] - JMul
49 # CHECK-NEXT: [9] - JSAGU
50 # CHECK-NEXT: [10] - JSTC
51 # CHECK-NEXT: [11] - JVALU0
52 # CHECK-NEXT: [12] - JVALU1
53 # CHECK-NEXT: [13] - JVIMUL
55 # CHECK: Resource pressure per iteration:
56 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13]
57 # CHECK-NEXT: 1.50 1.50 - - - - - 3.00 - 2.00 - - - -
59 # CHECK: Resource pressure by instruction:
60 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions:
61 # CHECK-NEXT: - - - - - - - - - 1.00 - - - - stmxcsr -4(%rsp)
62 # CHECK-NEXT: 0.50 0.50 - - - - - - - - - - - - movl $-24577, %eax
63 # CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - - - - - - andl -4(%rsp), %eax
64 # CHECK-NEXT: - - - - - - - - - 1.00 - - - - movl %eax, -8(%rsp)
65 # CHECK-NEXT: - - - - - - - 1.00 - - - - - - ldmxcsr -8(%rsp)
66 # CHECK-NEXT: 0.50 0.50 - - - - - 1.00 - - - - - - retq
68 # CHECK: Timeline view:
69 # CHECK-NEXT: 012345678
70 # CHECK-NEXT: Index 0123456789
72 # CHECK: [0,0] DeER . . . . stmxcsr -4(%rsp)
73 # CHECK-NEXT: [0,1] DeER . . . . movl $-24577, %eax
74 # CHECK-NEXT: [0,2] .DeeeeER . . . andl -4(%rsp), %eax
75 # CHECK-NEXT: [0,3] .D====eER . . . movl %eax, -8(%rsp)
76 # CHECK-NEXT: [0,4] . D===eeeER . . ldmxcsr -8(%rsp)
77 # CHECK-NEXT: [0,5] . DeeeeE--R . . retq
78 # CHECK-NEXT: [1,0] . D=====eER . . stmxcsr -4(%rsp)
79 # CHECK-NEXT: [1,1] . DeE-----R . . movl $-24577, %eax
80 # CHECK-NEXT: [1,2] . DeeeeE--R . . andl -4(%rsp), %eax
81 # CHECK-NEXT: [1,3] . D=====eER . . movl %eax, -8(%rsp)
82 # CHECK-NEXT: [1,4] . D====eeeER. . ldmxcsr -8(%rsp)
83 # CHECK-NEXT: [1,5] . D=eeeeE--R. . retq
84 # CHECK-NEXT: [2,0] . .D======eER . stmxcsr -4(%rsp)
85 # CHECK-NEXT: [2,1] . .DeE------R . movl $-24577, %eax
86 # CHECK-NEXT: [2,2] . . DeeeeE---R . andl -4(%rsp), %eax
87 # CHECK-NEXT: [2,3] . . D======eER . movl %eax, -8(%rsp)
88 # CHECK-NEXT: [2,4] . . D=====eeeER ldmxcsr -8(%rsp)
89 # CHECK-NEXT: [2,5] . . DeeeeE----R retq
91 # CHECK: Average Wait times (based on the timeline view):
92 # CHECK-NEXT: [0]: Executions
93 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
94 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
95 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
97 # CHECK: [0] [1] [2] [3]
98 # CHECK-NEXT: 0. 3 4.7 0.3 0.0 stmxcsr -4(%rsp)
99 # CHECK-NEXT: 1. 3 1.0 1.0 3.7 movl $-24577, %eax
100 # CHECK-NEXT: 2. 3 1.0 1.0 1.7 andl -4(%rsp), %eax
101 # CHECK-NEXT: 3. 3 6.0 0.7 0.0 movl %eax, -8(%rsp)
102 # CHECK-NEXT: 4. 3 5.0 0.0 0.0 ldmxcsr -8(%rsp)
103 # CHECK-NEXT: 5. 3 1.3 1.3 2.7 retq
104 # CHECK-NEXT: 3 3.2 0.7 1.3 <total>