[SandboxVec][Utils] Implement Utils::verifyFunction() (#124356)
[llvm-project.git] / llvm / test / tools / llvm-mca / RISCV / SiFive7 / gpr-bypass-c.s
blobc7ff5e6a6b9c4bb1462338ea6b21fa6f71fd49e6
1 # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py
2 # RUN: llvm-mca -mtriple=riscv64 -mcpu=sifive-u74 -mattr=+c -timeline \
3 # RUN: -timeline-max-cycles=1000 -iterations=1 < %s | FileCheck %s
5 c.lui a0, 1
6 c.add a0, a0
7 c.addi a0, 1
8 c.addw a0, a0
9 c.addiw a0, 1
10 c.sub a0, a0
11 c.subw a0, a0
12 c.and a0, a0
13 c.andi a0, 1
14 c.or a0, a0
15 c.xor a0, a0
16 c.slli a0, 1
17 c.srli a0, 1
18 c.srai a0, 1
19 c.add a0, a0
20 beqz a0, 1f
22 c.add a0, a0
23 bnez a0, 1f
25 c.add a0, a0
26 c.jr a0
28 # CHECK: Iterations: 1
29 # CHECK-NEXT: Instructions: 20
30 # CHECK-NEXT: Total Cycles: 21
31 # CHECK-NEXT: Total uOps: 20
33 # CHECK: Dispatch Width: 2
34 # CHECK-NEXT: uOps Per Cycle: 0.95
35 # CHECK-NEXT: IPC: 0.95
36 # CHECK-NEXT: Block RThroughput: 10.0
38 # CHECK: Instruction Info:
39 # CHECK-NEXT: [1]: #uOps
40 # CHECK-NEXT: [2]: Latency
41 # CHECK-NEXT: [3]: RThroughput
42 # CHECK-NEXT: [4]: MayLoad
43 # CHECK-NEXT: [5]: MayStore
44 # CHECK-NEXT: [6]: HasSideEffects (U)
46 # CHECK: [1] [2] [3] [4] [5] [6] Instructions:
47 # CHECK-NEXT: 1 3 0.50 lui a0, 1
48 # CHECK-NEXT: 1 3 0.50 add a0, a0, a0
49 # CHECK-NEXT: 1 3 0.50 addi a0, a0, 1
50 # CHECK-NEXT: 1 3 0.50 addw a0, a0, a0
51 # CHECK-NEXT: 1 3 0.50 addiw a0, a0, 1
52 # CHECK-NEXT: 1 3 0.50 sub a0, a0, a0
53 # CHECK-NEXT: 1 3 0.50 subw a0, a0, a0
54 # CHECK-NEXT: 1 3 0.50 and a0, a0, a0
55 # CHECK-NEXT: 1 3 0.50 andi a0, a0, 1
56 # CHECK-NEXT: 1 3 0.50 or a0, a0, a0
57 # CHECK-NEXT: 1 3 0.50 xor a0, a0, a0
58 # CHECK-NEXT: 1 3 0.50 slli a0, a0, 1
59 # CHECK-NEXT: 1 3 0.50 srli a0, a0, 1
60 # CHECK-NEXT: 1 3 0.50 srai a0, a0, 1
61 # CHECK-NEXT: 1 3 0.50 add a0, a0, a0
62 # CHECK-NEXT: 1 3 1.00 beqz a0, .Ltmp0
63 # CHECK-NEXT: 1 3 0.50 add a0, a0, a0
64 # CHECK-NEXT: 1 3 1.00 bnez a0, .Ltmp1
65 # CHECK-NEXT: 1 3 0.50 add a0, a0, a0
66 # CHECK-NEXT: 1 3 1.00 jr a0
68 # CHECK: Resources:
69 # CHECK-NEXT: [0] - SiFive7FDiv
70 # CHECK-NEXT: [1] - SiFive7IDiv
71 # CHECK-NEXT: [2] - SiFive7PipeA
72 # CHECK-NEXT: [3] - SiFive7PipeB
73 # CHECK-NEXT: [4] - SiFive7VA
74 # CHECK-NEXT: [5] - SiFive7VCQ
75 # CHECK-NEXT: [6] - SiFive7VL
76 # CHECK-NEXT: [7] - SiFive7VS
78 # CHECK: Resource pressure per iteration:
79 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7]
80 # CHECK-NEXT: - - 9.00 11.00 - - - -
82 # CHECK: Resource pressure by instruction:
83 # CHECK-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] Instructions:
84 # CHECK-NEXT: - - - 1.00 - - - - lui a0, 1
85 # CHECK-NEXT: - - 1.00 - - - - - add a0, a0, a0
86 # CHECK-NEXT: - - - 1.00 - - - - addi a0, a0, 1
87 # CHECK-NEXT: - - 1.00 - - - - - addw a0, a0, a0
88 # CHECK-NEXT: - - - 1.00 - - - - addiw a0, a0, 1
89 # CHECK-NEXT: - - 1.00 - - - - - sub a0, a0, a0
90 # CHECK-NEXT: - - - 1.00 - - - - subw a0, a0, a0
91 # CHECK-NEXT: - - 1.00 - - - - - and a0, a0, a0
92 # CHECK-NEXT: - - - 1.00 - - - - andi a0, a0, 1
93 # CHECK-NEXT: - - 1.00 - - - - - or a0, a0, a0
94 # CHECK-NEXT: - - - 1.00 - - - - xor a0, a0, a0
95 # CHECK-NEXT: - - 1.00 - - - - - slli a0, a0, 1
96 # CHECK-NEXT: - - - 1.00 - - - - srli a0, a0, 1
97 # CHECK-NEXT: - - 1.00 - - - - - srai a0, a0, 1
98 # CHECK-NEXT: - - - 1.00 - - - - add a0, a0, a0
99 # CHECK-NEXT: - - - 1.00 - - - - beqz a0, .Ltmp0
100 # CHECK-NEXT: - - 1.00 - - - - - add a0, a0, a0
101 # CHECK-NEXT: - - - 1.00 - - - - bnez a0, .Ltmp1
102 # CHECK-NEXT: - - 1.00 - - - - - add a0, a0, a0
103 # CHECK-NEXT: - - - 1.00 - - - - jr a0
105 # CHECK: Timeline view:
106 # CHECK-NEXT: 0123456789
107 # CHECK-NEXT: Index 0123456789 0
109 # CHECK: [0,0] DeeE . . . . lui a0, 1
110 # CHECK-NEXT: [0,1] .DeeE. . . . add a0, a0, a0
111 # CHECK-NEXT: [0,2] . DeeE . . . addi a0, a0, 1
112 # CHECK-NEXT: [0,3] . DeeE . . . addw a0, a0, a0
113 # CHECK-NEXT: [0,4] . DeeE . . . addiw a0, a0, 1
114 # CHECK-NEXT: [0,5] . DeeE . . . sub a0, a0, a0
115 # CHECK-NEXT: [0,6] . .DeeE. . . subw a0, a0, a0
116 # CHECK-NEXT: [0,7] . . DeeE . . and a0, a0, a0
117 # CHECK-NEXT: [0,8] . . DeeE . . andi a0, a0, 1
118 # CHECK-NEXT: [0,9] . . DeeE . . or a0, a0, a0
119 # CHECK-NEXT: [0,10] . . DeeE . . xor a0, a0, a0
120 # CHECK-NEXT: [0,11] . . .DeeE. . slli a0, a0, 1
121 # CHECK-NEXT: [0,12] . . . DeeE . srli a0, a0, 1
122 # CHECK-NEXT: [0,13] . . . DeeE . srai a0, a0, 1
123 # CHECK-NEXT: [0,14] . . . DeeE . add a0, a0, a0
124 # CHECK-NEXT: [0,15] . . . DeeE . beqz a0, .Ltmp0
125 # CHECK-NEXT: [0,16] . . . DeeE . add a0, a0, a0
126 # CHECK-NEXT: [0,17] . . . .DeeE. bnez a0, .Ltmp1
127 # CHECK-NEXT: [0,18] . . . .DeeE. add a0, a0, a0
128 # CHECK-NEXT: [0,19] . . . . DeeE jr a0
130 # CHECK: Average Wait times (based on the timeline view):
131 # CHECK-NEXT: [0]: Executions
132 # CHECK-NEXT: [1]: Average time spent waiting in a scheduler's queue
133 # CHECK-NEXT: [2]: Average time spent waiting in a scheduler's queue while ready
134 # CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
136 # CHECK: [0] [1] [2] [3]
137 # CHECK-NEXT: 0. 1 0.0 0.0 0.0 lui a0, 1
138 # CHECK-NEXT: 1. 1 0.0 0.0 0.0 add a0, a0, a0
139 # CHECK-NEXT: 2. 1 0.0 0.0 0.0 addi a0, a0, 1
140 # CHECK-NEXT: 3. 1 0.0 0.0 0.0 addw a0, a0, a0
141 # CHECK-NEXT: 4. 1 0.0 0.0 0.0 addiw a0, a0, 1
142 # CHECK-NEXT: 5. 1 0.0 0.0 0.0 sub a0, a0, a0
143 # CHECK-NEXT: 6. 1 0.0 0.0 0.0 subw a0, a0, a0
144 # CHECK-NEXT: 7. 1 0.0 0.0 0.0 and a0, a0, a0
145 # CHECK-NEXT: 8. 1 0.0 0.0 0.0 andi a0, a0, 1
146 # CHECK-NEXT: 9. 1 0.0 0.0 0.0 or a0, a0, a0
147 # CHECK-NEXT: 10. 1 0.0 0.0 0.0 xor a0, a0, a0
148 # CHECK-NEXT: 11. 1 0.0 0.0 0.0 slli a0, a0, 1
149 # CHECK-NEXT: 12. 1 0.0 0.0 0.0 srli a0, a0, 1
150 # CHECK-NEXT: 13. 1 0.0 0.0 0.0 srai a0, a0, 1
151 # CHECK-NEXT: 14. 1 0.0 0.0 0.0 add a0, a0, a0
152 # CHECK-NEXT: 15. 1 0.0 0.0 0.0 beqz a0, .Ltmp0
153 # CHECK-NEXT: 16. 1 0.0 0.0 0.0 add a0, a0, a0
154 # CHECK-NEXT: 17. 1 0.0 0.0 0.0 bnez a0, .Ltmp1
155 # CHECK-NEXT: 18. 1 0.0 0.0 0.0 add a0, a0, a0
156 # CHECK-NEXT: 19. 1 0.0 0.0 0.0 jr a0
157 # CHECK-NEXT: 1 0.0 0.0 0.0 <total>