diff options
| author | Dmitry Preobrazhensky <dmitry.preobrazhensky@amd.com> | 2018-03-12 15:03:34 +0000 |
|---|---|---|
| committer | Dmitry Preobrazhensky <dmitry.preobrazhensky@amd.com> | 2018-03-12 15:03:34 +0000 |
| commit | da4a7c01bfdeb9b8647d38c57f96a9dea64dc66a (patch) | |
| tree | 8f0391105ac42b2da714cd1e2ee798478f8b8b90 /llvm/test/MC/Disassembler | |
| parent | 7bbcd1d9ba969ff3505b9420b354636bf2275b01 (diff) | |
| download | bcm5719-llvm-da4a7c01bfdeb9b8647d38c57f96a9dea64dc66a.tar.gz bcm5719-llvm-da4a7c01bfdeb9b8647d38c57f96a9dea64dc66a.zip | |
[AMDGPU][MC] Corrected GATHER4 opcodes
See bug 36252: https://bugs.llvm.org/show_bug.cgi?id=36252
Differential Revision: https://reviews.llvm.org/D43874
Reviewers: artem.tamazov, arsenm
llvm-svn: 327278
Diffstat (limited to 'llvm/test/MC/Disassembler')
| -rw-r--r-- | llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt b/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt index 57084164660..ed1f38ae86b 100644 --- a/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt +++ b/llvm/test/MC/Disassembler/AMDGPU/mimg_vi.txt @@ -155,3 +155,34 @@ # VI: image_atomic_cmpswap v[5:6], v1, s[8:15] dmask:0xe unorm ; encoding: [0x00,0x1e,0x44,0xf0,0x01,0x05,0x02,0x00] 0x00,0x1e,0x44,0xf0,0x01,0x05,0x02,0x00 + +#===------------------------------------------------------------------------===# +# Image gather +#===------------------------------------------------------------------------===# + +# VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x1 ; encoding: [0x00,0x01,0x00,0xf1,0x01,0xfc,0x62,0x00] +0x00,0x01,0x00,0xf1,0x01,0xfc,0x62,0x00 + +# VI: image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x2 ; encoding: [0x00,0x02,0x00,0xf1,0x01,0x05,0x62,0x00] +0x00,0x02,0x00,0xf1,0x01,0x05,0x62,0x00 + +# VI: image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x4 ; encoding: [0x00,0x04,0x00,0xf1,0x01,0x05,0x62,0x00] +0x00,0x04,0x00,0xf1,0x01,0x05,0x62,0x00 + +# VI: image_gather4 v[5:8], v1, s[8:15], s[12:15] dmask:0x8 ; encoding: [0x00,0x08,0x00,0xf1,0x01,0x05,0x62,0x00] +0x00,0x08,0x00,0xf1,0x01,0x05,0x62,0x00 + +# GFX80: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc lwe da d16 ; encoding: [0x00,0x71,0x02,0xf3,0x01,0xfc,0x62,0x80] +# GFX81: image_gather4 v[252:253], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc lwe da d16 ; encoding: [0x00,0x71,0x02,0xf3,0x01,0xfc,0x62,0x80] +0x00,0x71,0x02,0xf3,0x01,0xfc,0x62,0x80 + +#===------------------------------------------------------------------------===# +# Invalid image gather (incorrect dmask value or tfe). +# Disassembler may produce a partially incorrect instruction but should not fail. +#===------------------------------------------------------------------------===# + +# VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x3 ; encoding: [0x00,0x03,0x00,0xf1,0x01,0xfc,0x62,0x00] +0x00,0x03,0x00,0xf1,0x01,0xfc,0x62,0x00 + +# VI: image_gather4 v[252:255], v1, s[8:15], s[12:15] dmask:0x1 unorm glc slc tfe lwe da ; encoding: [0x00,0x71,0x03,0xf3,0x01,0xfc,0x62,0x00] +0x00,0x71,0x03,0xf3,0x01,0xfc,0x62,0x00 |

