brintos

brintos / llvm-project-archived public Read only

0
0
Text · 39.9 KiB · 54bb2b1 Raw
624 lines · plain
1// RUN: not llvm-mc -triple=amdgcn -mcpu=tahiti -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SICI --check-prefix=SICIVI2// RUN: not llvm-mc -triple=amdgcn -mcpu=bonaire -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=SICI --check-prefix=SICIVI3// RUN: not llvm-mc -triple=amdgcn -mcpu=fiji -show-encoding %s | FileCheck %s --check-prefix=GCN  --check-prefix=SICIVI --check-prefix=VI --check-prefix=GFX89 --check-prefix=GFX8_04// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx810 -show-encoding %s | FileCheck %s --check-prefix=GCN  --check-prefix=SICIVI --check-prefix=VI --check-prefix=GFX89 --check-prefix=GFX8_15// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck %s --check-prefix=GCN --check-prefix=GFX9 --check-prefix=GFX896 7// RUN: not llvm-mc -triple=amdgcn -mcpu=tahiti %s 2>&1 | FileCheck %s --check-prefix=NOSICI --implicit-check-not=error:8// RUN: not llvm-mc -triple=amdgcn -mcpu=bonaire %s 2>&1 | FileCheck %s --check-prefix=NOSICI --implicit-check-not=error:9// RUN: not llvm-mc -triple=amdgcn -mcpu=fiji %s 2>&1 | FileCheck %s --check-prefix=NOVI --check-prefix=NOGFX8_0 --implicit-check-not=error:10// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx810 %s 2>&1 | FileCheck %s --check-prefix=NOVI --check-prefix=NOGFX8_1 --implicit-check-not=error:11// RUN: not llvm-mc -triple=amdgcn -mcpu=gfx900 %s 2>&1 | FileCheck %s --check-prefix=NOGFX9 --implicit-check-not=error:12 13//===----------------------------------------------------------------------===//14// Image Load/Store15//===----------------------------------------------------------------------===//16 17image_load    v[4:6], v[237:240], s[28:35] dmask:0x7 unorm18// GCN:  image_load v[4:6], v[237:240], s[28:35] dmask:0x7 unorm ; encoding: [0x00,0x17,0x00,0xf0,0xed,0x04,0x07,0x00]19 20image_load    v4, v237, s[28:35]21// GCN:  image_load v4, v237, s[28:35] ; encoding: [0x00,0x00,0x00,0xf0,0xed,0x04,0x07,0x00]22 23image_load    v4, v[237:238], s[28:35]24// GCN:  image_load v4, v[237:238], s[28:35] ; encoding: [0x00,0x00,0x00,0xf0,0xed,0x04,0x07,0x00]25 26image_load    v4, v[237:239], s[28:35]27// GCN:  image_load v4, v[237:239], s[28:35] ; encoding: [0x00,0x00,0x00,0xf0,0xed,0x04,0x07,0x00]28 29image_load    v4, v[237:240], s[28:35]30// GCN:  image_load v4, v[237:240], s[28:35] ; encoding: [0x00,0x00,0x00,0xf0,0xed,0x04,0x07,0x00]31 32image_load    v[4:7], v[237:240], s[28:35] dmask:0x7 tfe33// GCN:  image_load v[4:7], v[237:240], s[28:35] dmask:0x7 tfe ; encoding: [0x00,0x07,0x01,0xf0,0xed,0x04,0x07,0x00]34 35// Verify support of all possible modifiers.36// FIXME: This test is incorrect because r128 assumes a 128-bit SRSRC.37image_load    v[5:6], v[1:4], s[8:15] dmask:0x1 unorm glc slc r128 tfe lwe da d1638// NOSICI: :[[@LINE-1]]:{{[0-9]+}}: error: d16 modifier is not supported on this GPU39// VI:     image_load v[5:6], v[1:4], s[8:15] dmask:0x1 unorm glc slc r128 tfe lwe da d16 ; encoding: [0x00,0xf1,0x03,0xf2,0x01,0x05,0x02,0x80]40// NOGFX9: :[[@LINE-3]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU41 42image_load v5, v[1:4], s[8:15] d1643// NOSICI: :[[@LINE-1]]:{{[0-9]+}}: error: d16 modifier is not supported on this GPU44// GFX89:  image_load v5, v[1:4], s[8:15] d16 ; encoding: [0x00,0x00,0x00,0xf0,0x01,0x05,0x02,0x80]45 46image_load v5, v[1:4], s[8:15] r12847// SICIVI: image_load v5, v[1:4], s[8:15] r128 ; encoding: [0x00,0x80,0x00,0xf0,0x01,0x05,0x02,0x00]48// NOGFX9: :[[@LINE-2]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU49 50image_store   v[193:195], v[237:240], s[28:35] dmask:0x7 unorm51// GCN: image_store v[193:195], v[237:240], s[28:35] dmask:0x7 unorm ; encoding: [0x00,0x17,0x20,0xf0,0xed,0xc1,0x07,0x00]52 53image_store   v193, v237, s[28:35]54// GCN: image_store v193, v237, s[28:35] ; encoding: [0x00,0x00,0x20,0xf0,0xed,0xc1,0x07,0x00]55 56image_store   v193, v[237:238], s[28:35]57// GCN: image_store v193, v[237:238], s[28:35] ; encoding: [0x00,0x00,0x20,0xf0,0xed,0xc1,0x07,0x00]58 59image_store   v193, v[237:239], s[28:35]60// GCN: image_store v193, v[237:239], s[28:35] ; encoding: [0x00,0x00,0x20,0xf0,0xed,0xc1,0x07,0x00]61 62image_store   v193, v[237:240], s[28:35]63// GCN: image_store v193, v[237:240], s[28:35] ; encoding: [0x00,0x00,0x20,0xf0,0xed,0xc1,0x07,0x00]64 65image_store   v[193:194], v[237:240], s[28:35] tfe66// GCN: image_store v[193:194], v[237:240], s[28:35] tfe ; encoding: [0x00,0x00,0x21,0xf0,0xed,0xc1,0x07,0x00]67 68// Verify support of all possible modifiers.69// FIXME: This test is incorrect because r128 assumes a 128-bit SRSRC.70image_store   v5, v[1:4], s[8:15] dmask:0x1 unorm glc slc r128 lwe da d1671// NOSICI: :[[@LINE-1]]:{{[0-9]+}}: error: d16 modifier is not supported on this GPU72// VI:     image_store v5, v[1:4], s[8:15] dmask:0x1 unorm glc slc r128 lwe da d16 ; encoding: [0x00,0xf1,0x22,0xf2,0x01,0x05,0x02,0x80]73// NOGFX9: :[[@LINE-3]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU74 75image_store    v5, v[1:4], s[8:15] d1676// NOSICI: :[[@LINE-1]]:{{[0-9]+}}: error: d16 modifier is not supported on this GPU77// GFX89:  image_store v5, v[1:4], s[8:15] d16 ; encoding: [0x00,0x00,0x20,0xf0,0x01,0x05,0x02,0x80]78 79// FIXME: This test is incorrect because r128 assumes a 128-bit SRSRC.80image_store    v5, v[1:4], s[8:15] r12881// SICIVI: image_store v5, v[1:4], s[8:15] r128 ; encoding: [0x00,0x80,0x20,0xf0,0x01,0x05,0x02,0x00]82// NOGFX9: :[[@LINE-2]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU83 84//===----------------------------------------------------------------------===//85// Image Load/Store: d16 unpacked86//===----------------------------------------------------------------------===//87 88image_load v[5:6], v[1:4], s[8:15] dmask:0x3 d1689// NOSICI:   error: d16 modifier is not supported on this GPU90// GFX8_0:   image_load v[5:6], v[1:4], s[8:15] dmask:0x3 d16 ; encoding: [0x00,0x03,0x00,0xf0,0x01,0x05,0x02,0x80]91// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe92// NOGFX9:   error: image data size does not match dmask, d16 and tfe93 94image_load v[5:7], v[1:4], s[8:15] dmask:0x7 d1695// NOSICI:   error: d16 modifier is not supported on this GPU96// GFX8_0:   image_load v[5:7], v[1:4], s[8:15] dmask:0x7 d16 ; encoding: [0x00,0x07,0x00,0xf0,0x01,0x05,0x02,0x80]97// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe98// NOGFX9:   error: image data size does not match dmask, d16 and tfe99 100image_load v[5:8], v[1:4], s[8:15] dmask:0xf d16101// NOSICI:   error: d16 modifier is not supported on this GPU102// GFX8_0:   image_load v[5:8], v[1:4], s[8:15] dmask:0xf d16 ; encoding: [0x00,0x0f,0x00,0xf0,0x01,0x05,0x02,0x80]103// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe104// NOGFX9:   error: image data size does not match dmask, d16 and tfe105 106image_load v[5:7], v[1:4], s[8:15] dmask:0x3 tfe d16107// NOSICI:   error: d16 modifier is not supported on this GPU108// GFX8_0:   image_load v[5:7], v[1:4], s[8:15] dmask:0x3 tfe d16 ; encoding: [0x00,0x03,0x01,0xf0,0x01,0x05,0x02,0x80]109// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe110// NOGFX9:   error: image data size does not match dmask, d16 and tfe111 112image_load v[5:8], v[1:4], s[8:15] dmask:0x7 tfe d16113// NOSICI:   error: d16 modifier is not supported on this GPU114// GFX8_0:   image_load v[5:8], v[1:4], s[8:15] dmask:0x7 tfe d16 ; encoding: [0x00,0x07,0x01,0xf0,0x01,0x05,0x02,0x80]115// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe116// NOGFX9:   error: image data size does not match dmask, d16 and tfe117 118//===----------------------------------------------------------------------===//119// Image Load/Store: d16 packed120//===----------------------------------------------------------------------===//121 122image_load v5, v[1:4], s[8:15] dmask:0x3 d16123// NOSICI:   error: d16 modifier is not supported on this GPU124// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe125// GFX8_1:   image_load v5, v[1:4], s[8:15] dmask:0x3 d16 ; encoding: [0x00,0x03,0x00,0xf0,0x01,0x05,0x02,0x80]126// GFX9:     image_load v5, v[1:4], s[8:15] dmask:0x3 d16 ; encoding: [0x00,0x03,0x00,0xf0,0x01,0x05,0x02,0x80]127 128image_load v[5:6], v[1:4], s[8:15] dmask:0x7 d16129// NOSICI:   error: d16 modifier is not supported on this GPU130// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe131// GFX8_1:   image_load v[5:6], v[1:4], s[8:15] dmask:0x7 d16 ; encoding: [0x00,0x07,0x00,0xf0,0x01,0x05,0x02,0x80]132// GFX9:     image_load v[5:6], v[1:4], s[8:15] dmask:0x7 d16 ; encoding: [0x00,0x07,0x00,0xf0,0x01,0x05,0x02,0x80]133 134image_load v[5:6], v[1:4], s[8:15] dmask:0xf d16135// NOSICI:   error: d16 modifier is not supported on this GPU136// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe137// GFX8_1:   image_load v[5:6], v[1:4], s[8:15] dmask:0xf d16 ; encoding: [0x00,0x0f,0x00,0xf0,0x01,0x05,0x02,0x80]138// GFX9:     image_load v[5:6], v[1:4], s[8:15] dmask:0xf d16 ; encoding: [0x00,0x0f,0x00,0xf0,0x01,0x05,0x02,0x80]139 140image_load v[5:6], v[1:4], s[8:15] dmask:0x3 tfe d16141// NOSICI:   error: d16 modifier is not supported on this GPU142// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe143// GFX8_1:   image_load v[5:6], v[1:4], s[8:15] dmask:0x3 tfe d16 ; encoding: [0x00,0x03,0x01,0xf0,0x01,0x05,0x02,0x80]144// GFX9:     image_load v[5:6], v[1:4], s[8:15] dmask:0x3 tfe d16 ; encoding: [0x00,0x03,0x01,0xf0,0x01,0x05,0x02,0x80]145 146image_load v[5:7], v[1:4], s[8:15] dmask:0x7 tfe d16147// NOSICI:   error: d16 modifier is not supported on this GPU148// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe149// GFX8_1:   image_load v[5:7], v[1:4], s[8:15] dmask:0x7 tfe d16 ; encoding: [0x00,0x07,0x01,0xf0,0x01,0x05,0x02,0x80]150// GFX9:     image_load v[5:7], v[1:4], s[8:15] dmask:0x7 tfe d16 ; encoding: [0x00,0x07,0x01,0xf0,0x01,0x05,0x02,0x80]151 152image_load v[5:7], v[1:4], s[8:15] dmask:0xf tfe d16153// NOSICI:   error: d16 modifier is not supported on this GPU154// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe155// GFX8_1:   image_load v[5:7], v[1:4], s[8:15] dmask:0xf tfe d16 ; encoding: [0x00,0x0f,0x01,0xf0,0x01,0x05,0x02,0x80]156// GFX9:     image_load v[5:7], v[1:4], s[8:15] dmask:0xf tfe d16 ; encoding: [0x00,0x0f,0x01,0xf0,0x01,0x05,0x02,0x80]157 158//===----------------------------------------------------------------------===//159// Image Load/Store: a16160//===----------------------------------------------------------------------===//161 162image_load v5, v[1:2], s[8:15] unorm a16163// GFX9:     image_load v5, v[1:2], s[8:15] unorm a16 ; encoding: [0x00,0x90,0x00,0xf0,0x01,0x05,0x02,0x00]164// NOSICI:   error: a16 modifier is not supported on this GPU165// NOVI:     error: a16 modifier is not supported on this GPU166 167image_load v[5:6], v[1:2], s[8:15] dmask:0x3 unorm a16168// GFX9:     image_load v[5:6], v[1:2], s[8:15] dmask:0x3 unorm a16 ; encoding: [0x00,0x93,0x00,0xf0,0x01,0x05,0x02,0x00]169// NOSICI:   error: a16 modifier is not supported on this GPU170// NOVI:     error: a16 modifier is not supported on this GPU171 172image_load v[5:7], v[1:2], s[8:15] dmask:0x7 unorm a16173// GFX9:     image_load v[5:7], v[1:2], s[8:15] dmask:0x7 unorm a16 ; encoding: [0x00,0x97,0x00,0xf0,0x01,0x05,0x02,0x00]174// NOSICI:   error: a16 modifier is not supported on this GPU175// NOVI:     error: a16 modifier is not supported on this GPU176 177image_load v[5:8], v[1:2], s[8:15] dmask:0xf unorm a16178// GFX9:     image_load v[5:8], v[1:2], s[8:15] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x00,0xf0,0x01,0x05,0x02,0x00]179// NOSICI:   error: a16 modifier is not supported on this GPU180// NOVI:     error: a16 modifier is not supported on this GPU181 182image_store v5, v[1:2], s[8:15] unorm a16183// GFX9:     image_store v5, v[1:2], s[8:15] unorm a16 ; encoding: [0x00,0x90,0x20,0xf0,0x01,0x05,0x02,0x00]184// NOSICI:   error: a16 modifier is not supported on this GPU185// NOVI:     error: a16 modifier is not supported on this GPU186 187image_store v[5:6], v[1:2], s[8:15] dmask:0x3 unorm a16188// GFX9:     image_store v[5:6], v[1:2], s[8:15] dmask:0x3 unorm a16 ; encoding: [0x00,0x93,0x20,0xf0,0x01,0x05,0x02,0x00]189// NOSICI:   error: a16 modifier is not supported on this GPU190// NOVI:     error: a16 modifier is not supported on this GPU191 192image_store v[5:7], v[1:2], s[8:15] dmask:0x7 unorm a16193// GFX9:     image_store v[5:7], v[1:2], s[8:15] dmask:0x7 unorm a16 ; encoding: [0x00,0x97,0x20,0xf0,0x01,0x05,0x02,0x00]194// NOSICI:   error: a16 modifier is not supported on this GPU195// NOVI:     error: a16 modifier is not supported on this GPU196 197image_store v[5:8], v[1:2], s[8:15] dmask:0xf unorm a16198// GFX9:     image_store v[5:8], v[1:2], s[8:15] dmask:0xf unorm a16 ; encoding: [0x00,0x9f,0x20,0xf0,0x01,0x05,0x02,0x00]199// NOSICI:   error: a16 modifier is not supported on this GPU200// NOVI:     error: a16 modifier is not supported on this GPU201 202//===----------------------------------------------------------------------===//203// Image Load/Store: a16 & d16204//===----------------------------------------------------------------------===//205 206image_load v5, v[1:2], s[8:15] dmask:0x3 unorm a16 d16207// GFX9:     image_load v5, v[1:2], s[8:15] dmask:0x3 unorm a16 d16 ; encoding: [0x00,0x93,0x00,0xf0,0x01,0x05,0x02,0x80]208// NOSICI:   error: a16 modifier is not supported on this GPU209// NOVI:     error: a16 modifier is not supported on this GPU210 211image_load v[5:6], v[1:2], s[8:15] dmask:0x7 unorm a16 d16212// GFX9:     image_load v[5:6], v[1:2], s[8:15] dmask:0x7 unorm a16 d16 ; encoding: [0x00,0x97,0x00,0xf0,0x01,0x05,0x02,0x80]213// NOSICI:   error: a16 modifier is not supported on this GPU214// NOVI:     error: a16 modifier is not supported on this GPU215 216image_load v[5:6], v[1:2], s[8:15] dmask:0xf unorm a16 d16217// GFX9:     image_load v[5:6], v[1:2], s[8:15] dmask:0xf unorm a16 d16 ; encoding: [0x00,0x9f,0x00,0xf0,0x01,0x05,0x02,0x80]218// NOSICI:   error: a16 modifier is not supported on this GPU219// NOVI:     error: a16 modifier is not supported on this GPU220 221image_store v5, v[1:2], s[8:15] dmask:0x3 unorm a16 d16222// GFX9:     image_store v5, v[1:2], s[8:15] dmask:0x3 unorm a16 d16 ; encoding: [0x00,0x93,0x20,0xf0,0x01,0x05,0x02,0x80]223// NOSICI:   error: a16 modifier is not supported on this GPU224// NOVI:     error: a16 modifier is not supported on this GPU225 226image_store v[5:6], v[1:2], s[8:15] dmask:0x7 unorm a16 d16227// GFX9:     image_store v[5:6], v[1:2], s[8:15] dmask:0x7 unorm a16 d16 ; encoding: [0x00,0x97,0x20,0xf0,0x01,0x05,0x02,0x80]228// NOSICI:   error: a16 modifier is not supported on this GPU229// NOVI:     error: a16 modifier is not supported on this GPU230 231image_store v[5:6], v[1:2], s[8:15] dmask:0xf unorm a16 d16232// GFX9:     image_store v[5:6], v[1:2], s[8:15] dmask:0xf unorm a16 d16 ; encoding: [0x00,0x9f,0x20,0xf0,0x01,0x05,0x02,0x80]233// NOSICI:   error: a16 modifier is not supported on this GPU234// NOVI:     error: a16 modifier is not supported on this GPU235 236//===----------------------------------------------------------------------===//237// Image Load/Store: PCK variants238//===----------------------------------------------------------------------===//239 240image_load_mip_pck v5, v1, s[8:15] dmask:0x1241// GCN: image_load_mip_pck v5, v1, s[8:15] dmask:0x1 ; encoding: [0x00,0x01,0x10,0xf0,0x01,0x05,0x02,0x00]242 243image_load_mip_pck v5, v[1:2], s[8:15] dmask:0x1244// GCN: image_load_mip_pck v5, v[1:2], s[8:15] dmask:0x1 ; encoding: [0x00,0x01,0x10,0xf0,0x01,0x05,0x02,0x00]245 246image_load_mip_pck v5, v[1:3], s[8:15] dmask:0x1247// GCN: image_load_mip_pck v5, v[1:3], s[8:15] dmask:0x1 ; encoding: [0x00,0x01,0x10,0xf0,0x01,0x05,0x02,0x00]248 249image_load_mip_pck v5, v[1:4], s[8:15] dmask:0x1250// GCN: image_load_mip_pck v5, v[1:4], s[8:15] dmask:0x1 ; encoding: [0x00,0x01,0x10,0xf0,0x01,0x05,0x02,0x00]251 252image_load_mip_pck v[5:6], v[1:4], s[8:15] dmask:0x3253// GCN: image_load_mip_pck v[5:6], v[1:4], s[8:15] dmask:0x3 ; encoding: [0x00,0x03,0x10,0xf0,0x01,0x05,0x02,0x00]254 255image_load_mip_pck v[5:6], v[1:4], s[8:15] dmask:0x1 unorm glc slc tfe lwe da256// GCN: image_load_mip_pck v[5:6], v[1:4], s[8:15] dmask:0x1 unorm glc slc tfe lwe da ; encoding: [0x00,0x71,0x13,0xf2,0x01,0x05,0x02,0x00]257 258image_load_mip_pck_sgn v[5:6], v[1:4], s[8:15] dmask:0x5259// GCN: image_load_mip_pck_sgn v[5:6], v[1:4], s[8:15] dmask:0x5 ; encoding: [0x00,0x05,0x14,0xf0,0x01,0x05,0x02,0x00]260 261image_load_pck v5, v[1:4], s[8:15] dmask:0x1 glc262// GCN: image_load_pck v5, v[1:4], s[8:15] dmask:0x1 glc ; encoding: [0x00,0x21,0x08,0xf0,0x01,0x05,0x02,0x00]263 264image_load_pck_sgn v5, v[1:4], s[8:15] dmask:0x1 lwe265// GCN: image_load_pck_sgn v5, v[1:4], s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x0e,0xf0,0x01,0x05,0x02,0x00]266 267image_load_mip_pck v5, v[1:4], s[8:15] dmask:0x1 d16268// NOSICI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction269// NOVI:   error: invalid operand for instruction270// NOGFX9: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction271 272image_load_mip_pck v5, v[1:2], s[8:15] dmask:0x1 a16273// GFX9:   image_load_mip_pck v5, v[1:2], s[8:15] dmask:0x1 a16 ; encoding: [0x00,0x81,0x10,0xf0,0x01,0x05,0x02,0x00]274// NOSICI: :[[@LINE-2]]:{{[0-9]+}}: error: a16 modifier is not supported on this GPU275// NOVI:   error: a16 modifier is not supported on this GPU276 277image_store_mip_pck v252, v2, s[12:19] dmask:0x1 unorm278// GCN: image_store_mip_pck v252, v2, s[12:19] dmask:0x1 unorm ; encoding: [0x00,0x11,0x2c,0xf0,0x02,0xfc,0x03,0x00]279 280image_store_mip_pck v252, v[2:3], s[12:19] dmask:0x1 unorm281// GCN: image_store_mip_pck v252, v[2:3], s[12:19] dmask:0x1 unorm ; encoding: [0x00,0x11,0x2c,0xf0,0x02,0xfc,0x03,0x00]282 283image_store_mip_pck v252, v[2:4], s[12:19] dmask:0x1 unorm284// GCN: image_store_mip_pck v252, v[2:4], s[12:19] dmask:0x1 unorm ; encoding: [0x00,0x11,0x2c,0xf0,0x02,0xfc,0x03,0x00]285 286image_store_mip_pck v252, v[2:5], s[12:19] dmask:0x1 unorm287// GCN: image_store_mip_pck v252, v[2:5], s[12:19] dmask:0x1 unorm ; encoding: [0x00,0x11,0x2c,0xf0,0x02,0xfc,0x03,0x00]288 289image_store_mip_pck v1, v[2:5], s[12:19] dmask:0x1 unorm glc slc lwe da290// GCN: image_store_mip_pck v1, v[2:5], s[12:19] dmask:0x1 unorm glc slc lwe da ; encoding: [0x00,0x71,0x2e,0xf2,0x02,0x01,0x03,0x00]291 292image_store_pck v1, v[2:5], s[12:19] dmask:0x1 unorm da293// GCN: image_store_pck v1, v[2:5], s[12:19] dmask:0x1 unorm da ; encoding: [0x00,0x51,0x28,0xf0,0x02,0x01,0x03,0x00]294 295image_store_mip_pck v252, v[2:5], s[12:19] dmask:0x1 d16296// NOSICI: :[[@LINE-1]]:{{[0-9]+}}: error: invalid operand for instruction297// NOVI:   error: invalid operand for instruction298// NOGFX9: :[[@LINE-3]]:{{[0-9]+}}: error: invalid operand for instruction299 300image_store_mip_pck v252, v[2:3], s[12:19] dmask:0x1 a16301// GFX9:   image_store_mip_pck v252, v[2:3], s[12:19] dmask:0x1 a16 ; encoding: [0x00,0x81,0x2c,0xf0,0x02,0xfc,0x03,0x00]302// NOSICI: :[[@LINE-2]]:{{[0-9]+}}: error: a16 modifier is not supported on this GPU303// NOVI:   error: a16 modifier is not supported on this GPU304 305//===----------------------------------------------------------------------===//306// Image Sample307//===----------------------------------------------------------------------===//308 309image_sample  v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 unorm310// GCN: image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 unorm ; encoding: [0x00,0x17,0x80,0xf0,0xed,0xc1,0x27,0x00]311 312image_sample  v193, v237, s[28:35], s[4:7]313// GCN: image_sample v193, v237, s[28:35], s[4:7] ; encoding: [0x00,0x00,0x80,0xf0,0xed,0xc1,0x27,0x00]314 315image_sample  v193, v[237:238], s[28:35], s[4:7]316// GCN: image_sample v193, v[237:238], s[28:35], s[4:7] ; encoding: [0x00,0x00,0x80,0xf0,0xed,0xc1,0x27,0x00]317 318image_sample  v193, v[237:239], s[28:35], s[4:7]319// GCN: image_sample v193, v[237:239], s[28:35], s[4:7] ; encoding: [0x00,0x00,0x80,0xf0,0xed,0xc1,0x27,0x00]320 321image_sample  v193, v[237:240], s[28:35], s[4:7]322// GCN: image_sample v193, v[237:240], s[28:35], s[4:7] ; encoding: [0x00,0x00,0x80,0xf0,0xed,0xc1,0x27,0x00]323 324image_sample  v[193:194], v[237:240], s[28:35], s[4:7] tfe325// GCN: image_sample v[193:194], v[237:240], s[28:35], s[4:7] tfe ; encoding: [0x00,0x00,0x81,0xf0,0xed,0xc1,0x27,0x00]326 327// FIXME: This test is incorrect because r128 assumes a 128-bit SRSRC.328image_sample  v193, v[237:240], s[28:35], s[4:7] r128329// SICIVI: image_sample v193, v[237:240], s[28:35], s[4:7] r128 ; encoding: [0x00,0x80,0x80,0xf0,0xed,0xc1,0x27,0x00]330// NOGFX9: :[[@LINE-2]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU331 332image_sample  v193, v[237:240], s[28:35], s[4:7] d16333// NOSICI: :[[@LINE-1]]:{{[0-9]+}}: error: d16 modifier is not supported on this GPU334// GFX89:  image_sample v193, v[237:240], s[28:35], s[4:7] d16 ; encoding: [0x00,0x00,0x80,0xf0,0xed,0xc1,0x27,0x80]335 336//===----------------------------------------------------------------------===//337// Image Sample: d16 packed338//===----------------------------------------------------------------------===//339 340image_sample  v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 d16341// NOSICI:   error: d16 modifier is not supported on this GPU342// GFX8_0:   image_sample v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 d16 ; encoding: [0x00,0x07,0x80,0xf0,0xed,0xc1,0x27,0x80]343// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe344// NOGFX9:   error: image data size does not match dmask, d16 and tfe345 346//===----------------------------------------------------------------------===//347// Image Sample: d16 unpacked348//===----------------------------------------------------------------------===//349 350image_sample  v[193:194], v[237:240], s[28:35], s[4:7] dmask:0x7 d16351// NOSICI:   error: d16 modifier is not supported on this GPU352// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe353// GFX8_1:   image_sample v[193:194], v[237:240], s[28:35], s[4:7] dmask:0x7 d16 ; encoding: [0x00,0x07,0x80,0xf0,0xed,0xc1,0x27,0x80]354// GFX9:     image_sample v[193:194], v[237:240], s[28:35], s[4:7] dmask:0x7 d16 ; encoding: [0x00,0x07,0x80,0xf0,0xed,0xc1,0x27,0x80]355 356//===----------------------------------------------------------------------===//357// Image Sample: a16358//===----------------------------------------------------------------------===//359 360image_sample v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16361// GFX9:   image_sample v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16 ; encoding: [0x00,0x8f,0x80,0xf0,0xed,0xc1,0x27,0x00]362// NOSICI:   error: a16 modifier is not supported on this GPU363// NOVI:   error: a16 modifier is not supported on this GPU364 365image_sample_d v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16366// GFX9:   image_sample_d v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16 ; encoding: [0x00,0x8f,0x88,0xf0,0xed,0xc1,0x27,0x00]367// NOSICI:   error: a16 modifier is not supported on this GPU368// NOVI:   error: a16 modifier is not supported on this GPU369 370image_sample_c_d v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16371// GFX9:   image_sample_c_d v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16 ; encoding: [0x00,0x8f,0xa8,0xf0,0xed,0xc1,0x27,0x00]372// NOSICI:   error: a16 modifier is not supported on this GPU373// NOVI:   error: a16 modifier is not supported on this GPU374 375image_sample_c_d_cl v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16376// GFX9:   image_sample_c_d_cl v[193:196], v[237:240], s[28:35], s[4:7] dmask:0xf a16 ; encoding: [0x00,0x8f,0xac,0xf0,0xed,0xc1,0x27,0x00]377// NOSICI:   error: a16 modifier is not supported on this GPU378// NOVI:   error: a16 modifier is not supported on this GPU379 380//===----------------------------------------------------------------------===//381// Image Atomics382//===----------------------------------------------------------------------===//383 384image_atomic_add v4, v192, s[28:35] dmask:0x1 unorm glc385// SICI:  image_atomic_add v4, v192, s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x44,0xf0,0xc0,0x04,0x07,0x00]386// GFX89: image_atomic_add v4, v192, s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x48,0xf0,0xc0,0x04,0x07,0x00]387 388image_atomic_add v4, v[192:193], s[28:35] dmask:0x1 unorm glc389// SICI:  image_atomic_add v4, v[192:193], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x44,0xf0,0xc0,0x04,0x07,0x00]390// GFX89: image_atomic_add v4, v[192:193], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x48,0xf0,0xc0,0x04,0x07,0x00]391 392image_atomic_add v4, v[192:194], s[28:35] dmask:0x1 unorm glc393// SICI:  image_atomic_add v4, v[192:194], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x44,0xf0,0xc0,0x04,0x07,0x00]394// GFX89: image_atomic_add v4, v[192:194], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x48,0xf0,0xc0,0x04,0x07,0x00]395 396image_atomic_add v4, v[192:195], s[28:35] dmask:0x1 unorm glc397// SICI:  image_atomic_add v4, v[192:195], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x44,0xf0,0xc0,0x04,0x07,0x00]398// GFX89: image_atomic_add v4, v[192:195], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x48,0xf0,0xc0,0x04,0x07,0x00]399 400image_atomic_add v252, v2, s[8:15] dmask:0x1 unorm401// SICI:  image_atomic_add v252, v2, s[8:15] dmask:0x1 unorm ; encoding: [0x00,0x11,0x44,0xf0,0x02,0xfc,0x02,0x00]402// GFX89: image_atomic_add v252, v2, s[8:15] dmask:0x1 unorm ; encoding: [0x00,0x11,0x48,0xf0,0x02,0xfc,0x02,0x00]403 404image_atomic_add v[6:7], v255, s[8:15] dmask:0x3405// SICI:  image_atomic_add v[6:7], v255, s[8:15] dmask:0x3 ; encoding: [0x00,0x03,0x44,0xf0,0xff,0x06,0x02,0x00]406// GFX89: image_atomic_add v[6:7], v255, s[8:15] dmask:0x3 ; encoding: [0x00,0x03,0x48,0xf0,0xff,0x06,0x02,0x00]407 408image_atomic_add v7, v3, s[0:7] dmask:0x1 glc409// SICI:  image_atomic_add v7, v3, s[0:7] dmask:0x1 glc ; encoding: [0x00,0x21,0x44,0xf0,0x03,0x07,0x00,0x00]410// GFX89: image_atomic_add v7, v3, s[0:7] dmask:0x1 glc ; encoding: [0x00,0x21,0x48,0xf0,0x03,0x07,0x00,0x00]411 412image_atomic_add v8, v4, s[8:15] dmask:0x1 slc413// SICI:  image_atomic_add v8, v4, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x44,0xf2,0x04,0x08,0x02,0x00]414// GFX89: image_atomic_add v8, v4, s[8:15] dmask:0x1 slc ; encoding: [0x00,0x01,0x48,0xf2,0x04,0x08,0x02,0x00]415 416image_atomic_add v9, v5, s[8:15] dmask:0x1 unorm glc slc lwe da417// SICI:  image_atomic_add v9, v5, s[8:15] dmask:0x1 unorm glc slc lwe da ; encoding: [0x00,0x71,0x46,0xf2,0x05,0x09,0x02,0x00]418// GFX89: image_atomic_add v9, v5, s[8:15] dmask:0x1 unorm glc slc lwe da ; encoding: [0x00,0x71,0x4a,0xf2,0x05,0x09,0x02,0x00]419 420image_atomic_add v10, v6, s[8:15] dmask:0x1 lwe421// SICI:  image_atomic_add v10, v6, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x46,0xf0,0x06,0x0a,0x02,0x00]422// GFX89: image_atomic_add v10, v6, s[8:15] dmask:0x1 lwe ; encoding: [0x00,0x01,0x4a,0xf0,0x06,0x0a,0x02,0x00]423 424image_atomic_add v11, v7, s[8:15] dmask:0x1 da425// SICI:  image_atomic_add v11, v7, s[8:15] dmask:0x1 da ; encoding: [0x00,0x41,0x44,0xf0,0x07,0x0b,0x02,0x00]426// GFX89: image_atomic_add v11, v7, s[8:15] dmask:0x1 da ; encoding: [0x00,0x41,0x48,0xf0,0x07,0x0b,0x02,0x00]427 428image_atomic_swap v4, v[192:195], s[28:35] dmask:0x1 unorm glc429// SICI:  image_atomic_swap v4, v[192:195], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x3c,0xf0,0xc0,0x04,0x07,0x00]430// GFX89: image_atomic_swap v4, v[192:195], s[28:35] dmask:0x1 unorm glc ; encoding: [0x00,0x31,0x40,0xf0,0xc0,0x04,0x07,0x00]431 432image_atomic_cmpswap v[4:5], v[192:195], s[28:35] dmask:0x3 unorm glc433// SICI:  image_atomic_cmpswap v[4:5], v[192:195], s[28:35] dmask:0x3 unorm glc ; encoding: [0x00,0x33,0x40,0xf0,0xc0,0x04,0x07,0x00]434// GFX89: image_atomic_cmpswap v[4:5], v[192:195], s[28:35] dmask:0x3 unorm glc ; encoding: [0x00,0x33,0x44,0xf0,0xc0,0x04,0x07,0x00]435 436image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf unorm glc437// SICI:  image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf unorm glc ; encoding: [0x00,0x3f,0x40,0xf0,0xc0,0x04,0x07,0x00]438// GFX89: image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf unorm glc ; encoding: [0x00,0x3f,0x44,0xf0,0xc0,0x04,0x07,0x00]439 440; Test dmask + tfe for image_atomic instructions441image_atomic_add v4, v10, s[8:15] dmask:0x1442// SICI:  image_atomic_add v4, v10, s[8:15] dmask:0x1 ; encoding: [0x00,0x01,0x44,0xf0,0x0a,0x04,0x02,0x00]443// GFX89: image_atomic_add v4, v10, s[8:15] dmask:0x1 ; encoding: [0x00,0x01,0x48,0xf0,0x0a,0x04,0x02,0x00]444 445image_atomic_add v[4:5], v10, s[8:15] dmask:0x1 tfe446// SICI:  image_atomic_add v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x45,0xf0,0x0a,0x04,0x02,0x00]447// GFX89: image_atomic_add v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x49,0xf0,0x0a,0x04,0x02,0x00]448 449image_atomic_add v[4:5], v10, s[8:15] dmask:0x3450// SICI:  image_atomic_add v[4:5], v10, s[8:15] dmask:0x3 ; encoding: [0x00,0x03,0x44,0xf0,0x0a,0x04,0x02,0x00]451// GFX89: image_atomic_add v[4:5], v10, s[8:15] dmask:0x3 ; encoding: [0x00,0x03,0x48,0xf0,0x0a,0x04,0x02,0x00]452 453image_atomic_add v[4:6], v10, s[8:15] dmask:0x3 tfe454// SICI:  image_atomic_add v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x45,0xf0,0x0a,0x04,0x02,0x00]455// GFX89: image_atomic_add v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x49,0xf0,0x0a,0x04,0x02,0x00]456 457image_atomic_swap v4, v[192:195], s[28:35] dmask:0x1458// SICI:  image_atomic_swap v4, v[192:195], s[28:35] dmask:0x1 ; encoding: [0x00,0x01,0x3c,0xf0,0xc0,0x04,0x07,0x00]459// GFX89: image_atomic_swap v4, v[192:195], s[28:35] dmask:0x1 ; encoding: [0x00,0x01,0x40,0xf0,0xc0,0x04,0x07,0x00]460 461image_atomic_swap v[4:5], v[192:195], s[28:35] dmask:0x1 tfe462// SICI:  image_atomic_swap v[4:5], v[192:195], s[28:35] dmask:0x1 tfe ; encoding: [0x00,0x01,0x3d,0xf0,0xc0,0x04,0x07,0x00]463// GFX89: image_atomic_swap v[4:5], v[192:195], s[28:35] dmask:0x1 tfe ; encoding: [0x00,0x01,0x41,0xf0,0xc0,0x04,0x07,0x00]464 465image_atomic_swap v[4:5], v[192:195], s[28:35] dmask:0x3466// SICI:  image_atomic_swap v[4:5], v[192:195], s[28:35] dmask:0x3 ; encoding: [0x00,0x03,0x3c,0xf0,0xc0,0x04,0x07,0x00]467// GFX89: image_atomic_swap v[4:5], v[192:195], s[28:35] dmask:0x3 ; encoding: [0x00,0x03,0x40,0xf0,0xc0,0x04,0x07,0x00]468 469image_atomic_swap v[4:6], v[192:195], s[28:35] dmask:0x3 tfe470// SICI:  image_atomic_swap v[4:6], v[192:195], s[28:35] dmask:0x3 tfe ; encoding: [0x00,0x03,0x3d,0xf0,0xc0,0x04,0x07,0x00]471// GFX89: image_atomic_swap v[4:6], v[192:195], s[28:35] dmask:0x3 tfe ; encoding: [0x00,0x03,0x41,0xf0,0xc0,0x04,0x07,0x00]472 473image_atomic_sub v[4:5], v10, s[8:15] dmask:0x1 tfe474// SICI:  image_atomic_sub v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x49,0xf0,0x0a,0x04,0x02,0x00]475// GFX89: image_atomic_sub v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x4d,0xf0,0x0a,0x04,0x02,0x00]476 477image_atomic_sub v[4:6], v10, s[8:15] dmask:0x3 tfe478// SICI:  image_atomic_sub v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x49,0xf0,0x0a,0x04,0x02,0x00]479// GFX89: image_atomic_sub v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x4d,0xf0,0x0a,0x04,0x02,0x00]480 481image_atomic_smin v[4:5], v10, s[8:15] dmask:0x1 tfe482// SICI:  image_atomic_smin v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x51,0xf0,0x0a,0x04,0x02,0x00]483// GFX89: image_atomic_smin v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x51,0xf0,0x0a,0x04,0x02,0x00]484 485image_atomic_smin v[4:6], v10, s[8:15] dmask:0x3 tfe486// SICI:  image_atomic_smin v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x51,0xf0,0x0a,0x04,0x02,0x00]487// GFX89: image_atomic_smin v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x51,0xf0,0x0a,0x04,0x02,0x00]488 489image_atomic_umin v[4:5], v10, s[8:15] dmask:0x1 tfe490// SICI:  image_atomic_umin v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x55,0xf0,0x0a,0x04,0x02,0x00]491// GFX89: image_atomic_umin v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x55,0xf0,0x0a,0x04,0x02,0x00]492 493image_atomic_umin v[4:6], v10, s[8:15] dmask:0x3 tfe494// SICI:  image_atomic_umin v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x55,0xf0,0x0a,0x04,0x02,0x00]495// GFX89: image_atomic_umin v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x55,0xf0,0x0a,0x04,0x02,0x00]496 497image_atomic_smax v[4:5], v10, s[8:15] dmask:0x1 tfe498// SICI:  image_atomic_smax v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x59,0xf0,0x0a,0x04,0x02,0x00]499// GFX89: image_atomic_smax v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x59,0xf0,0x0a,0x04,0x02,0x00]500 501image_atomic_smax v[4:6], v10, s[8:15] dmask:0x3 tfe502// SICI:  image_atomic_smax v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x59,0xf0,0x0a,0x04,0x02,0x00]503// GFX89: image_atomic_smax v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x59,0xf0,0x0a,0x04,0x02,0x00]504 505image_atomic_umax v[4:5], v10, s[8:15] dmask:0x1 tfe506// SICI:  image_atomic_umax v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x5d,0xf0,0x0a,0x04,0x02,0x00]507// GFX89: image_atomic_umax v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x5d,0xf0,0x0a,0x04,0x02,0x00]508 509image_atomic_umax v[4:6], v10, s[8:15] dmask:0x3 tfe510// SICI:  image_atomic_umax v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x5d,0xf0,0x0a,0x04,0x02,0x00]511// GFX89: image_atomic_umax v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x5d,0xf0,0x0a,0x04,0x02,0x00]512 513image_atomic_and v[4:5], v10, s[8:15] dmask:0x1 tfe514// SICI:  image_atomic_and v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x61,0xf0,0x0a,0x04,0x02,0x00]515// GFX89: image_atomic_and v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x61,0xf0,0x0a,0x04,0x02,0x00]516 517image_atomic_and v[4:6], v10, s[8:15] dmask:0x3 tfe518// SICI:  image_atomic_and v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x61,0xf0,0x0a,0x04,0x02,0x00]519// GFX89: image_atomic_and v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x61,0xf0,0x0a,0x04,0x02,0x00]520 521image_atomic_or v[4:5], v10, s[8:15] dmask:0x1 tfe522// SICI:  image_atomic_or v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x65,0xf0,0x0a,0x04,0x02,0x00]523// GFX89: image_atomic_or v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x65,0xf0,0x0a,0x04,0x02,0x00]524 525image_atomic_or v[4:6], v10, s[8:15] dmask:0x3 tfe526// SICI:  image_atomic_or v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x65,0xf0,0x0a,0x04,0x02,0x00]527// GFX89: image_atomic_or v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x65,0xf0,0x0a,0x04,0x02,0x00]528 529image_atomic_xor v[4:5], v10, s[8:15] dmask:0x1 tfe530// SICI:  image_atomic_xor v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x69,0xf0,0x0a,0x04,0x02,0x00]531// GFX89: image_atomic_xor v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x69,0xf0,0x0a,0x04,0x02,0x00]532 533image_atomic_xor v[4:6], v10, s[8:15] dmask:0x3 tfe534// SICI:  image_atomic_xor v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x69,0xf0,0x0a,0x04,0x02,0x00]535// GFX89: image_atomic_xor v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x69,0xf0,0x0a,0x04,0x02,0x00]536 537image_atomic_inc v[4:5], v10, s[8:15] dmask:0x1 tfe538// SICI:  image_atomic_inc v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x6d,0xf0,0x0a,0x04,0x02,0x00]539// GFX89: image_atomic_inc v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x6d,0xf0,0x0a,0x04,0x02,0x00]540 541image_atomic_inc v[4:6], v10, s[8:15] dmask:0x3 tfe542// SICI:  image_atomic_inc v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x6d,0xf0,0x0a,0x04,0x02,0x00]543// GFX89: image_atomic_inc v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x6d,0xf0,0x0a,0x04,0x02,0x00]544 545image_atomic_dec v[4:5], v10, s[8:15] dmask:0x1 tfe546// SICI:  image_atomic_dec v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x71,0xf0,0x0a,0x04,0x02,0x00]547// GFX89: image_atomic_dec v[4:5], v10, s[8:15] dmask:0x1 tfe ; encoding: [0x00,0x01,0x71,0xf0,0x0a,0x04,0x02,0x00]548 549image_atomic_dec v[4:6], v10, s[8:15] dmask:0x3 tfe550// SICI:  image_atomic_dec v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x71,0xf0,0x0a,0x04,0x02,0x00]551// GFX89: image_atomic_dec v[4:6], v10, s[8:15] dmask:0x3 tfe ; encoding: [0x00,0x03,0x71,0xf0,0x0a,0x04,0x02,0x00]552 553image_atomic_cmpswap v[4:5], v[192:195], s[28:35] dmask:0x3554// SICI:  image_atomic_cmpswap v[4:5], v[192:195], s[28:35] dmask:0x3 ; encoding: [0x00,0x03,0x40,0xf0,0xc0,0x04,0x07,0x00]555// GFX89: image_atomic_cmpswap v[4:5], v[192:195], s[28:35] dmask:0x3 ; encoding: [0x00,0x03,0x44,0xf0,0xc0,0x04,0x07,0x00]556 557image_atomic_cmpswap v[4:6], v[192:195], s[28:35] dmask:0x3 tfe558// SICI:  image_atomic_cmpswap v[4:6], v[192:195], s[28:35] dmask:0x3 tfe ; encoding: [0x00,0x03,0x41,0xf0,0xc0,0x04,0x07,0x00]559// GFX89: image_atomic_cmpswap v[4:6], v[192:195], s[28:35] dmask:0x3 tfe ; encoding: [0x00,0x03,0x45,0xf0,0xc0,0x04,0x07,0x00]560 561image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf562// SICI:  image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf ; encoding: [0x00,0x0f,0x40,0xf0,0xc0,0x04,0x07,0x00]563// GFX89: image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf ; encoding: [0x00,0x0f,0x44,0xf0,0xc0,0x04,0x07,0x00]564 565image_atomic_cmpswap v[4:8], v[192:195], s[28:35] dmask:0xf tfe566// SICI:  image_atomic_cmpswap v[4:8], v[192:195], s[28:35] dmask:0xf tfe ; encoding: [0x00,0x0f,0x41,0xf0,0xc0,0x04,0x07,0x00]567// GFX89: image_atomic_cmpswap v[4:8], v[192:195], s[28:35] dmask:0xf tfe ; encoding: [0x00,0x0f,0x45,0xf0,0xc0,0x04,0x07,0x00]568 569// FIXME: This test is incorrect because r128 assumes a 128-bit SRSRC.570image_atomic_add v10, v6, s[8:15] dmask:0x1 r128571// SICI: image_atomic_add v10, v6, s[8:15] dmask:0x1 r128 ; encoding: [0x00,0x81,0x44,0xf0,0x06,0x0a,0x02,0x00]572// VI:   image_atomic_add v10, v6, s[8:15] dmask:0x1 r128 ; encoding: [0x00,0x81,0x48,0xf0,0x06,0x0a,0x02,0x00]573// NOGFX9: :[[@LINE-3]]:{{[0-9]+}}: error: r128 modifier is not supported on this GPU574 575//===----------------------------------------------------------------------===//576// Image Gather4577//===----------------------------------------------------------------------===//578 579image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1580// GCN: image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0x05,0x62,0x00]581 582image_gather4 v[5:8], v[1:2], s[8:15], s[12:15] dmask:0x1583// GCN: image_gather4 v[5:8], v[1:2], s[8:15], s[12:15] dmask:0x1 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0x05,0x62,0x00]584 585image_gather4 v[5:8], v[1:3], s[8:15], s[12:15] dmask:0x1586// GCN: image_gather4 v[5:8], v[1:3], s[8:15], s[12:15] dmask:0x1 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0x05,0x62,0x00]587 588image_gather4 v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x2589// GCN: image_gather4 v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x2 ; encoding: [0x00,0x02,0x00,0xf1,0x01,0x05,0x62,0x00]590 591image_gather4 v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x4592// GCN: image_gather4 v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x4 ; encoding: [0x00,0x04,0x00,0xf1,0x01,0x05,0x62,0x00]593 594image_gather4 v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x8595// GCN: image_gather4 v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x8 ; encoding: [0x00,0x08,0x00,0xf1,0x01,0x05,0x62,0x00]596 597image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 d16598// NOSICI:   error: d16 modifier is not supported on this GPU599// GFX8_0:   image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 d16 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0x05,0x62,0x80]600// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe601// NOGFX9:   error: image data size does not match dmask, d16 and tfe602 603image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1 d16604// NOSICI:   error: d16 modifier is not supported on this GPU605// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe606// GFX8_1:   image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1 d16 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0x05,0x62,0x80]607// GFX9:     image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1 d16 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0x05,0x62,0x80]608 609image_gather4 v[5:6], v1, s[8:15], s[12:15] dmask:0x1610// NOSICI:   error: image data size does not match dmask and tfe611// NOGFX8_0: :[[@LINE-2]]:{{[0-9]+}}: error: image data size does not match dmask and tfe612// NOGFX8_1: :[[@LINE-3]]:{{[0-9]+}}: error: image data size does not match dmask, d16 and tfe613// NOGFX9:   error: image data size does not match dmask, d16 and tfe614 615image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 a16616// GFX9:     image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x1 a16 ; encoding: [0x00,0x81,0x00,0xf1,0x01,0x05,0x62,0x00]617// NOSICI:   error: a16 modifier is not supported on this GPU618// NOVI:   error: a16 modifier is not supported on this GPU619 620image_gather4_b_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x1 a16621// GFX9:    image_gather4_b_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x1 a16 ; encoding: [0x00,0x81,0x18,0xf1,0x01,0x05,0x62,0x00]622// NOSICI:   error: a16 modifier is not supported on this GPU623// NOVI:   error: a16 modifier is not supported on this GPU624