[Frontend] Remove unused includes (NFC) (#116927)
[llvm-project.git] / llvm / test / MC / AMDGPU / gfx1030_new.s
blobeb7424caf6374f53161768d09606addd00044636
1 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1030 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
2 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1031 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
3 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1032 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
4 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1033 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
5 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1034 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
6 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1035 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
7 // RUN: llvm-mc -triple=amdgcn -mcpu=gfx1036 -show-encoding %s | FileCheck --check-prefix=GFX10 %s
9 global_load_dword_addtid v1, s[2:3] offset:16
10 // GFX10: encoding: [0x10,0x80,0x58,0xdc,0x00,0x00,0x02,0x01]
12 global_load_dword_addtid v1, s[2:3] offset:16 glc slc dlc
13 // GFX10: encoding: [0x10,0x90,0x5b,0xdc,0x00,0x00,0x02,0x01]
15 global_store_dword_addtid v1, s[2:3] offset:16 glc slc dlc
16 // GFX10: encoding: [0x10,0x90,0x5f,0xdc,0x00,0x01,0x02,0x00]
18 global_load_dword_addtid v1, off offset:16
19 // GFX10: encoding: [0x10,0x80,0x58,0xdc,0x00,0x00,0x7d,0x01]
21 global_load_dword_addtid v1, off offset:16 glc slc dlc
22 // GFX10: encoding: [0x10,0x90,0x5b,0xdc,0x00,0x00,0x7d,0x01]
24 global_store_dword_addtid v1, off offset:16 glc slc dlc
25 // GFX10: encoding: [0x10,0x90,0x5f,0xdc,0x00,0x01,0x7d,0x00]
27 global_store_dword v254, v1, s[2:3] offset:16
28 // GFX10: encoding: [0x10,0x80,0x70,0xdc,0xfe,0x01,0x02,0x00]
30 global_atomic_csub v2, v[0:1], v2, off offset:100 glc slc
31 // GFX10: encoding: [0x64,0x80,0xd3,0xdc,0x00,0x02,0x7d,0x02]
33 global_atomic_csub v[0:1], v2, off offset:100 slc
34 // GFX10: encoding: [0x64,0x80,0xd2,0xdc,0x00,0x02,0x7d,0x00]
36 global_atomic_csub v2, v[0:1], v2, off glc
37 // GFX10: encoding: [0x00,0x80,0xd1,0xdc,0x00,0x02,0x7d,0x02]
39 global_atomic_csub v[0:1], v2, off
40 // GFX10: encoding: [0x00,0x80,0xd0,0xdc,0x00,0x02,0x7d,0x00]
42 global_atomic_csub v2, v0, v2, s[2:3] glc
43 // GFX10: encoding: [0x00,0x80,0xd1,0xdc,0x00,0x02,0x02,0x02]
45 global_atomic_csub v0, v2, s[2:3]
46 // GFX10: encoding: [0x00,0x80,0xd0,0xdc,0x00,0x02,0x02,0x00]
48 global_atomic_csub v2, v0, v2, s[2:3] offset:100 glc slc
49 // GFX10: encoding: [0x64,0x80,0xd3,0xdc,0x00,0x02,0x02,0x02]
51 buffer_atomic_csub v5, off, s[8:11], s3 glc
52 // GFX10: encoding: [0x00,0x40,0xd0,0xe0,0x00,0x05,0x02,0x03]
54 buffer_atomic_csub v5, off, s[8:11], s3
55 // GFX10: encoding: [0x00,0x00,0xd0,0xe0,0x00,0x05,0x02,0x03]
57 buffer_atomic_csub v5, off, s[8:11], s3 offset:4095 glc
58 // GFX10: encoding: [0xff,0x4f,0xd0,0xe0,0x00,0x05,0x02,0x03]
60 buffer_atomic_csub v5, off, s[8:11], -1 offset:4095 glc
61 // GFX10: encoding: [0xff,0x4f,0xd0,0xe0,0x00,0x05,0x02,0xc1]
63 buffer_atomic_csub v5, v0, s[8:11], s3 offen offset:4095 glc
64 // GFX10: encoding: [0xff,0x5f,0xd0,0xe0,0x00,0x05,0x02,0x03]
66 buffer_atomic_csub v5, v0, s[8:11], s3 offen offset:4095
67 // GFX10: encoding: [0xff,0x1f,0xd0,0xe0,0x00,0x05,0x02,0x03]
69 buffer_atomic_csub v5, v0, s[8:11], s3 idxen offset:4095 glc
70 // GFX10: encoding: [0xff,0x6f,0xd0,0xe0,0x00,0x05,0x02,0x03]
72 buffer_atomic_csub v5, v0, s[8:11], s3 idxen offset:4095
73 // GFX10: encoding: [0xff,0x2f,0xd0,0xe0,0x00,0x05,0x02,0x03]
75 buffer_atomic_csub v5, off, s[8:11], s3 glc slc
76 // GFX10: encoding: [0x00,0x40,0xd0,0xe0,0x00,0x05,0x42,0x03]
78 buffer_atomic_csub v5, off, s[8:11], s3 slc
79 // GFX10: encoding: [0x00,0x00,0xd0,0xe0,0x00,0x05,0x42,0x03]
81 s_getreg_b32 s2, hwreg(HW_REG_SHADER_CYCLES)
82 // GFX10: encoding: [0x1d,0xf8,0x02,0xb9]
84 s_getreg_b32 s2, 29
85 // GFX10: s_getreg_b32 s2, hwreg(HW_REG_SHADER_CYCLES, 0, 1) ; encoding: [0x1d,0x00,0x02,0xb9]
87 s_getreg_b32 s2, hwreg(22)
88 // GFX10: s_getreg_b32 s2, hwreg(22) ; encoding: [0x16,0xf8,0x02,0xb9]
90 v_fma_legacy_f32 v0, v1, v2, v3
91 // GFX10: encoding: [0x00,0x00,0x40,0xd5,0x01,0x05,0x0e,0x04]
93 v_fma_legacy_f32 v0, v1, |v2|, -v3
94 // GFX10: encoding: [0x00,0x02,0x40,0xd5,0x01,0x05,0x0e,0x84]
96 v_fma_legacy_f32 v0, s1, 2.0, -v3
97 // GFX10: encoding: [0x00,0x00,0x40,0xd5,0x01,0xe8,0x0d,0x84]
99 v_fmac_legacy_f32 v0, v1, v2
100 // GFX10: encoding: [0x01,0x05,0x00,0x0c]
102 v_fmac_legacy_f32 v0, |v1|, -v2
103 // GFX10: encoding: [0x00,0x01,0x06,0xd5,0x01,0x05,0x02,0x40]
105 v_fmac_legacy_f32 v0, s1, 2.0
106 // GFX10: encoding: [0x00,0x00,0x06,0xd5,0x01,0xe8,0x01,0x00]
108 image_bvh_intersect_ray v[4:7], v[9:19], s[4:7]
109 // GFX10: encoding: [0x01,0x9f,0x98,0xf1,0x09,0x04,0x01,0x00]
111 image_bvh_intersect_ray v[4:7], v[9:19], s[4:7] noa16
112 // GFX10: encoding: [0x01,0x9f,0x98,0xf1,0x09,0x04,0x01,0x00]
114 image_bvh_intersect_ray v[4:7], v[9:16], s[4:7] a16
115 // GFX10: encoding: [0x01,0x9f,0x98,0xf1,0x09,0x04,0x01,0x40]
117 image_bvh64_intersect_ray v[4:7], v[9:20], s[4:7]
118 // GFX10: encoding: [0x01,0x9f,0x9c,0xf1,0x09,0x04,0x01,0x00]
120 image_bvh64_intersect_ray v[4:7], v[9:17], s[4:7] a16
121 // GFX10: encoding: [0x01,0x9f,0x9c,0xf1,0x09,0x04,0x01,0x40]
123 image_bvh_intersect_ray v[39:42], [v50, v46, v23, v17, v16, v15, v21, v20, v19, v37, v40], s[12:15]
124 // GFX10: encoding: [0x07,0x9f,0x98,0xf1,0x32,0x27,0x03,0x00,0x2e,0x17,0x11,0x10,0x0f,0x15,0x14,0x13,0x25,0x28,0x00,0x00]
126 image_bvh_intersect_ray v[39:42], [v50, v46, v23, v17, v16, v15, v21, v20, v19, v37, v40], s[12:15] noa16
127 // GFX10: encoding: [0x07,0x9f,0x98,0xf1,0x32,0x27,0x03,0x00,0x2e,0x17,0x11,0x10,0x0f,0x15,0x14,0x13,0x25,0x28,0x00,0x00]
129 image_bvh_intersect_ray v[39:42], [v50, v46, v23, v17, v16, v15, v21, v20], s[12:15] a16
130 // GFX10: encoding: [0x05,0x9f,0x98,0xf1,0x32,0x27,0x03,0x40,0x2e,0x17,0x11,0x10,0x0f,0x15,0x14,0x00]
132 image_bvh64_intersect_ray v[39:42], [v50, v46, v23, v17, v16, v15, v21, v20, v19, v37, v40, v42], s[12:15]
133 // GFX10: encoding: [0x07,0x9f,0x9c,0xf1,0x32,0x27,0x03,0x00,0x2e,0x17,0x11,0x10,0x0f,0x15,0x14,0x13,0x25,0x28,0x2a,0x00]
135 image_bvh64_intersect_ray v[39:42], [v50, v46, v23, v17, v16, v15, v21, v20, v19], s[12:15] a16
136 // GFX10: encoding: [0x05,0x9f,0x9c,0xf1,0x32,0x27,0x03,0x40,0x2e,0x17,0x11,0x10,0x0f,0x15,0x14,0x13]
138 image_msaa_load v[1:4], v[5:7], s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA
139 // GFX10: encoding: [0x31,0x0f,0x00,0xf0,0x05,0x01,0x02,0x00]
141 image_msaa_load v[1:4], v[5:7], s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA glc
142 // GFX10: encoding: [0x31,0x2f,0x00,0xf0,0x05,0x01,0x02,0x00]
144 image_msaa_load v5, v[1:3], s[8:15] dmask:0x1 dim:SQ_RSRC_IMG_2D_MSAA d16
145 // GFX10: encoding: [0x31,0x01,0x00,0xf0,0x01,0x05,0x02,0x80]
147 image_msaa_load v[1:4], v[5:8], s[8:15] dmask:0xf dim:SQ_RSRC_IMG_2D_MSAA_ARRAY
148 // GFX10: encoding: [0x39,0x0f,0x00,0xf0,0x05,0x01,0x02,0x00]
150 image_msaa_load v14, [v204,v11,v14,v19], s[40:47] dmask:0x1 dim:SQ_RSRC_IMG_2D_MSAA_ARRAY
151 // GFX10: encoding: [0x3b,0x01,0x00,0xf0,0xcc,0x0e,0x0a,0x00,0x0b,0x0e,0x13,0x00]
153 //===----------------------------------------------------------------------===//
154 // s_waitcnt_depctr.
155 //===----------------------------------------------------------------------===//
157 s_waitcnt_depctr -32768
158 // GFX10: encoding: [0x00,0x80,0xa3,0xbf]
160 s_waitcnt_depctr 65535
161 // GFX10: encoding: [0xff,0xff,0xa3,0xbf]
163 s_waitcnt_depctr depctr_hold_cnt(0)
164 // GFX10: encoding: [0x1f,0xff,0xa3,0xbf]
166 s_waitcnt_depctr depctr_hold_cnt(1)
167 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
169 s_waitcnt_depctr depctr_sa_sdst(0)
170 // GFX10: encoding: [0x9e,0xff,0xa3,0xbf]
172 s_waitcnt_depctr depctr_sa_sdst(1)
173 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
175 s_waitcnt_depctr depctr_va_vdst(0)
176 // GFX10: encoding: [0x9f,0x0f,0xa3,0xbf]
178 s_waitcnt_depctr depctr_va_vdst(1)
179 // GFX10: encoding: [0x9f,0x1f,0xa3,0xbf]
181 s_waitcnt_depctr depctr_va_vdst(14)
182 // GFX10: encoding: [0x9f,0xef,0xa3,0xbf]
184 s_waitcnt_depctr depctr_va_vdst(15)
185 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
187 s_waitcnt_depctr depctr_va_sdst(0)
188 // GFX10: encoding: [0x9f,0xf1,0xa3,0xbf]
190 s_waitcnt_depctr depctr_va_sdst(1)
191 // GFX10: encoding: [0x9f,0xf3,0xa3,0xbf]
193 s_waitcnt_depctr depctr_va_sdst(6)
194 // GFX10: encoding: [0x9f,0xfd,0xa3,0xbf]
196 s_waitcnt_depctr depctr_va_sdst(7)
197 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
199 s_waitcnt_depctr depctr_va_ssrc(0)
200 // GFX10: encoding: [0x9f,0xfe,0xa3,0xbf]
202 s_waitcnt_depctr depctr_va_ssrc(1)
203 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
205 s_waitcnt_depctr depctr_va_vcc(0)
206 // GFX10: encoding: [0x9d,0xff,0xa3,0xbf]
208 s_waitcnt_depctr depctr_va_vcc(1)
209 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
211 s_waitcnt_depctr depctr_vm_vsrc(0)
212 // GFX10: encoding: [0x83,0xff,0xa3,0xbf]
214 s_waitcnt_depctr depctr_vm_vsrc(1)
215 // GFX10: encoding: [0x87,0xff,0xa3,0xbf]
217 s_waitcnt_depctr depctr_vm_vsrc(6)
218 // GFX10: encoding: [0x9b,0xff,0xa3,0xbf]
220 s_waitcnt_depctr depctr_vm_vsrc(7)
221 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
223 s_waitcnt_depctr depctr_hold_cnt(0) depctr_sa_sdst(0) depctr_va_vdst(0) depctr_va_sdst(0) depctr_va_ssrc(0) depctr_va_vcc(0) depctr_vm_vsrc(0)
224 // GFX10: encoding: [0x00,0x00,0xa3,0xbf]
226 s_waitcnt_depctr depctr_hold_cnt(1) depctr_sa_sdst(1) depctr_va_vdst(15) depctr_va_sdst(7) depctr_va_ssrc(1) depctr_va_vcc(1) depctr_vm_vsrc(7)
227 // GFX10: encoding: [0x9f,0xff,0xa3,0xbf]
229 s_waitcnt_depctr depctr_hold_cnt(1) & depctr_sa_sdst(1) & depctr_va_vdst(1) & depctr_va_sdst(1) & depctr_va_ssrc(1) & depctr_va_vcc(1) & depctr_vm_vsrc(1)
230 // GFX10: encoding: [0x87,0x13,0xa3,0xbf]
232 s_waitcnt_depctr depctr_hold_cnt(1), depctr_sa_sdst(1), depctr_va_vdst(14), depctr_va_sdst(6), depctr_va_ssrc(1), depctr_va_vcc(1), depctr_vm_vsrc(6)
233 // GFX10: encoding: [0x9b,0xed,0xa3,0xbf]
235 scratch_load_dword off, off offset:1024 lds
236 // GFX10: [0x00,0x64,0x30,0xdc,0x00,0x00,0x7f,0x00]
238 scratch_load_ubyte off, off offset:1024 lds
239 // GFX10: [0x00,0x64,0x20,0xdc,0x00,0x00,0x7f,0x00]
241 scratch_load_sbyte off, off offset:1024 lds
242 // GFX10: [0x00,0x64,0x24,0xdc,0x00,0x00,0x7f,0x00]
244 scratch_load_ushort off, off offset:1024 lds
245 // GFX10: [0x00,0x64,0x28,0xdc,0x00,0x00,0x7f,0x00]
247 scratch_load_sshort off, off offset:1024 lds
248 // GFX10: [0x00,0x64,0x2c,0xdc,0x00,0x00,0x7f,0x00]