Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / tools / llvm-mca / X86 / Znver3 / partial-reg-update-4.s
blob582da14211d0dcbfba418654b63f6aacdf4199d7
1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=znver3 -iterations=1500 -timeline -timeline-max-iterations=7 < %s | FileCheck %s
4 # The lzcnt cannot execute in parallel with the imul because there is a false
5 # dependency on %bx.
7 imul %ax, %bx
8 lzcnt %ax, %bx
9 add %cx, %bx
11 # CHECK: Iterations: 1500
12 # CHECK-NEXT: Instructions: 4500
13 # CHECK-NEXT: Total Cycles: 7503
14 # CHECK-NEXT: Total uOps: 4500
16 # CHECK: Dispatch Width: 6
17 # CHECK-NEXT: uOps Per Cycle: 0.60
18 # CHECK-NEXT: IPC: 0.60
19 # CHECK-NEXT: Block RThroughput: 1.3
21 # CHECK: Instruction Info:
22 # CHECK-NEXT: [1]: #uOps
23 # CHECK-NEXT: [2]: Latency
24 # CHECK-NEXT: [3]: RThroughput
25 # CHECK-NEXT: [4]: MayLoad
26 # CHECK-NEXT: [5]: MayStore
27 # CHECK-NEXT: [6]: HasSideEffects (U)
29 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
30 # CHECK-NEXT: 1 3 1.00 imulw %ax, %bx
31 # CHECK-NEXT: 1 1 1.00 lzcntw %ax, %bx
32 # CHECK-NEXT: 1 1 0.25 addw %cx, %bx
34 # CHECK: Resources:
35 # CHECK-NEXT: [0] - Zn3AGU0
36 # CHECK-NEXT: [1] - Zn3AGU1
37 # CHECK-NEXT: [2] - Zn3AGU2
38 # CHECK-NEXT: [3] - Zn3ALU0
39 # CHECK-NEXT: [4] - Zn3ALU1
40 # CHECK-NEXT: [5] - Zn3ALU2
41 # CHECK-NEXT: [6] - Zn3ALU3
42 # CHECK-NEXT: [7] - Zn3BRU1
43 # CHECK-NEXT: [8] - Zn3FPP0
44 # CHECK-NEXT: [9] - Zn3FPP1
45 # CHECK-NEXT: [10] - Zn3FPP2
46 # CHECK-NEXT: [11] - Zn3FPP3
47 # CHECK-NEXT: [12.0] - Zn3FPP45
48 # CHECK-NEXT: [12.1] - Zn3FPP45
49 # CHECK-NEXT: [13] - Zn3FPSt
50 # CHECK-NEXT: [14.0] - Zn3LSU
51 # CHECK-NEXT: [14.1] - Zn3LSU
52 # CHECK-NEXT: [14.2] - Zn3LSU
53 # CHECK-NEXT: [15.0] - Zn3Load
54 # CHECK-NEXT: [15.1] - Zn3Load
55 # CHECK-NEXT: [15.2] - Zn3Load
56 # CHECK-NEXT: [16.0] - Zn3Store
57 # CHECK-NEXT: [16.1] - Zn3Store
59 # CHECK: Resource pressure per iteration:
60 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12.0] [12.1] [13] [14.0] [14.1] [14.2] [15.0] [15.1] [15.2] [16.0] [16.1]
61 # CHECK-NEXT: - - - 1.67 1.00 1.67 1.67 - - - - - - - - - - - - - - - -
63 # CHECK: Resource pressure by instruction:
64 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12.0] [12.1] [13] [14.0] [14.1] [14.2] [15.0] [15.1] [15.2] [16.0] [16.1] Instructions:
65 # CHECK-NEXT: - - - - 1.00 - - - - - - - - - - - - - - - - - - imulw %ax, %bx
66 # CHECK-NEXT: - - - 1.33 - 1.33 1.33 - - - - - - - - - - - - - - - - lzcntw %ax, %bx
67 # CHECK-NEXT: - - - 0.33 - 0.33 0.33 - - - - - - - - - - - - - - - - addw %cx, %bx
69 # CHECK: Timeline view:
70 # CHECK-NEXT: 0123456789 01234567
71 # CHECK-NEXT: Index 0123456789 0123456789
73 # CHECK: [0,0] DeeeER . . . . . . . imulw %ax, %bx
74 # CHECK-NEXT: [0,1] D===eER . . . . . . . lzcntw %ax, %bx
75 # CHECK-NEXT: [0,2] D====eER . . . . . . . addw %cx, %bx
76 # CHECK-NEXT: [1,0] D=====eeeER . . . . . . imulw %ax, %bx
77 # CHECK-NEXT: [1,1] D========eER . . . . . . lzcntw %ax, %bx
78 # CHECK-NEXT: [1,2] D=========eER . . . . . . addw %cx, %bx
79 # CHECK-NEXT: [2,0] .D=========eeeER . . . . . imulw %ax, %bx
80 # CHECK-NEXT: [2,1] .D============eER . . . . . lzcntw %ax, %bx
81 # CHECK-NEXT: [2,2] .D=============eER . . . . . addw %cx, %bx
82 # CHECK-NEXT: [3,0] .D==============eeeER . . . . imulw %ax, %bx
83 # CHECK-NEXT: [3,1] .D=================eER . . . . lzcntw %ax, %bx
84 # CHECK-NEXT: [3,2] .D==================eER . . . . addw %cx, %bx
85 # CHECK-NEXT: [4,0] . D==================eeeER . . . imulw %ax, %bx
86 # CHECK-NEXT: [4,1] . D=====================eER . . . lzcntw %ax, %bx
87 # CHECK-NEXT: [4,2] . D======================eER . . . addw %cx, %bx
88 # CHECK-NEXT: [5,0] . D=======================eeeER . . imulw %ax, %bx
89 # CHECK-NEXT: [5,1] . D==========================eER . . lzcntw %ax, %bx
90 # CHECK-NEXT: [5,2] . D===========================eER . . addw %cx, %bx
91 # CHECK-NEXT: [6,0] . D===========================eeeER . imulw %ax, %bx
92 # CHECK-NEXT: [6,1] . D==============================eER. lzcntw %ax, %bx
93 # CHECK-NEXT: [6,2] . D===============================eER addw %cx, %bx
95 # CHECK: Average Wait times (based on the timeline view):
96 # CHECK-NEXT: [0]: Executions
97 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
98 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
99 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
101 # CHECK: [0] [1] [2] [3]
102 # CHECK-NEXT: 0. 7 14.7 0.1 0.0 imulw %ax, %bx
103 # CHECK-NEXT: 1. 7 17.7 0.0 0.0 lzcntw %ax, %bx
104 # CHECK-NEXT: 2. 7 18.7 0.0 0.0 addw %cx, %bx
105 # CHECK-NEXT: 7 17.0 0.0 0.0 <total>