Home | History | Annotate | Download | only in AMDGPU
      1 // RUN: not llvm-mc -arch=amdgcn -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOGCN
      2 // RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOGCN
      3 // RUN: not llvm-mc -arch=amdgcn -mcpu=fiji -show-encoding %s 2>&1 | FileCheck %s --check-prefix=NOGCN
      4 
      5 //===----------------------------------------------------------------------===//
      6 // Image Load/Store
      7 //===----------------------------------------------------------------------===//
      8 
      9 image_load    v[4:6], v[237:240], s[28:35] dmask:0x7 tfe
     10 // NOGCN: error: image data size does not match dmask and tfe
     11 
     12 image_load    v[4:5], v[237:240], s[28:35] dmask:0x7
     13 // NOGCN: error: image data size does not match dmask and tfe
     14 
     15 image_store   v[4:7], v[237:240], s[28:35] dmask:0x7
     16 // NOGCN: error: image data size does not match dmask and tfe
     17 
     18 image_store   v[4:7], v[237:240], s[28:35] dmask:0xe
     19 // NOGCN: error: image data size does not match dmask and tfe
     20 
     21 image_load    v4, v[237:240], s[28:35] tfe
     22 // NOGCN: error: image data size does not match dmask and tfe
     23 
     24 //===----------------------------------------------------------------------===//
     25 // Image Sample
     26 //===----------------------------------------------------------------------===//
     27 
     28 image_sample  v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x7 tfe
     29 // NOGCN: error: image data size does not match dmask and tfe
     30 
     31 image_sample  v[193:195], v[237:240], s[28:35], s[4:7] dmask:0x3
     32 // NOGCN: error: image data size does not match dmask and tfe
     33 
     34 image_sample  v[193:195], v[237:240], s[28:35], s[4:7] dmask:0xf
     35 // NOGCN: error: image data size does not match dmask and tfe
     36 
     37 //===----------------------------------------------------------------------===//
     38 // Image Atomics
     39 //===----------------------------------------------------------------------===//
     40 
     41 image_atomic_add v252, v2, s[8:15] dmask:0x1 tfe
     42 // NOGCN: error: image data size does not match dmask and tfe
     43 
     44 image_atomic_add v[6:7], v255, s[8:15] dmask:0x2
     45 // NOGCN: error: image data size does not match dmask and tfe
     46 
     47 image_atomic_add v[6:7], v255, s[8:15] dmask:0xf
     48 // NOGCN: error: image data size does not match dmask and tfe
     49 
     50 image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xf tfe
     51 // NOGCN: error: image data size does not match dmask and tfe
     52 
     53 image_atomic_add v252, v2, s[8:15]
     54 // NOGCN: error: invalid atomic image dmask
     55 
     56 image_atomic_add v[6:7], v255, s[8:15] dmask:0x2 tfe
     57 // NOGCN: error: invalid atomic image dmask
     58 
     59 image_atomic_cmpswap v[4:7], v[192:195], s[28:35] dmask:0xe tfe
     60 // NOGCN: error: invalid atomic image dmask
     61 
     62 //===----------------------------------------------------------------------===//
     63 // Image Gather
     64 //===----------------------------------------------------------------------===//
     65 
     66 image_gather4_cl v[5:8], v[1:4], s[8:15], s[12:15] dmask:0x3
     67 // NOGCN: error: invalid image_gather dmask: only one bit must be set
     68