1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 5
2 # RUN: llc -mtriple=amdgcn -mcpu=gfx1100 -mattr=+wavefrontsize64 -verify-machineinstrs -run-pass=amdgpu-insert-delay-alu %s -o - | FileCheck %s
8 ; CHECK-LABEL: name: valu_dep_1
9 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
10 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_1
11 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
12 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
13 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
20 ; CHECK-LABEL: name: valu_dep_2
21 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
22 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
23 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_2
24 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
25 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
26 $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
27 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
34 ; CHECK-LABEL: name: valu_dep_3
35 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
36 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
37 ; CHECK-NEXT: $vgpr2 = V_ADD_U32_e32 $vgpr2, $vgpr2, implicit $exec
38 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_3
39 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
40 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
41 $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
42 $vgpr2 = V_ADD_U32_e32 $vgpr2, $vgpr2, implicit $exec
43 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
50 ; CHECK-LABEL: name: valu_dep_4
51 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
52 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
53 ; CHECK-NEXT: $vgpr2 = V_ADD_U32_e32 $vgpr2, $vgpr2, implicit $exec
54 ; CHECK-NEXT: $vgpr3 = V_ADD_U32_e32 $vgpr3, $vgpr3, implicit $exec
55 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_4
56 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
57 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
58 $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
59 $vgpr2 = V_ADD_U32_e32 $vgpr2, $vgpr2, implicit $exec
60 $vgpr3 = V_ADD_U32_e32 $vgpr3, $vgpr3, implicit $exec
61 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
68 ; CHECK-LABEL: name: trans32_dep_1
69 ; CHECK: $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
70 ; CHECK-NEXT: S_DELAY_ALU .id0_TRANS32_DEP_1
71 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
72 $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
73 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
80 ; CHECK-LABEL: name: trans32_dep_2
81 ; CHECK: $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
82 ; CHECK-NEXT: $vgpr1 = V_EXP_F32_e32 $vgpr1, implicit $exec, implicit $mode
83 ; CHECK-NEXT: S_DELAY_ALU .id0_TRANS32_DEP_2
84 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
85 $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
86 $vgpr1 = V_EXP_F32_e32 $vgpr1, implicit $exec, implicit $mode
87 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
94 ; CHECK-LABEL: name: trans32_dep_3
95 ; CHECK: $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
96 ; CHECK-NEXT: $vgpr1 = V_EXP_F32_e32 $vgpr1, implicit $exec, implicit $mode
97 ; CHECK-NEXT: $vgpr2 = V_EXP_F32_e32 $vgpr2, implicit $exec, implicit $mode
98 ; CHECK-NEXT: S_DELAY_ALU .id0_TRANS32_DEP_3
99 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
100 $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
101 $vgpr1 = V_EXP_F32_e32 $vgpr1, implicit $exec, implicit $mode
102 $vgpr2 = V_EXP_F32_e32 $vgpr2, implicit $exec, implicit $mode
103 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
110 ; CHECK-LABEL: name: salu_cycle_1
111 ; CHECK: $sgpr0 = S_MOV_B32 0
112 ; CHECK-NEXT: S_DELAY_ALU .id0_SALU_CYCLE_1
113 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $sgpr0, $vgpr0, implicit $exec
115 $vgpr0 = V_ADD_U32_e32 $sgpr0, $vgpr0, implicit $exec
119 name: valu_dep_1_same_trans32_dep_1
122 ; CHECK-LABEL: name: valu_dep_1_same_trans32_dep_1
123 ; CHECK: $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
124 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
125 ; CHECK-NEXT: S_DELAY_ALU .id0_TRANS32_DEP_1_skip_SAME_id1_VALU_DEP_1
126 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
127 $vgpr0 = V_EXP_F32_e32 $vgpr0, implicit $exec, implicit $mode
128 $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
129 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
133 name: valu_dep_1_same_salu_cycle_1
136 ; CHECK-LABEL: name: valu_dep_1_same_salu_cycle_1
137 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
138 ; CHECK-NEXT: $sgpr0 = S_MOV_B32 0
139 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_1_skip_SAME_id1_SALU_CYCLE_1
140 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $sgpr0, $vgpr0, implicit $exec
141 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
143 $vgpr0 = V_ADD_U32_e32 $sgpr0, $vgpr0, implicit $exec
147 name: valu_dep_1_next_valu_dep_1
150 ; CHECK-LABEL: name: valu_dep_1_next_valu_dep_1
151 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
152 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_1_skip_NEXT_id1_VALU_DEP_1
153 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
154 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
155 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
156 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
157 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
161 name: valu_dep_2_next_valu_dep_2
164 ; CHECK-LABEL: name: valu_dep_2_next_valu_dep_2
165 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
166 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
167 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_2_skip_NEXT_id1_VALU_DEP_2
168 ; CHECK-NEXT: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
169 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
170 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
171 $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
172 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
173 $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
177 name: valu_dep_2_skip_valu_dep_2
180 ; CHECK-LABEL: name: valu_dep_2_skip_valu_dep_2
181 ; CHECK: $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
182 ; CHECK-NEXT: $vgpr2 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
183 ; CHECK-NEXT: S_DELAY_ALU .id0_VALU_DEP_2_skip_SKIP_1_id1_VALU_DEP_2
184 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
185 ; CHECK-NEXT: $vgpr4 = V_ADD_U32_e32 $vgpr3, $vgpr3, implicit $exec
186 ; CHECK-NEXT: $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
187 $vgpr0 = V_ADD_U32_e32 $vgpr0, $vgpr0, implicit $exec
188 $vgpr2 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec
189 $vgpr1 = V_ADD_U32_e32 $vgpr0, $vgpr1, implicit $exec
190 $vgpr4 = V_ADD_U32_e32 $vgpr3, $vgpr3, implicit $exec
191 $vgpr1 = V_ADD_U32_e32 $vgpr1, $vgpr1, implicit $exec