151 lines · plain
1// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=GFX9 -check-prefix=GCN %s2// RUN: not llvm-mc -triple=amdgcn -mcpu=tonga -show-encoding %s | FileCheck -check-prefix=VI -check-prefix=GCN %s3 4// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 2>&1 %s | FileCheck -check-prefix=GFX9-ERR -check-prefix=GCNERR --implicit-check-not=error: %s5// RUN: not llvm-mc -triple=amdgcn -mcpu=tonga 2>&1 %s | FileCheck -check-prefix=VI-ERR -check-prefix=GCNERR --implicit-check-not=error: %s6 7 8flat_load_dword v1, v[3:4] offset:09// GCN: flat_load_dword v1, v[3:4] ; encoding: [0x00,0x00,0x50,0xdc,0x03,0x00,0x00,0x01]10 11flat_load_dword v1, v[3:4] offset:-112// VI-ERR: :[[@LINE-1]]:28: error: flat offset modifier is not supported on this GPU13// GFX9-ERR: :[[@LINE-2]]:28: error: expected a 12-bit unsigned offset14 15flat_load_dword v1, v[3:4] offset:409516// GFX9: flat_load_dword v1, v[3:4] offset:4095 ; encoding: [0xff,0x0f,0x50,0xdc,0x03,0x00,0x00,0x01]17// VI-ERR: :[[@LINE-2]]:28: error: flat offset modifier is not supported on this GPU18 19flat_load_dword v1, v[3:4] offset:409620// VI-ERR: :[[@LINE-1]]:28: error: flat offset modifier is not supported on this GPU21// GFX9-ERR: :[[@LINE-2]]:28: error: expected a 12-bit unsigned offset22 23flat_load_dword v1, v[3:4] offset:4 glc24// GFX9: flat_load_dword v1, v[3:4] offset:4 glc ; encoding: [0x04,0x00,0x51,0xdc,0x03,0x00,0x00,0x01]25// VI-ERR: :[[@LINE-2]]:28: error: flat offset modifier is not supported on this GPU26 27flat_load_dword v1, v[3:4] offset:4 glc slc28// GFX9: flat_load_dword v1, v[3:4] offset:4 glc slc ; encoding: [0x04,0x00,0x53,0xdc,0x03,0x00,0x00,0x01]29// VI-ERR: :[[@LINE-2]]:28: error: flat offset modifier is not supported on this GPU30 31flat_atomic_add v[3:4], v5 offset:8 slc32// GFX9: flat_atomic_add v[3:4], v5 offset:8 slc ; encoding: [0x08,0x00,0x0a,0xdd,0x03,0x05,0x00,0x00]33// VI-ERR: :[[@LINE-2]]:28: error: flat offset modifier is not supported on this GPU34 35flat_atomic_add v[3:4], v5 inst_offset:8 slc36// GFX9: flat_atomic_add v[3:4], v5 offset:8 slc ; encoding: [0x08,0x00,0x0a,0xdd,0x03,0x05,0x00,0x00]37// VI-ERR: :[[@LINE-2]]:28: error: flat offset modifier is not supported on this GPU38 39flat_atomic_cmpswap v[1:2], v[3:4] offset:409540// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 ; encoding: [0xff,0x0f,0x04,0xdd,0x01,0x03,0x00,0x00]41// VI-ERR: :[[@LINE-2]]:36: error: flat offset modifier is not supported on this GPU42 43flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 slc44// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 slc ; encoding: [0xff,0x0f,0x06,0xdd,0x01,0x03,0x00,0x00]45// VI-ERR: :[[@LINE-2]]:36: error: flat offset modifier is not supported on this GPU46 47flat_atomic_cmpswap v[1:2], v[3:4]48// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] ; encoding: [0x00,0x00,0x04,0xdd,0x01,0x03,0x00,0x00]49// VI: flat_atomic_cmpswap v[1:2], v[3:4] ; encoding: [0x00,0x00,0x04,0xdd,0x01,0x03,0x00,0x00]50 51flat_atomic_cmpswap v[1:2], v[3:4] slc52// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] slc ; encoding: [0x00,0x00,0x06,0xdd,0x01,0x03,0x00,0x00]53// VI: flat_atomic_cmpswap v[1:2], v[3:4] slc ; encoding: [0x00,0x00,0x06,0xdd,0x01,0x03,0x00,0x00]54 55flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 glc56// GFX9-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must not use glc57// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: flat offset modifier is not supported on this GPU58 59flat_atomic_cmpswap v[1:2], v[3:4] glc60// GCNERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must not use glc61 62flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc63// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc ; encoding: [0xff,0x0f,0x05,0xdd,0x01,0x03,0x00,0x00]64// VI-ERR: :[[@LINE-2]]:40: error: flat offset modifier is not supported on this GPU65 66flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc slc67// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc slc ; encoding: [0xff,0x0f,0x07,0xdd,0x01,0x03,0x00,0x00]68// VI-ERR: :[[@LINE-2]]:40: error: flat offset modifier is not supported on this GPU69 70flat_atomic_cmpswap v0, v[1:2], v[3:4] glc71// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] glc ; encoding: [0x00,0x00,0x05,0xdd,0x01,0x03,0x00,0x00]72// VI: flat_atomic_cmpswap v0, v[1:2], v[3:4] glc ; encoding: [0x00,0x00,0x05,0xdd,0x01,0x03,0x00,0x00]73 74flat_atomic_cmpswap v0, v[1:2], v[3:4] glc slc75// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] glc slc ; encoding: [0x00,0x00,0x07,0xdd,0x01,0x03,0x00,0x00]76// VI: flat_atomic_cmpswap v0, v[1:2], v[3:4] glc slc ; encoding: [0x00,0x00,0x07,0xdd,0x01,0x03,0x00,0x00]77 78flat_atomic_cmpswap v0, v[1:2], v[3:4]79// GCNERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must use glc80 81flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:409582// GFX9-ERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must use glc83// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: flat offset modifier is not supported on this GPU84 85flat_atomic_cmpswap v0, v[1:2], v[3:4] slc86// GCNERR: :[[@LINE-1]]:{{[0-9]+}}: error: instruction must use glc87 88flat_atomic_swap v[3:4], v5 offset:1689// GFX9: flat_atomic_swap v[3:4], v5 offset:16 ; encoding: [0x10,0x00,0x00,0xdd,0x03,0x05,0x00,0x00]90// VI-ERR: :[[@LINE-2]]:29: error: flat offset modifier is not supported on this GPU91 92flat_store_dword v[3:4], v1 offset:1693// GFX9: flat_store_dword v[3:4], v1 offset:16 ; encoding: [0x10,0x00,0x70,0xdc,0x03,0x01,0x00,0x00]94// VI-ERR: :[[@LINE-2]]:29: error: flat offset modifier is not supported on this GPU95 96flat_store_dword v[3:4], v1, off97// GCNERR: :[[@LINE-1]]:30: error: invalid operand for instruction98 99flat_store_dword v[3:4], v1, s[0:1]100// GCNERR: :[[@LINE-1]]:30: error: invalid operand for instruction101 102flat_store_dword v[3:4], v1, s0103// GCNERR: :[[@LINE-1]]:30: error: invalid operand for instruction104 105flat_load_dword v1, v[3:4], off106// GCNERR: :[[@LINE-1]]:29: error: invalid operand for instruction107 108flat_load_dword v1, v[3:4], s[0:1]109// GCNERR: :[[@LINE-1]]:29: error: invalid operand for instruction110 111flat_load_dword v1, v[3:4], s0112// GCNERR: :[[@LINE-1]]:29: error: invalid operand for instruction113 114flat_load_dword v1, v[3:4], exec_hi115// GCNERR: :[[@LINE-1]]:29: error: invalid operand for instruction116 117flat_store_dword v[3:4], v1, exec_hi118// GCNERR: :[[@LINE-1]]:30: error: invalid operand for instruction119 120flat_load_ubyte_d16 v1, v[3:4]121// GFX9: flat_load_ubyte_d16 v1, v[3:4] ; encoding: [0x00,0x00,0x80,0xdc,0x03,0x00,0x00,0x01]122// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU123 124flat_load_ubyte_d16_hi v1, v[3:4]125// GFX9: flat_load_ubyte_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x84,0xdc,0x03,0x00,0x00,0x01]126// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU127 128flat_load_sbyte_d16 v1, v[3:4]129// GFX9: flat_load_sbyte_d16 v1, v[3:4] ; encoding: [0x00,0x00,0x88,0xdc,0x03,0x00,0x00,0x01]130// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU131 132flat_load_sbyte_d16_hi v1, v[3:4]133// GFX9: flat_load_sbyte_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x8c,0xdc,0x03,0x00,0x00,0x01]134// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU135 136flat_load_short_d16 v1, v[3:4]137// GFX9: flat_load_short_d16 v1, v[3:4] ; encoding: [0x00,0x00,0x90,0xdc,0x03,0x00,0x00,0x01]138// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU139 140flat_load_short_d16_hi v1, v[3:4]141// GFX9: flat_load_short_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x94,0xdc,0x03,0x00,0x00,0x01]142// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU143 144flat_store_byte_d16_hi v[3:4], v1145// GFX9: flat_store_byte_d16_hi v[3:4], v1 ; encoding: [0x00,0x00,0x64,0xdc,0x03,0x01,0x00,0x00]146// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU147 148flat_store_short_d16_hi v[3:4], v1149// GFX9: flat_store_short_d16_hi v[3:4], v1 ; encoding: [0x00,0x00,0x6c,0xdc,0x03,0x01,0x00,0x00150// VI-ERR: :[[@LINE-2]]:{{[0-9]+}}: error: instruction not supported on this GPU151