• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=GFX9 -check-prefix=GCN %s
2// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s | FileCheck -check-prefix=VI -check-prefix=GCN %s
3
4// RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding 2>&1 %s | FileCheck -check-prefix=GFX9-ERR -check-prefix=GCNERR %s
5// RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding 2>&1 %s | FileCheck -check-prefix=VI-ERR -check-prefix=GCNERR %s
6
7
8flat_load_dword v1, v[3:4] offset:0
9// 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:-1
12// GCN-ERR: :35: error: failed parsing operand.
13
14// FIXME: Error on VI in wrong column
15flat_load_dword v1, v[3:4] offset:4095
16// GFX9: flat_load_dword v1, v[3:4] offset:4095 ; encoding: [0xff,0x0f,0x50,0xdc,0x03,0x00,0x00,0x01]
17// VIERR: :1: error: invalid operand for instruction
18
19flat_load_dword v1, v[3:4] offset:4096
20// GCNERR: :28: error: invalid operand for instruction
21
22flat_load_dword v1, v[3:4] offset:4 glc
23// GFX9: flat_load_dword v1, v[3:4] offset:4 glc ; encoding: [0x04,0x00,0x51,0xdc,0x03,0x00,0x00,0x01]
24// VIERR: :1: error: invalid operand for instruction
25
26flat_load_dword v1, v[3:4] offset:4 glc slc
27// GFX9: flat_load_dword v1, v[3:4] offset:4 glc slc ; encoding: [0x04,0x00,0x53,0xdc,0x03,0x00,0x00,0x01]
28// VIERR: :1: error: invalid operand for instruction
29
30flat_atomic_add v[3:4], v5 offset:8 slc
31// GFX9: flat_atomic_add v[3:4], v5 offset:8 slc ; encoding: [0x08,0x00,0x0a,0xdd,0x03,0x05,0x00,0x00]
32// VIERR: :1: error: invalid operand for instruction
33
34flat_atomic_add v[3:4], v5 inst_offset:8 slc
35// GFX9: flat_atomic_add v[3:4], v5 offset:8 slc ; encoding: [0x08,0x00,0x0a,0xdd,0x03,0x05,0x00,0x00]
36// VIERR: :1: error: invalid operand for instruction
37
38flat_atomic_cmpswap v[1:2], v[3:4] offset:4095
39// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 ; encoding: [0xff,0x0f,0x04,0xdd,0x01,0x03,0x00,0x00]
40// VIERR: :1: error: invalid operand for instruction
41
42flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 slc
43// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 slc ; encoding: [0xff,0x0f,0x06,0xdd,0x01,0x03,0x00,0x00]
44// VIERR: :1: error: invalid operand for instruction
45
46flat_atomic_cmpswap v[1:2], v[3:4]
47// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] ; encoding: [0x00,0x00,0x04,0xdd,0x01,0x03,0x00,0x00]
48// VI:   flat_atomic_cmpswap v[1:2], v[3:4] ; encoding: [0x00,0x00,0x04,0xdd,0x01,0x03,0x00,0x00]
49
50flat_atomic_cmpswap v[1:2], v[3:4] slc
51// GFX9: flat_atomic_cmpswap v[1:2], v[3:4] slc ; encoding: [0x00,0x00,0x06,0xdd,0x01,0x03,0x00,0x00]
52// VI:   flat_atomic_cmpswap v[1:2], v[3:4] slc ; encoding: [0x00,0x00,0x06,0xdd,0x01,0x03,0x00,0x00]
53
54flat_atomic_cmpswap v[1:2], v[3:4] offset:4095 glc
55// GCNERR: error: invalid operand for instruction
56
57flat_atomic_cmpswap v[1:2], v[3:4] glc
58// GCNERR: error: invalid operand for instruction
59
60flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc
61// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc ; encoding: [0xff,0x0f,0x05,0xdd,0x01,0x03,0x00,0x00]
62// VIERR: :1: error: invalid operand for instruction
63
64flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc slc
65// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095 glc slc ; encoding: [0xff,0x0f,0x07,0xdd,0x01,0x03,0x00,0x00]
66// VIERR: :1: error: invalid operand for instruction
67
68flat_atomic_cmpswap v0, v[1:2], v[3:4] glc
69// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] glc ; encoding: [0x00,0x00,0x05,0xdd,0x01,0x03,0x00,0x00]
70// VI:   flat_atomic_cmpswap v0, v[1:2], v[3:4] glc ; encoding: [0x00,0x00,0x05,0xdd,0x01,0x03,0x00,0x00]
71
72flat_atomic_cmpswap v0, v[1:2], v[3:4] glc slc
73// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] glc slc ; encoding: [0x00,0x00,0x07,0xdd,0x01,0x03,0x00,0x00]
74// VI:   flat_atomic_cmpswap v0, v[1:2], v[3:4] glc slc ; encoding: [0x00,0x00,0x07,0xdd,0x01,0x03,0x00,0x00]
75
76flat_atomic_cmpswap v0, v[1:2], v[3:4]
77// GFX9: flat_atomic_cmpswap v0, v[1:2], v[3:4] glc ; encoding: [0x00,0x00,0x05,0xdd,0x01,0x03,0x00,0x00]
78// VI:   flat_atomic_cmpswap v0, v[1:2], v[3:4] glc ; encoding: [0x00,0x00,0x05,0xdd,0x01,0x03,0x00,0x00]
79
80flat_atomic_cmpswap v0, v[1:2], v[3:4] offset:4095
81// GCNERR: error: too few operands for instruction
82
83flat_atomic_cmpswap v0, v[1:2], v[3:4] slc
84// GCNERR: error: invalid operand for instruction
85
86flat_atomic_swap v[3:4], v5 offset:16
87// GFX9: flat_atomic_swap v[3:4], v5 offset:16 ; encoding: [0x10,0x00,0x00,0xdd,0x03,0x05,0x00,0x00]
88// VIERR: :1: error: invalid operand for instruction
89
90flat_store_dword v[3:4], v1 offset:16
91// GFX9: flat_store_dword v[3:4], v1 offset:16 ; encoding: [0x10,0x00,0x70,0xdc,0x03,0x01,0x00,0x00]
92// VIERR: :1: error: invalid operand for instruction
93
94flat_store_dword v[3:4], v1, off
95// GCNERR: :30: error: invalid operand for instruction
96
97flat_store_dword v[3:4], v1, s[0:1]
98// GCNERR: :30: error: invalid operand for instruction
99
100flat_store_dword v[3:4], v1, s0
101// GCNERR: :30: error: invalid operand for instruction
102
103flat_load_dword v1, v[3:4], off
104// GCNERR: :29: error: invalid operand for instruction
105
106flat_load_dword v1, v[3:4], s[0:1]
107// GCNERR: :29: error: invalid operand for instruction
108
109flat_load_dword v1, v[3:4], s0
110// GCNERR: :29: error: invalid operand for instruction
111
112flat_load_dword v1, v[3:4], exec_hi
113// GCNERR: :29: error: invalid operand for instruction
114
115flat_store_dword v[3:4], v1, exec_hi
116// GCNERR: :30: error: invalid operand for instruction
117
118flat_load_ubyte_d16 v1, v[3:4]
119// GFX9: flat_load_ubyte_d16 v1, v[3:4]  ; encoding: [0x00,0x00,0x80,0xdc,0x03,0x00,0x00,0x01]
120// VI-ERR: error: instruction not supported on this GPU
121
122flat_load_ubyte_d16_hi v1, v[3:4]
123// GFX9: flat_load_ubyte_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x84,0xdc,0x03,0x00,0x00,0x01]
124// VI-ERR: error: instruction not supported on this GPU
125
126flat_load_sbyte_d16 v1, v[3:4]
127// GFX9: flat_load_sbyte_d16 v1, v[3:4]  ; encoding: [0x00,0x00,0x88,0xdc,0x03,0x00,0x00,0x01]
128// VI-ERR: error: instruction not supported on this GPU
129
130flat_load_sbyte_d16_hi v1, v[3:4]
131// GFX9: flat_load_sbyte_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x8c,0xdc,0x03,0x00,0x00,0x01]
132// VI-ERR: error: instruction not supported on this GPU
133
134flat_load_short_d16 v1, v[3:4]
135// GFX9: flat_load_short_d16 v1, v[3:4]  ; encoding: [0x00,0x00,0x90,0xdc,0x03,0x00,0x00,0x01]
136// VI-ERR: error: instruction not supported on this GPU
137
138flat_load_short_d16_hi v1, v[3:4]
139// GFX9: flat_load_short_d16_hi v1, v[3:4] ; encoding: [0x00,0x00,0x94,0xdc,0x03,0x00,0x00,0x01]
140// VI-ERR: error: instruction not supported on this GPU
141
142flat_store_byte_d16_hi v[3:4], v1
143// GFX9: flat_store_byte_d16_hi v[3:4], v1 ; encoding: [0x00,0x00,0x64,0xdc,0x03,0x01,0x00,0x00]
144// VI-ERR: error: instruction not supported on this GPU
145
146flat_store_short_d16_hi v[3:4], v1
147// GFX9: flat_store_short_d16_hi v[3:4], v1 ; encoding: [0x00,0x00,0x6c,0xdc,0x03,0x01,0x00,0x00
148// VI-ERR: error: instruction not supported on this GPU
149