1// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga 2>&1 %s | FileCheck -check-prefix=VI-ERR --implicit-check-not=error: %s 2// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 2>&1 %s | FileCheck -check-prefix=GFX9_10-ERR --implicit-check-not=error: %s 3// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx1010 2>&1 %s | FileCheck --check-prefixes=GFX9_10-ERR --implicit-check-not=error: %s 4// RUN: llvm-mc -arch=amdgcn -mcpu=gfx1030 -show-encoding %s | FileCheck --check-prefixes=GFX1030 %s 5 6scratch_load_ubyte v1, off, off 7// GFX1030: encoding: [0x00,0x40,0x20,0xdc,0x00,0x00,0x7f,0x01] 8// GFX9_10-ERR: error: operands are not valid for this GPU or mode 9// VI-ERR: error: instruction not supported on this GPU 10 11scratch_load_sbyte v1, off, off 12// GFX1030: encoding: [0x00,0x40,0x24,0xdc,0x00,0x00,0x7f,0x01] 13// GFX9_10-ERR: error: operands are not valid for this GPU or mode 14// VI-ERR: error: instruction not supported on this GPU 15 16scratch_load_ushort v1, off, off 17// GFX1030: encoding: [0x00,0x40,0x28,0xdc,0x00,0x00,0x7f,0x01] 18// GFX9_10-ERR: error: operands are not valid for this GPU or mode 19// VI-ERR: error: instruction not supported on this GPU 20 21scratch_load_sshort v1, off, off 22// GFX1030: encoding: [0x00,0x40,0x2c,0xdc,0x00,0x00,0x7f,0x01] 23// GFX9_10-ERR: error: operands are not valid for this GPU or mode 24// VI-ERR: error: instruction not supported on this GPU 25 26scratch_load_dword v1, off, off 27// GFX1030: encoding: [0x00,0x40,0x30,0xdc,0x00,0x00,0x7f,0x01] 28// GFX9_10-ERR: error: operands are not valid for this GPU or mode 29// VI-ERR: error: instruction not supported on this GPU 30 31scratch_load_dwordx2 v[1:2], off, off 32// GFX1030: encoding: [0x00,0x40,0x34,0xdc,0x00,0x00,0x7f,0x01] 33// GFX9_10-ERR: error: operands are not valid for this GPU or mode 34// VI-ERR: error: instruction not supported on this GPU 35 36scratch_load_dwordx3 v[1:3], off, off 37// GFX1030: encoding: [0x00,0x40,0x3c,0xdc,0x00,0x00,0x7f,0x01] 38// GFX9_10-ERR: error: operands are not valid for this GPU or mode 39// VI-ERR: error: instruction not supported on this GPU 40 41scratch_load_dwordx4 v[1:4], off, off 42// GFX1030: encoding: [0x00,0x40,0x38,0xdc,0x00,0x00,0x7f,0x01] 43// GFX9_10-ERR: error: operands are not valid for this GPU or mode 44// VI-ERR: error: instruction not supported on this GPU 45 46scratch_load_dword v1, off, off offset:2047 47// GFX1030: scratch_load_dword v1, off, off offset:2047 ; encoding: [0xff,0x47,0x30,0xdc,0x00,0x00,0x7f,0x01] 48// GFX9_10-ERR: error: operands are not valid for this GPU or mode 49// VI-ERR: error: instruction not supported on this GPU 50 51scratch_store_byte off, v2, off 52// GFX1030: encoding: [0x00,0x40,0x60,0xdc,0x00,0x02,0x7f,0x00] 53// GFX9_10-ERR: error: operands are not valid for this GPU or mode 54// VI-ERR: error: instruction not supported on this GPU 55 56scratch_store_short off, v2, off 57// GFX1030: encoding: [0x00,0x40,0x68,0xdc,0x00,0x02,0x7f,0x00] 58// GFX9_10-ERR: error: operands are not valid for this GPU or mode 59// VI-ERR: error: instruction not supported on this GPU 60 61scratch_store_dword off, v2, off 62// GFX1030: encoding: [0x00,0x40,0x70,0xdc,0x00,0x02,0x7f,0x00] 63// GFX9_10-ERR: error: operands are not valid for this GPU or mode 64// VI-ERR: error: instruction not supported on this GPU 65 66scratch_store_dwordx2 off, v[2:3], off 67// GFX1030: encoding: [0x00,0x40,0x74,0xdc,0x00,0x02,0x7f,0x00] 68// GFX9_10-ERR: error: operands are not valid for this GPU or mode 69// VI-ERR: error: instruction not supported on this GPU 70 71scratch_store_dwordx3 off, v[2:4], off 72// GFX1030: encoding: [0x00,0x40,0x7c,0xdc,0x00,0x02,0x7f,0x00] 73// GFX9_10-ERR: error: operands are not valid for this GPU or mode 74// VI-ERR: error: instruction not supported on this GPU 75 76scratch_store_dwordx4 off, v[2:5], off 77// GFX1030: encoding: [0x00,0x40,0x78,0xdc,0x00,0x02,0x7f,0x00] 78// GFX9_10-ERR: error: operands are not valid for this GPU or mode 79// VI-ERR: error: instruction not supported on this GPU 80 81scratch_store_dword off, v2, off offset:2047 82// GFX1030: scratch_store_dword off, v2, off offset:2047 ; encoding: [0xff,0x47,0x70,0xdc,0x00,0x02,0x7f,0x00] 83// GFX9_10-ERR: error: operands are not valid for this GPU or mode 84// VI-ERR: error: instruction not supported on this GPU 85 86scratch_load_ubyte_d16 v1, off, off 87// GFX1030: encoding: [0x00,0x40,0x80,0xdc,0x00,0x00,0x7f,0x01] 88// GFX9_10-ERR: error: operands are not valid for this GPU or mode 89// VI-ERR: error: instruction not supported on this GPU 90 91scratch_load_ubyte_d16_hi v1, off, off 92// GFX1030: encoding: [0x00,0x40,0x84,0xdc,0x00,0x00,0x7f,0x01] 93// GFX9_10-ERR: error: operands are not valid for this GPU or mode 94// VI-ERR: error: instruction not supported on this GPU 95 96scratch_load_sbyte_d16 v1, off, off 97// GFX1030: encoding: [0x00,0x40,0x88,0xdc,0x00,0x00,0x7f,0x01] 98// GFX9_10-ERR: error: operands are not valid for this GPU or mode 99// VI-ERR: error: instruction not supported on this GPU 100 101scratch_load_sbyte_d16_hi v1, off, off 102// GFX1030: encoding: [0x00,0x40,0x8c,0xdc,0x00,0x00,0x7f,0x01] 103// GFX9_10-ERR: error: operands are not valid for this GPU or mode 104// VI-ERR: error: instruction not supported on this GPU 105 106scratch_load_short_d16 v1, off, off 107// GFX1030: encoding: [0x00,0x40,0x90,0xdc,0x00,0x00,0x7f,0x01] 108// GFX9_10-ERR: error: operands are not valid for this GPU or mode 109// VI-ERR: error: instruction not supported on this GPU 110 111scratch_load_short_d16_hi v1, off, off 112// GFX1030: encoding: [0x00,0x40,0x94,0xdc,0x00,0x00,0x7f,0x01] 113// GFX9_10-ERR: error: operands are not valid for this GPU or mode 114// VI-ERR: error: instruction not supported on this GPU 115 116scratch_store_byte_d16_hi off, v2, off 117// GFX1030: encoding: [0x00,0x40,0x64,0xdc,0x00,0x02,0x7f,0x00] 118// GFX9_10-ERR: error: operands are not valid for this GPU or mode 119// VI-ERR: error: instruction not supported on this GPU 120 121 122scratch_store_short_d16_hi off, v2, off 123// GFX1030: encoding: [0x00,0x40,0x6c,0xdc,0x00,0x02,0x7f,0x00] 124// GFX9_10-ERR: error: operands are not valid for this GPU or mode 125// VI-ERR: error: instruction not supported on this GPU 126