1 # RUN: llc -march=amdgcn -mcpu=gfx1010 -verify-machineinstrs -run-pass post-RA-hazard-rec -o - %s | FileCheck -check-prefix=GCN %s
3 # GCN-LABEL: name: vmem_write_sgpr
4 # GCN: BUFFER_LOAD_DWORD_OFFEN
11 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
14 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
17 # GCN-LABEL: name: vmem_smem_write_sgpr
18 # GCN: BUFFER_LOAD_DWORD_OFFEN
20 # GCN-NEXT: S_LOAD_DWORD_IMM
22 name: vmem_smem_write_sgpr
25 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
28 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
29 $sgpr0 = S_LOAD_DWORD_IMM $sgpr0_sgpr1, 0, 0, 0
31 # GCN-LABEL: name: vmem_snop_write_sgpr
32 # GCN: BUFFER_LOAD_DWORD_OFFEN
37 name: vmem_snop_write_sgpr
40 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
43 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
47 # GCN-LABEL: name: vmem_valu_write_sgpr
48 # GCN: BUFFER_LOAD_DWORD_OFFEN
52 name: vmem_valu_write_sgpr
55 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
58 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
59 $vgpr2 = V_ADD_F32_e32 $vgpr1, $vgpr1, implicit $exec
62 # GCN-LABEL: name: vmem_swait0_write_sgpr
63 # GCN: BUFFER_LOAD_DWORD_OFFEN
67 name: vmem_swait0_write_sgpr
70 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
73 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
77 # GCN-LABEL: name: vmem_swait_any_write_sgpr
78 # GCN: BUFFER_LOAD_DWORD_OFFEN
83 name: vmem_swait_any_write_sgpr
86 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
89 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
93 # GCN-LABEL: name: vmem_write_exec_impread
94 # GCN: BUFFER_LOAD_DWORD_OFFEN
98 name: vmem_write_exec_impread
101 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
102 $sgpr4 = IMPLICIT_DEF
103 $vgpr0 = IMPLICIT_DEF
104 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
107 # GCN-LABEL: name: vmem_write_exec_expread
108 # GCN: BUFFER_LOAD_DWORD_OFFEN
110 # GCN-NEXT: S_MOV_B64
112 name: vmem_write_exec_expread
115 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
116 $vgpr0 = IMPLICIT_DEF
117 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $exec_lo, 0, 0, 0, 0, 0, implicit $exec
120 # GCN-LABEL: name: ds_write_m0
123 # GCN-NEXT: S_MOV_B32
128 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
129 $sgpr4 = IMPLICIT_DEF
130 $vgpr0 = IMPLICIT_DEF
131 $vgpr1 = DS_READ_B32 $vgpr0, 0, 0, implicit $m0, implicit $exec
134 # GCN-LABEL: name: vmem_write_sgpr_fall_through
135 # GCN: BUFFER_LOAD_DWORD_OFFEN
137 # GCN-NEXT: S_MOV_B32
139 name: vmem_write_sgpr_fall_through
143 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
144 $sgpr4 = IMPLICIT_DEF
145 $vgpr0 = IMPLICIT_DEF
146 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
151 # GCN-LABEL: name: vmem_write_sgpr_branch
152 # GCN: BUFFER_LOAD_DWORD_OFFEN
155 # GCN-NEXT: S_MOV_B32
157 name: vmem_write_sgpr_branch
161 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
162 $sgpr4 = IMPLICIT_DEF
163 $vgpr0 = IMPLICIT_DEF
164 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
170 # GCN-LABEL: name: vmem_write_sgpr_branch_around
171 # GCN: BUFFER_LOAD_DWORD_OFFEN
175 # GCN-NEXT: S_MOV_B32
177 name: vmem_write_sgpr_branch_around
181 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
182 $sgpr4 = IMPLICIT_DEF
183 $vgpr0 = IMPLICIT_DEF
184 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
194 # GCN-LABEL: name: vmem_write_sgpr_branch_backedge
195 # GCN: $vgpr0 = IMPLICIT_DEF
197 # GCN-NEXT: S_MOV_B32
199 name: vmem_write_sgpr_branch_backedge
203 $sgpr0_sgpr1_sgpr2_sgpr3 = IMPLICIT_DEF
204 $sgpr4 = IMPLICIT_DEF
205 $vgpr0 = IMPLICIT_DEF
209 $vgpr1 = BUFFER_LOAD_DWORD_OFFEN $vgpr0, $sgpr0_sgpr1_sgpr2_sgpr3, $sgpr4, 0, 0, 0, 0, 0, implicit $exec
212 # GCN-LABEL: name: ds_write_exec
213 # GCN: DS_WRITE_B32_gfx9
215 # GCN-NEXT: S_MOV_B32
220 $vgpr0 = IMPLICIT_DEF
221 $vgpr1 = IMPLICIT_DEF
222 DS_WRITE_B32_gfx9 $vgpr0, $vgpr1, 0, 0, implicit $exec
223 $exec_lo = S_MOV_B32 -1