Skip to content

Commit 6d02d12

Browse files
committed
[AMDGPU][MC][NFC] Added more tests for flat_global
Restored tests from 7898803
1 parent 34405b4 commit 6d02d12

File tree

1 file changed

+40
-0
lines changed

1 file changed

+40
-0
lines changed

llvm/test/MC/AMDGPU/flat-global.s

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,26 @@ global_atomic_cmpswap v1, v3, v[5:6], s[2:3] glc
241241
// GFX9: global_atomic_cmpswap v1, v3, v[5:6], s[2:3] glc ; encoding: [0x00,0x80,0x05,0xdd,0x03,0x05,0x02,0x01]
242242
// VI-ERR: error: instruction not supported on this GPU
243243

244+
global_atomic_cmpswap v1, v[2:3], v[4:5], off offset:-1 glc
245+
// GCN: global_atomic_cmpswap v1, v[2:3], v[4:5], off offset:-1 glc ; encoding: [0xff,0x9f,0x05,0xdd,0x02,0x04,0x7f,0x01]
246+
// GFX10: global_atomic_cmpswap v1, v[2:3], v[4:5], off offset:-1 glc ; encoding: [0xff,0x8f,0xc5,0xdc,0x02,0x04,0x7d,0x01]
247+
// VI-ERR: error: instruction not supported on this GPU
248+
249+
global_atomic_cmpswap v1, v[2:3], v[254:255], off offset:-1 glc
250+
// GCN: global_atomic_cmpswap v1, v[2:3], v[254:255], off offset:-1 glc ; encoding: [0xff,0x9f,0x05,0xdd,0x02,0xfe,0x7f,0x01]
251+
// GFX10: global_atomic_cmpswap v1, v[2:3], v[254:255], off offset:-1 glc ; encoding: [0xff,0x8f,0xc5,0xdc,0x02,0xfe,0x7d,0x01]
252+
// VI-ERR: error: instruction not supported on this GPU
253+
254+
global_atomic_cmpswap v1, v2, v[4:5], s[2:3] offset:-1 glc
255+
// GCN: global_atomic_cmpswap v1, v2, v[4:5], s[2:3] offset:-1 glc ; encoding: [0xff,0x9f,0x05,0xdd,0x02,0x04,0x02,0x01]
256+
// GFX10: global_atomic_cmpswap v1, v2, v[4:5], s[2:3] offset:-1 glc ; encoding: [0xff,0x8f,0xc5,0xdc,0x02,0x04,0x02,0x01]
257+
// VI-ERR: error: instruction not supported on this GPU
258+
259+
global_atomic_cmpswap v1, v[2:3], v[4:5], off glc
260+
// GCN: global_atomic_cmpswap v1, v[2:3], v[4:5], off glc ; encoding: [0x00,0x80,0x05,0xdd,0x02,0x04,0x7f,0x01]
261+
// GFX10: global_atomic_cmpswap v1, v[2:3], v[4:5], off glc ; encoding: [0x00,0x80,0xc5,0xdc,0x02,0x04,0x7d,0x01]
262+
// VI-ERR: error: instruction not supported on this GPU
263+
244264
global_atomic_cmpswap_x2 v[5:6], v[7:10], off
245265
// GFX10: encoding: [0x00,0x80,0x44,0xdd,0x05,0x07,0x7d,0x00]
246266
// GFX9: global_atomic_cmpswap_x2 v[5:6], v[7:10], off ; encoding: [0x00,0x80,0x84,0xdd,0x05,0x07,0x7f,0x00]
@@ -256,6 +276,26 @@ global_atomic_cmpswap_x2 v[1:2], v5, v[7:10], s[2:3] glc
256276
// GFX9: global_atomic_cmpswap_x2 v[1:2], v5, v[7:10], s[2:3] glc ; encoding: [0x00,0x80,0x85,0xdd,0x05,0x07,0x02,0x01]
257277
// VI-ERR: error: instruction not supported on this GPU
258278

279+
global_atomic_cmpswap_x2 v[1:2], v[5:6], v[7:10], off offset:-1 glc
280+
// GCN: global_atomic_cmpswap_x2 v[1:2], v[5:6], v[7:10], off offset:-1 glc ; encoding: [0xff,0x9f,0x85,0xdd,0x05,0x07,0x7f,0x01]
281+
// GFX10: global_atomic_cmpswap_x2 v[1:2], v[5:6], v[7:10], off offset:-1 glc ; encoding: [0xff,0x8f,0x45,0xdd,0x05,0x07,0x7d,0x01]
282+
// VI-ERR: error: instruction not supported on this GPU
283+
284+
global_atomic_cmpswap_x2 v[1:2], v[5:6], v[252:255], off offset:-1 glc
285+
// GCN: global_atomic_cmpswap_x2 v[1:2], v[5:6], v[252:255], off offset:-1 glc ; encoding: [0xff,0x9f,0x85,0xdd,0x05,0xfc,0x7f,0x01]
286+
// GFX10: global_atomic_cmpswap_x2 v[1:2], v[5:6], v[252:255], off offset:-1 glc ; encoding: [0xff,0x8f,0x45,0xdd,0x05,0xfc,0x7d,0x01]
287+
// VI-ERR: error: instruction not supported on this GPU
288+
289+
global_atomic_cmpswap_x2 v[1:2], v5, v[252:255], s[2:3] offset:-1 glc
290+
// GCN: global_atomic_cmpswap_x2 v[1:2], v5, v[252:255], s[2:3] offset:-1 glc ; encoding: [0xff,0x9f,0x85,0xdd,0x05,0xfc,0x02,0x01]
291+
// GFX10: global_atomic_cmpswap_x2 v[1:2], v5, v[252:255], s[2:3] offset:-1 glc ; encoding: [0xff,0x8f,0x45,0xdd,0x05,0xfc,0x02,0x01]
292+
// VI-ERR: error: instruction not supported on this GPU
293+
294+
global_atomic_cmpswap_x2 v[1:2], v[5:6], v[7:10], off glc
295+
// GCN: global_atomic_cmpswap_x2 v[1:2], v[5:6], v[7:10], off glc ; encoding: [0x00,0x80,0x85,0xdd,0x05,0x07,0x7f,0x01]
296+
// GFX10: global_atomic_cmpswap_x2 v[1:2], v[5:6], v[7:10], off glc ; encoding: [0x00,0x80,0x45,0xdd,0x05,0x07,0x7d,0x01]
297+
// VI-ERR: error: instruction not supported on this GPU
298+
259299
global_atomic_swap v[3:4], v5, off
260300
// GFX10: encoding: [0x00,0x80,0xc0,0xdc,0x03,0x05,0x7d,0x00]
261301
// GFX9: global_atomic_swap v[3:4], v5, off ; encoding: [0x00,0x80,0x00,0xdd,0x03,0x05,0x7f,0x00]

0 commit comments

Comments
 (0)