[ARM] Better OR's for MVE compares
[llvm-core.git] / test / MC / AMDGPU / vop3-gfx9.s
blobbec430e88192c6ef4406af5d4423a32e1b4a0be2
1 // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s | FileCheck -check-prefix=GFX9 %s
2 // RUN: not llvm-mc -arch=amdgcn -mcpu=tahiti -show-encoding %s 2>&1 | FileCheck -check-prefix=NOVI %s
3 // RUN: not llvm-mc -arch=amdgcn -mcpu=hawaii -show-encoding %s 2>&1 | FileCheck -check-prefix=NOVI %s
4 // RUN: not llvm-mc -arch=amdgcn -mcpu=tonga -show-encoding %s 2>&1 | FileCheck -check-prefix=NOVI %s
5 // RUN: not llvm-mc -arch=amdgcn -mcpu=gfx900 -show-encoding %s 2>&1 | FileCheck -check-prefix=NOGFX9 %s
7 v_lshl_add_u32 v1, v2, v3, v4
8 // GFX9: v_lshl_add_u32 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xfd,0xd1,0x02,0x07,0x12,0x04]
9 // NOVI: :1: error: instruction not supported on this GPU
11 v_add_lshl_u32 v1, v2, v3, v4
12 // GFX9: v_add_lshl_u32 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xfe,0xd1,0x02,0x07,0x12,0x04]
13 // NOVI: :1: error: instruction not supported on this GPU
15 v_add3_u32 v1, v2, v3, v4
16 // GFX9: v_add3_u32 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xff,0xd1,0x02,0x07,0x12,0x04]
17 // NOVI: :1: error: instruction not supported on this GPU
19 v_lshl_or_b32 v1, v2, v3, v4
20 // GFX9: v_lshl_or_b32 v1, v2, v3, v4 ; encoding: [0x01,0x00,0x00,0xd2,0x02,0x07,0x12,0x04]
21 // NOVI: :1: error: instruction not supported on this GPU
23 v_and_or_b32 v1, v2, v3, v4
24 // GFX9: v_and_or_b32 v1, v2, v3, v4 ; encoding: [0x01,0x00,0x01,0xd2,0x02,0x07,0x12,0x04]
25 // NOVI: :1: error: instruction not supported on this GPU
27 v_or3_b32 v1, v2, v3, v4
28 // GFX9: v_or3_b32 v1, v2, v3, v4 ; encoding: [0x01,0x00,0x02,0xd2,0x02,0x07,0x12,0x04]
29 // NOVI: :1: error: instruction not supported on this GPU
31 v_pack_b32_f16 v1, v2, v3
32 // GFX9: v_pack_b32_f16 v1, v2, v3 ; encoding: [0x01,0x00,0xa0,0xd2,0x02,0x07,0x02,0x00]
33 // NOVI: :1: error: instruction not supported on this GPU
35 v_pack_b32_f16 v5, v1, v2 op_sel:[1,0,0]
36 // GFX9: v_pack_b32_f16 v5, v1, v2 op_sel:[1,0,0] ; encoding: [0x05,0x08,0xa0,0xd2,0x01,0x05,0x02,0x00]
38 v_pack_b32_f16 v5, v1, v2 op_sel:[0,1,0]
39 // GFX9: v_pack_b32_f16 v5, v1, v2 op_sel:[0,1,0] ; encoding: [0x05,0x10,0xa0,0xd2,0x01,0x05,0x02,0x00]
41 v_pack_b32_f16 v5, v1, v2 op_sel:[0,0,1]
42 // GFX9: v_pack_b32_f16 v5, v1, v2 op_sel:[0,0,1] ; encoding: [0x05,0x40,0xa0,0xd2,0x01,0x05,0x02,0x00]
44 v_xad_u32 v1, v2, v3, v4
45 // GFX9: v_xad_u32 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xf3,0xd1,0x02,0x07,0x12,0x04]
46 // NOVI: :1: error: instruction not supported on this GPU
48 v_min3_f16 v1, v2, v3, v4
49 // GFX9: v_min3_f16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xf4,0xd1,0x02,0x07,0x12,0x04]
50 // NOVI: :1: error: instruction not supported on this GPU
52 v_min3_i16 v1, v2, v3, v4
53 // GFX9: v_min3_i16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xf5,0xd1,0x02,0x07,0x12,0x04]
54 // NOVI: :1: error: instruction not supported on this GPU
56 v_min3_u16 v1, v2, v3, v4
57 // GFX9: v_min3_u16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xf6,0xd1,0x02,0x07,0x12,0x04]
58 // NOVI: :1: error: instruction not supported on this GPU
60 v_max3_f16 v1, v2, v3, v4
61 // GFX9: v_max3_f16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xf7,0xd1,0x02,0x07,0x12,0x04]
62 // NOVI: :1: error: instruction not supported on this GPU
64 v_max3_f16 v5, v1, v2, v3 op_sel:[0,0,0,0]
65 // GFX9: v_max3_f16 v5, v1, v2, v3 ; encoding: [0x05,0x00,0xf7,0xd1,0x01,0x05,0x0e,0x04]
67 v_max3_f16 v5, v1, v2, v3 op_sel:[1,0,0,0]
68 // GFX9: v_max3_f16 v5, v1, v2, v3 op_sel:[1,0,0,0] ; encoding: [0x05,0x08,0xf7,0xd1,0x01,0x05,0x0e,0x04]
70 v_max3_f16 v5, v1, v2, v3 op_sel:[0,1,0,0]
71 // GFX9: v_max3_f16 v5, v1, v2, v3 op_sel:[0,1,0,0] ; encoding: [0x05,0x10,0xf7,0xd1,0x01,0x05,0x0e,0x04]
73 v_max3_f16 v5, v1, v2, v3 op_sel:[0,0,1,0]
74 // GFX9: v_max3_f16 v5, v1, v2, v3 op_sel:[0,0,1,0] ; encoding: [0x05,0x20,0xf7,0xd1,0x01,0x05,0x0e,0x04]
76 v_max3_f16 v5, v1, v2, v3 op_sel:[0,0,0,1]
77 // GFX9: v_max3_f16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0xf7,0xd1,0x01,0x05,0x0e,0x04]
79 v_max3_f16 v5, v1, v2, v3 op_sel:[1,1,1,1]
80 // GFX9: v_max3_f16 v5, v1, v2, v3 op_sel:[1,1,1,1] ; encoding: [0x05,0x78,0xf7,0xd1,0x01,0x05,0x0e,0x04]
82 v_max3_i16 v1, v2, v3, v4
83 // GFX9: v_max3_i16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xf8,0xd1,0x02,0x07,0x12,0x04]
84 // NOVI: :1: error: instruction not supported on this GPU
86 v_max3_i16 v5, v1, v2, v3 op_sel:[0,0,0,0]
87 // GFX9: v_max3_i16 v5, v1, v2, v3 ; encoding: [0x05,0x00,0xf8,0xd1,0x01,0x05,0x0e,0x04]
89 v_max3_i16 v5, v1, v2, v3 op_sel:[1,0,0,0]
90 // GFX9: v_max3_i16 v5, v1, v2, v3 op_sel:[1,0,0,0] ; encoding: [0x05,0x08,0xf8,0xd1,0x01,0x05,0x0e,0x04]
92 v_max3_i16 v5, v1, v2, v3 op_sel:[0,1,0,0]
93 // GFX9: v_max3_i16 v5, v1, v2, v3 op_sel:[0,1,0,0] ; encoding: [0x05,0x10,0xf8,0xd1,0x01,0x05,0x0e,0x04]
95 v_max3_i16 v5, v1, v2, v3 op_sel:[0,0,1,0]
96 // GFX9: v_max3_i16 v5, v1, v2, v3 op_sel:[0,0,1,0] ; encoding: [0x05,0x20,0xf8,0xd1,0x01,0x05,0x0e,0x04]
98 v_max3_i16 v5, v1, v2, v3 op_sel:[0,0,0,1]
99 // GFX9: v_max3_i16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0xf8,0xd1,0x01,0x05,0x0e,0x04]
101 v_max3_i16 v5, v1, v2, v3 op_sel:[1,1,1,1]
102 // GFX9: v_max3_i16 v5, v1, v2, v3 op_sel:[1,1,1,1] ; encoding: [0x05,0x78,0xf8,0xd1,0x01,0x05,0x0e,0x04]
104 v_max3_u16 v1, v2, v3, v4
105 // GFX9: v_max3_u16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xf9,0xd1,0x02,0x07,0x12,0x04]
106 // NOVI: :1: error: instruction not supported on this GPU
108 v_med3_f16 v1, v2, v3, v4
109 // GFX9: v_med3_f16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xfa,0xd1,0x02,0x07,0x12,0x04]
110 // NOVI: :1: error: instruction not supported on this GPU
112 v_med3_i16 v1, v2, v3, v4
113 // GFX9: v_med3_i16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xfb,0xd1,0x02,0x07,0x12,0x04]
114 // NOVI: :1: error: instruction not supported on this GPU
116 v_med3_u16 v1, v2, v3, v4
117 // GFX9: v_med3_u16 v1, v2, v3, v4 ; encoding: [0x01,0x00,0xfc,0xd1,0x02,0x07,0x12,0x04]
118 // NOVI: :1: error: instruction not supported on this GPU
120 v_mad_u32_u16 v5, v1, v2, v3
121 // GFX9: v_mad_u32_u16 v5, v1, v2, v3 ; encoding: [0x05,0x00,0xf1,0xd1,0x01,0x05,0x0e,0x04]
123 v_mad_u32_u16 v5, v1, v2, v3 op_sel:[1,0,0,0]
124 // GFX9: v_mad_u32_u16 v5, v1, v2, v3 op_sel:[1,0,0,0] ; encoding: [0x05,0x08,0xf1,0xd1,0x01,0x05,0x0e,0x04]
126 v_mad_u32_u16 v5, v1, v2, v3 op_sel:[0,1,0,0]
127 // GFX9: v_mad_u32_u16 v5, v1, v2, v3 op_sel:[0,1,0,0] ; encoding: [0x05,0x10,0xf1,0xd1,0x01,0x05,0x0e,0x04]
129 v_mad_u32_u16 v5, v1, v2, v3 op_sel:[0,0,1,0]
130 // GFX9: v_mad_u32_u16 v5, v1, v2, v3 op_sel:[0,0,1,0] ; encoding: [0x05,0x20,0xf1,0xd1,0x01,0x05,0x0e,0x04]
132 v_mad_u32_u16 v5, v1, v2, v3 op_sel:[0,0,0,1]
133 // GFX9: v_mad_u32_u16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0xf1,0xd1,0x01,0x05,0x0e,0x04]
135 v_mad_u32_u16 v5, v1, v2, v3 op_sel:[1,1,1,1]
136 // GFX9: v_mad_u32_u16 v5, v1, v2, v3 op_sel:[1,1,1,1] ; encoding: [0x05,0x78,0xf1,0xd1,0x01,0x05,0x0e,0x04]
138 v_mad_i32_i16 v5, v1, v2, v3
139 // GFX9: v_mad_i32_i16 v5, v1, v2, v3 ; encoding: [0x05,0x00,0xf2,0xd1,0x01,0x05,0x0e,0x04]
141 v_mad_i32_i16 v5, v1, v2, v3 op_sel:[0,0,0,1]
142 // GFX9: v_mad_i32_i16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0xf2,0xd1,0x01,0x05,0x0e,0x04]
144 v_cvt_pknorm_i16_f16 v5, v1, v2
145 // GFX9: v_cvt_pknorm_i16_f16 v5, v1, v2 ; encoding: [0x05,0x00,0x99,0xd2,0x01,0x05,0x02,0x00]
147 v_cvt_pknorm_i16_f16 v5, -v1, v2
148 // GFX9: v_cvt_pknorm_i16_f16 v5, -v1, v2 ; encoding: [0x05,0x00,0x99,0xd2,0x01,0x05,0x02,0x20]
150 v_cvt_pknorm_i16_f16 v5, v1, -v2
151 // GFX9: v_cvt_pknorm_i16_f16 v5, v1, -v2 ; encoding: [0x05,0x00,0x99,0xd2,0x01,0x05,0x02,0x40]
153 v_cvt_pknorm_i16_f16 v5, -v1, -v2
154 // GFX9: v_cvt_pknorm_i16_f16 v5, -v1, -v2 ; encoding: [0x05,0x00,0x99,0xd2,0x01,0x05,0x02,0x60]
156 v_cvt_pknorm_i16_f16 v5, |v1|, v2
157 // GFX9: v_cvt_pknorm_i16_f16 v5, |v1|, v2 ; encoding: [0x05,0x01,0x99,0xd2,0x01,0x05,0x02,0x00]
159 v_cvt_pknorm_i16_f16 v5, v1, |v2|
160 // GFX9: v_cvt_pknorm_i16_f16 v5, v1, |v2| ; encoding: [0x05,0x02,0x99,0xd2,0x01,0x05,0x02,0x00]
162 v_cvt_pknorm_i16_f16 v5, v1, v2 op_sel:[0,0,0]
163 // GFX9: v_cvt_pknorm_i16_f16 v5, v1, v2 ; encoding: [0x05,0x00,0x99,0xd2,0x01,0x05,0x02,0x00]
165 v_cvt_pknorm_i16_f16 v5, v1, v2 op_sel:[1,0,0]
166 // GFX9: v_cvt_pknorm_i16_f16 v5, v1, v2 op_sel:[1,0,0] ; encoding: [0x05,0x08,0x99,0xd2,0x01,0x05,0x02,0x00]
168 v_cvt_pknorm_i16_f16 v5, v1, v2 op_sel:[1,1,1]
169 // GFX9: v_cvt_pknorm_i16_f16 v5, v1, v2 op_sel:[1,1,1] ; encoding: [0x05,0x58,0x99,0xd2,0x01,0x05,0x02,0x00]
171 v_cvt_pknorm_u16_f16 v5, -v1, -v2
172 // GFX9: v_cvt_pknorm_u16_f16 v5, -v1, -v2 ; encoding: [0x05,0x00,0x9a,0xd2,0x01,0x05,0x02,0x60]
174 v_cvt_pknorm_u16_f16 v5, |v1|, |v2|
175 // GFX9: v_cvt_pknorm_u16_f16 v5, |v1|, |v2| ; encoding: [0x05,0x03,0x9a,0xd2,0x01,0x05,0x02,0x00]
177 v_cvt_pknorm_u16_f16 v5, v1, v2 op_sel:[1,1,1]
178 // GFX9: v_cvt_pknorm_u16_f16 v5, v1, v2 op_sel:[1,1,1] ; encoding: [0x05,0x58,0x9a,0xd2,0x01,0x05,0x02,0x00]
180 v_add_i16 v5, v1, v2
181 // GFX9: v_add_i16 v5, v1, v2 ; encoding: [0x05,0x00,0x9e,0xd2,0x01,0x05,0x02,0x00]
183 v_add_i16 v5, v1, v2 op_sel:[1,1,1]
184 // GFX9: v_add_i16 v5, v1, v2 op_sel:[1,1,1] ; encoding: [0x05,0x58,0x9e,0xd2,0x01,0x05,0x02,0x00]
186 v_sub_i16 v5, v1, v2
187 // GFX9: v_sub_i16 v5, v1, v2 ; encoding: [0x05,0x00,0x9f,0xd2,0x01,0x05,0x02,0x00]
189 v_sub_i16 v5, v1, v2 op_sel:[1,1,1]
190 // GFX9: v_sub_i16 v5, v1, v2 op_sel:[1,1,1] ; encoding: [0x05,0x58,0x9f,0xd2,0x01,0x05,0x02,0x00]
192 v_sub_i16 v5, v1, v2 clamp
193 // GFX9: v_sub_i16 v5, v1, v2 clamp ; encoding: [0x05,0x80,0x9f,0xd2,0x01,0x05,0x02,0x00]
195 v_fma_f16_e64 v5, v1, v2, v3
196 // GFX9: v_fma_f16 v5, v1, v2, v3 ; encoding: [0x05,0x00,0x06,0xd2,0x01,0x05,0x0e,0x04]
198 v_fma_f16 v5, v1, -v2, v3
199 // GFX9: v_fma_f16 v5, v1, -v2, v3 ; encoding: [0x05,0x00,0x06,0xd2,0x01,0x05,0x0e,0x44]
201 v_fma_f16 v5, v1, v2, |v3|
202 // GFX9: v_fma_f16 v5, v1, v2, |v3| ; encoding: [0x05,0x04,0x06,0xd2,0x01,0x05,0x0e,0x04]
204 v_fma_f16 v5, v1, v2, v3 clamp
205 // GFX9: v_fma_f16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0x06,0xd2,0x01,0x05,0x0e,0x04]
207 v_fma_f16 v5, v1, v2, v3 op_sel:[1,0,0,0]
208 // GFX9: v_fma_f16 v5, v1, v2, v3 op_sel:[1,0,0,0] ; encoding: [0x05,0x08,0x06,0xd2,0x01,0x05,0x0e,0x04]
210 v_fma_f16 v5, v1, v2, v3 op_sel:[0,1,0,0]
211 // GFX9: v_fma_f16 v5, v1, v2, v3 op_sel:[0,1,0,0] ; encoding: [0x05,0x10,0x06,0xd2,0x01,0x05,0x0e,0x04]
213 v_fma_f16 v5, v1, v2, v3 op_sel:[1,1,1,1]
214 // GFX9: v_fma_f16 v5, v1, v2, v3 op_sel:[1,1,1,1] ; encoding: [0x05,0x78,0x06,0xd2,0x01,0x05,0x0e,0x04]
216 v_fma_legacy_f16_e64 v5, v1, v2, v3
217 // GFX9: v_fma_legacy_f16 v5, v1, v2, v3 ; encoding: [0x05,0x00,0xee,0xd1,0x01,0x05,0x0e,0x04]
219 v_fma_legacy_f16 v5, -v1, v2, v3
220 // GFX9: v_fma_legacy_f16 v5, -v1, v2, v3 ; encoding: [0x05,0x00,0xee,0xd1,0x01,0x05,0x0e,0x24]
222 v_fma_legacy_f16 v5, v1, |v2|, v3
223 // GFX9: v_fma_legacy_f16 v5, v1, |v2|, v3 ; encoding: [0x05,0x02,0xee,0xd1,0x01,0x05,0x0e,0x04]
225 v_fma_legacy_f16 v5, v1, v2, v3 clamp
226 // GFX9: v_fma_legacy_f16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0xee,0xd1,0x01,0x05,0x0e,0x04]
228 v_div_fixup_f16_e64 v5, 0.5, v2, v3
229 // GFX9: v_div_fixup_f16 v5, 0.5, v2, v3 ; encoding: [0x05,0x00,0x07,0xd2,0xf0,0x04,0x0e,0x04]
231 v_div_fixup_f16 v5, v1, 0.5, v3
232 // GFX9: v_div_fixup_f16 v5, v1, 0.5, v3 ; encoding: [0x05,0x00,0x07,0xd2,0x01,0xe1,0x0d,0x04]
234 v_div_fixup_f16 v5, v1, v2, 0.5
235 // GFX9: v_div_fixup_f16 v5, v1, v2, 0.5 ; encoding: [0x05,0x00,0x07,0xd2,0x01,0x05,0xc2,0x03]
237 v_div_fixup_f16 v5, -v1, v2, v3
238 // GFX9: v_div_fixup_f16 v5, -v1, v2, v3 ; encoding: [0x05,0x00,0x07,0xd2,0x01,0x05,0x0e,0x24]
240 v_div_fixup_f16 v5, |v1|, v2, v3
241 // GFX9: v_div_fixup_f16 v5, |v1|, v2, v3 ; encoding: [0x05,0x01,0x07,0xd2,0x01,0x05,0x0e,0x04]
243 v_div_fixup_f16 v5, v1, v2, v3 clamp
244 // GFX9: v_div_fixup_f16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0x07,0xd2,0x01,0x05,0x0e,0x04]
246 v_div_fixup_f16 v5, v1, v2, v3 op_sel:[1,0,0,0]
247 // GFX9: v_div_fixup_f16 v5, v1, v2, v3 op_sel:[1,0,0,0] ; encoding: [0x05,0x08,0x07,0xd2,0x01,0x05,0x0e,0x04]
249 v_div_fixup_f16 v5, v1, v2, v3 op_sel:[0,0,1,0]
250 // GFX9: v_div_fixup_f16 v5, v1, v2, v3 op_sel:[0,0,1,0] ; encoding: [0x05,0x20,0x07,0xd2,0x01,0x05,0x0e,0x04]
252 v_div_fixup_f16 v5, v1, v2, v3 op_sel:[0,0,0,1]
253 // GFX9: v_div_fixup_f16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0x07,0xd2,0x01,0x05,0x0e,0x04]
255 v_div_fixup_legacy_f16_e64 v5, 0.5, v2, v3
256 // GFX9: v_div_fixup_legacy_f16 v5, 0.5, v2, v3 ; encoding: [0x05,0x00,0xef,0xd1,0xf0,0x04,0x0e,0x04]
258 v_div_fixup_legacy_f16 v5, v1, 0.5, v3
259 // GFX9: v_div_fixup_legacy_f16 v5, v1, 0.5, v3 ; encoding: [0x05,0x00,0xef,0xd1,0x01,0xe1,0x0d,0x04]
261 v_div_fixup_legacy_f16 v5, v1, v2, 0.5
262 // GFX9: v_div_fixup_legacy_f16 v5, v1, v2, 0.5 ; encoding: [0x05,0x00,0xef,0xd1,0x01,0x05,0xc2,0x03]
264 v_div_fixup_legacy_f16 v5, -v1, v2, v3
265 // GFX9: v_div_fixup_legacy_f16 v5, -v1, v2, v3 ; encoding: [0x05,0x00,0xef,0xd1,0x01,0x05,0x0e,0x24]
267 v_div_fixup_legacy_f16 v5, v1, |v2|, v3
268 // GFX9: v_div_fixup_legacy_f16 v5, v1, |v2|, v3 ; encoding: [0x05,0x02,0xef,0xd1,0x01,0x05,0x0e,0x04]
270 v_div_fixup_legacy_f16 v5, v1, v2, v3 clamp
271 // GFX9: v_div_fixup_legacy_f16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0xef,0xd1,0x01,0x05,0x0e,0x04]
273 v_mad_f16_e64 v5, 0.5, v2, v3
274 // GFX9: v_mad_f16 v5, 0.5, v2, v3 ; encoding: [0x05,0x00,0x03,0xd2,0xf0,0x04,0x0e,0x04]
276 v_mad_f16 v5, v1, 0.5, v3
277 // GFX9: v_mad_f16 v5, v1, 0.5, v3 ; encoding: [0x05,0x00,0x03,0xd2,0x01,0xe1,0x0d,0x04]
279 v_mad_f16 v5, v1, v2, 0.5
280 // GFX9: v_mad_f16 v5, v1, v2, 0.5 ; encoding: [0x05,0x00,0x03,0xd2,0x01,0x05,0xc2,0x03]
282 v_mad_f16 v5, v1, v2, -v3
283 // GFX9: v_mad_f16 v5, v1, v2, -v3 ; encoding: [0x05,0x00,0x03,0xd2,0x01,0x05,0x0e,0x84]
285 v_mad_f16 v5, v1, v2, |v3|
286 // GFX9: v_mad_f16 v5, v1, v2, |v3| ; encoding: [0x05,0x04,0x03,0xd2,0x01,0x05,0x0e,0x04]
288 v_mad_f16 v5, v1, v2, v3 op_sel:[0,0,0,0]
289 // GFX9: v_mad_f16 v5, v1, v2, v3 ; encoding: [0x05,0x00,0x03,0xd2,0x01,0x05,0x0e,0x04]
291 v_mad_f16 v5, v1, v2, v3 op_sel:[1,0,0,0]
292 // GFX9: v_mad_f16 v5, v1, v2, v3 op_sel:[1,0,0,0] ; encoding: [0x05,0x08,0x03,0xd2,0x01,0x05,0x0e,0x04]
294 v_mad_f16 v5, v1, v2, v3 op_sel:[0,1,0,0]
295 // GFX9: v_mad_f16 v5, v1, v2, v3 op_sel:[0,1,0,0] ; encoding: [0x05,0x10,0x03,0xd2,0x01,0x05,0x0e,0x04]
297 v_mad_f16 v5, v1, v2, v3 op_sel:[0,0,1,0]
298 // GFX9: v_mad_f16 v5, v1, v2, v3 op_sel:[0,0,1,0] ; encoding: [0x05,0x20,0x03,0xd2,0x01,0x05,0x0e,0x04]
300 v_mad_f16 v5, v1, v2, v3 op_sel:[0,0,0,1]
301 // GFX9: v_mad_f16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0x03,0xd2,0x01,0x05,0x0e,0x04]
303 v_mad_f16 v5, v1, v2, v3 op_sel:[1,1,1,1]
304 // GFX9: v_mad_f16 v5, v1, v2, v3 op_sel:[1,1,1,1] ; encoding: [0x05,0x78,0x03,0xd2,0x01,0x05,0x0e,0x04]
306 v_mad_f16 v5, v1, v2, v3 clamp
307 // GFX9: v_mad_f16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0x03,0xd2,0x01,0x05,0x0e,0x04]
309 v_mad_i16_e64 v5, 0, v2, v3
310 // GFX9: v_mad_i16 v5, 0, v2, v3 ; encoding: [0x05,0x00,0x05,0xd2,0x80,0x04,0x0e,0x04]
312 v_mad_i16 v5, v1, -1, v3
313 // GFX9: v_mad_i16 v5, v1, -1, v3 ; encoding: [0x05,0x00,0x05,0xd2,0x01,0x83,0x0d,0x04]
315 v_mad_i16 v5, v1, v2, -4.0
316 // GFX9: v_mad_i16 v5, v1, v2, -4.0 ; encoding: [0x05,0x00,0x05,0xd2,0x01,0x05,0xde,0x03]
318 v_mad_i16 v5, v1, v2, v3 clamp
319 // GFX9: v_mad_i16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0x05,0xd2,0x01,0x05,0x0e,0x04]
321 v_mad_i16 v5, v1, v2, v3 op_sel:[0,0,0,1]
322 // GFX9: v_mad_i16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0x05,0xd2,0x01,0x05,0x0e,0x04]
324 v_mad_i16 v5, v1, v2, v3 op_sel:[1,1,1,1]
325 // GFX9: v_mad_i16 v5, v1, v2, v3 op_sel:[1,1,1,1] ; encoding: [0x05,0x78,0x05,0xd2,0x01,0x05,0x0e,0x04]
327 v_mad_legacy_f16_e64 v5, 0.5, v2, v3
328 // GFX9: v_mad_legacy_f16 v5, 0.5, v2, v3 ; encoding: [0x05,0x00,0xea,0xd1,0xf0,0x04,0x0e,0x04]
330 v_mad_legacy_f16 v5, v1, 0.5, v3
331 // GFX9: v_mad_legacy_f16 v5, v1, 0.5, v3 ; encoding: [0x05,0x00,0xea,0xd1,0x01,0xe1,0x0d,0x04]
333 v_mad_legacy_f16 v5, v1, v2, 0.5
334 // GFX9: v_mad_legacy_f16 v5, v1, v2, 0.5 ; encoding: [0x05,0x00,0xea,0xd1,0x01,0x05,0xc2,0x03]
336 v_mad_legacy_f16 v5, v1, -v2, v3
337 // GFX9: v_mad_legacy_f16 v5, v1, -v2, v3 ; encoding: [0x05,0x00,0xea,0xd1,0x01,0x05,0x0e,0x44]
339 v_mad_legacy_f16 v5, v1, |v2|, v3
340 // GFX9: v_mad_legacy_f16 v5, v1, |v2|, v3 ; encoding: [0x05,0x02,0xea,0xd1,0x01,0x05,0x0e,0x04]
342 v_mad_legacy_f16 v5, v1, v2, v3 clamp
343 // GFX9: v_mad_legacy_f16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0xea,0xd1,0x01,0x05,0x0e,0x04]
345 v_mad_legacy_i16_e64 v5, 0, v2, v3
346 // GFX9: v_mad_legacy_i16 v5, 0, v2, v3 ; encoding: [0x05,0x00,0xec,0xd1,0x80,0x04,0x0e,0x04]
348 v_mad_legacy_i16 v5, v1, -1, v3
349 // GFX9: v_mad_legacy_i16 v5, v1, -1, v3 ; encoding: [0x05,0x00,0xec,0xd1,0x01,0x83,0x0d,0x04]
351 v_mad_legacy_i16 v5, v1, v2, -4.0
352 // GFX9: v_mad_legacy_i16 v5, v1, v2, -4.0 ; encoding: [0x05,0x00,0xec,0xd1,0x01,0x05,0xde,0x03]
354 v_mad_legacy_i16 v5, v1, v2, -4.0 clamp
355 // GFX9: v_mad_legacy_i16 v5, v1, v2, -4.0 clamp ; encoding: [0x05,0x80,0xec,0xd1,0x01,0x05,0xde,0x03]
357 v_mad_legacy_u16_e64 v5, 0, v2, v3
358 // GFX9: v_mad_legacy_u16 v5, 0, v2, v3 ; encoding: [0x05,0x00,0xeb,0xd1,0x80,0x04,0x0e,0x04]
360 v_mad_legacy_u16 v5, v1, -1, v3
361 // GFX9: v_mad_legacy_u16 v5, v1, -1, v3 ; encoding: [0x05,0x00,0xeb,0xd1,0x01,0x83,0x0d,0x04]
363 v_mad_legacy_u16 v5, v1, v2, -4.0
364 // GFX9: v_mad_legacy_u16 v5, v1, v2, -4.0 ; encoding: [0x05,0x00,0xeb,0xd1,0x01,0x05,0xde,0x03]
366 v_mad_legacy_u16 v5, v1, v2, -4.0 clamp
367 // GFX9: v_mad_legacy_u16 v5, v1, v2, -4.0 clamp ; encoding: [0x05,0x80,0xeb,0xd1,0x01,0x05,0xde,0x03]
369 v_mad_u16_e64 v5, 0, v2, v3
370 // GFX9: v_mad_u16 v5, 0, v2, v3 ; encoding: [0x05,0x00,0x04,0xd2,0x80,0x04,0x0e,0x04]
372 v_mad_u16 v5, v1, -1, v3
373 // GFX9: v_mad_u16 v5, v1, -1, v3 ; encoding: [0x05,0x00,0x04,0xd2,0x01,0x83,0x0d,0x04]
375 v_mad_u16 v5, v1, v2, -4.0
376 // GFX9: v_mad_u16 v5, v1, v2, -4.0 ; encoding: [0x05,0x00,0x04,0xd2,0x01,0x05,0xde,0x03]
378 v_mad_u16 v5, v1, v2, v3 clamp
379 // GFX9: v_mad_u16 v5, v1, v2, v3 clamp ; encoding: [0x05,0x80,0x04,0xd2,0x01,0x05,0x0e,0x04]
381 v_mad_u16 v5, v1, v2, v3 op_sel:[1,0,0,0]
382 // GFX9: v_mad_u16 v5, v1, v2, v3 op_sel:[1,0,0,0] ; encoding: [0x05,0x08,0x04,0xd2,0x01,0x05,0x0e,0x04]
384 v_mad_u16 v5, v1, v2, v3 op_sel:[0,0,0,1]
385 // GFX9: v_mad_u16 v5, v1, v2, v3 op_sel:[0,0,0,1] ; encoding: [0x05,0x40,0x04,0xd2,0x01,0x05,0x0e,0x04]
387 v_mad_u16 v5, v1, v2, v3 op_sel:[1,1,1,1]
388 // GFX9: v_mad_u16 v5, v1, v2, v3 op_sel:[1,1,1,1] ; encoding: [0x05,0x78,0x04,0xd2,0x01,0x05,0x0e,0x04]
390 v_interp_p2_f16 v5, v2, attr0.x, v3
391 // GFX9: v_interp_p2_f16 v5, v2, attr0.x, v3 ; encoding: [0x05,0x00,0x77,0xd2,0x00,0x04,0x0e,0x04]
393 v_interp_p2_f16 v5, -v2, attr0.x, v3
394 // GFX9: v_interp_p2_f16 v5, -v2, attr0.x, v3 ; encoding: [0x05,0x00,0x77,0xd2,0x00,0x04,0x0e,0x44]
396 v_interp_p2_f16 v5, v2, attr0.x, |v3|
397 // GFX9: v_interp_p2_f16 v5, v2, attr0.x, |v3| ; encoding: [0x05,0x04,0x77,0xd2,0x00,0x04,0x0e,0x04]
399 v_interp_p2_f16 v5, v2, attr0.w, v3
400 // GFX9: v_interp_p2_f16 v5, v2, attr0.w, v3 ; encoding: [0x05,0x00,0x77,0xd2,0xc0,0x04,0x0e,0x04]
402 v_interp_p2_f16 v5, v2, attr0.x, v3 high
403 // GFX9: v_interp_p2_f16 v5, v2, attr0.x, v3 high ; encoding: [0x05,0x00,0x77,0xd2,0x00,0x05,0x0e,0x04]
405 v_interp_p2_f16 v5, v2, attr0.x, v3 clamp
406 // GFX9: v_interp_p2_f16 v5, v2, attr0.x, v3 clamp ; encoding: [0x05,0x80,0x77,0xd2,0x00,0x04,0x0e,0x04]
408 v_interp_p2_legacy_f16 v5, v2, attr31.x, v3
409 // GFX9: v_interp_p2_legacy_f16 v5, v2, attr31.x, v3 ; encoding: [0x05,0x00,0x76,0xd2,0x1f,0x04,0x0e,0x04]
411 v_interp_p2_legacy_f16 v5, -v2, attr0.x, v3
412 // GFX9: v_interp_p2_legacy_f16 v5, -v2, attr0.x, v3 ; encoding: [0x05,0x00,0x76,0xd2,0x00,0x04,0x0e,0x44]
414 v_interp_p2_legacy_f16 v5, v2, attr0.x, |v3|
415 // GFX9: v_interp_p2_legacy_f16 v5, v2, attr0.x, |v3| ; encoding: [0x05,0x04,0x76,0xd2,0x00,0x04,0x0e,0x04]
417 v_interp_p2_legacy_f16 v5, v2, attr0.w, v3
418 // GFX9: v_interp_p2_legacy_f16 v5, v2, attr0.w, v3 ; encoding: [0x05,0x00,0x76,0xd2,0xc0,0x04,0x0e,0x04]
420 v_interp_p2_legacy_f16 v5, v2, attr0.x, v3 high
421 // GFX9: v_interp_p2_legacy_f16 v5, v2, attr0.x, v3 high ; encoding: [0x05,0x00,0x76,0xd2,0x00,0x05,0x0e,0x04]
423 v_interp_p2_legacy_f16 v5, v2, attr0.x, v3 clamp
424 // GFX9: v_interp_p2_legacy_f16 v5, v2, attr0.x, v3 clamp ; encoding: [0x05,0x80,0x76,0xd2,0x00,0x04,0x0e,0x04]
426 v_cvt_norm_i16_f16_e64 v5, -v1
427 // GFX9: v_cvt_norm_i16_f16_e64 v5, -v1 ; encoding: [0x05,0x00,0x8d,0xd1,0x01,0x01,0x00,0x20]
428 // NOVI: error: instruction not supported on this GPU
430 v_cvt_norm_i16_f16_e64 v5, |v1|
431 // GFX9: v_cvt_norm_i16_f16_e64 v5, |v1| ; encoding: [0x05,0x01,0x8d,0xd1,0x01,0x01,0x00,0x00]
432 // NOVI: error: instruction not supported on this GPU
434 v_cvt_norm_u16_f16_e64 v5, -v1
435 // GFX9: v_cvt_norm_u16_f16_e64 v5, -v1 ; encoding: [0x05,0x00,0x8e,0xd1,0x01,0x01,0x00,0x20]
436 // NOVI: error: instruction not supported on this GPU
438 v_cvt_norm_u16_f16_e64 v5, |v1|
439 // GFX9: v_cvt_norm_u16_f16_e64 v5, |v1| ; encoding: [0x05,0x01,0x8e,0xd1,0x01,0x01,0x00,0x00]
440 // NOVI: error: instruction not supported on this GPU
442 v_sat_pk_u8_i16_e64 v5, -1
443 // GFX9: v_sat_pk_u8_i16_e64 v5, -1 ; encoding: [0x05,0x00,0x8f,0xd1,0xc1,0x00,0x00,0x00]
444 // NOVI: error: instruction not supported on this GPU
446 v_sat_pk_u8_i16_e64 v5, v255
447 // GFX9: v_sat_pk_u8_i16_e64 v5, v255 ; encoding: [0x05,0x00,0x8f,0xd1,0xff,0x01,0x00,0x00]
448 // NOVI: error: instruction not supported on this GPU
450 v_screen_partition_4se_b32_e64 v5, v1
451 // GXF9: [0x05,0x00,0x77,0xd1,0x01,0x01,0x00,0x00]
452 // NOVI: error: instruction not supported on this GPU
454 v_screen_partition_4se_b32_e64 v5, -1
455 // GXF9: [0x05,0x00,0x77,0xd1,0xc1,0x00,0x00,0x00]
456 // NOVI: error: instruction not supported on this GPU
458 v_add_u32 v84, v13, s31 clamp
459 // GFX9: v_add_u32_e64 v84, v13, s31 clamp ; encoding: [0x54,0x80,0x34,0xd1,0x0d,0x3f,0x00,0x00]
460 // NOVI: error:
462 v_sub_u32 v84, v13, s31 clamp
463 // GFX9: v_sub_u32_e64 v84, v13, s31 clamp ; encoding: [0x54,0x80,0x35,0xd1,0x0d,0x3f,0x00,0x00]
464 // NOVI: error:
466 v_subrev_u32 v84, v13, s31 clamp
467 // GFX9: v_subrev_u32_e64 v84, v13, s31 clamp ; encoding: [0x54,0x80,0x36,0xd1,0x0d,0x3f,0x00,0x00]
468 // NOVI: error:
470 v_addc_co_u32 v84, s[4:5], v13, v31, vcc clamp
471 // GFX9: v_addc_co_u32_e64 v84, s[4:5], v13, v31, vcc clamp ; encoding: [0x54,0x84,0x1c,0xd1,0x0d,0x3f,0xaa,0x01]
472 // NOVI: error:
474 v_subb_co_u32 v84, s[2:3], v13, v31, vcc clamp
475 // GFX9: v_subb_co_u32_e64 v84, s[2:3], v13, v31, vcc clamp ; encoding: [0x54,0x82,0x1d,0xd1,0x0d,0x3f,0xaa,0x01]
476 // NOVI: error:
478 v_subbrev_co_u32 v84, vcc, v13, v31, s[6:7] clamp
479 // GFX9: v_subbrev_co_u32_e64 v84, vcc, v13, v31, s[6:7] clamp ; encoding: [0x54,0xea,0x1e,0xd1,0x0d,0x3f,0x1a,0x00]
480 // NOVI: error:
482 v_add_co_u32 v84, s[4:5], v13, v31 clamp
483 // GFX9: v_add_co_u32_e64 v84, s[4:5], v13, v31 clamp ; encoding: [0x54,0x84,0x19,0xd1,0x0d,0x3f,0x02,0x00]
484 // NOVI: error:
486 v_sub_co_u32 v84, s[2:3], v13, v31 clamp
487 // GFX9: v_sub_co_u32_e64 v84, s[2:3], v13, v31 clamp ; encoding: [0x54,0x82,0x1a,0xd1,0x0d,0x3f,0x02,0x00]
488 // NOVI: error:
490 v_subrev_co_u32 v84, vcc, v13, v31 clamp
491 // GFX9: v_subrev_co_u32_e64 v84, vcc, v13, v31 clamp ; encoding: [0x54,0xea,0x1b,0xd1,0x0d,0x3f,0x02,0x00]
492 // NOVI: error:
494 v_addc_co_u32 v84, vcc, v13, v31, vcc
495 // GFX9: v_addc_co_u32_e32 v84, vcc, v13, v31, vcc ; encoding: [0x0d,0x3f,0xa8,0x38]
496 // NOVI: error: instruction not supported on this GPU
498 v_subb_co_u32 v84, vcc, v13, v31, vcc
499 // GFX9: v_subb_co_u32_e32 v84, vcc, v13, v31, vcc ; encoding: [0x0d,0x3f,0xa8,0x3a]
500 // NOVI: error: instruction not supported on this GPU
502 v_subbrev_co_u32 v84, vcc, v13, v31, vcc
503 // GFX9: v_subbrev_co_u32_e32 v84, vcc, v13, v31, vcc ; encoding: [0x0d,0x3f,0xa8,0x3c]
504 // NOVI: error: instruction not supported on this GPU
506 v_add_co_u32 v84, vcc, v13, v31
507 // GFX9: v_add_co_u32_e32 v84, vcc, v13, v31 ; encoding: [0x0d,0x3f,0xa8,0x32]
508 // NOVI: error: instruction not supported on this GPU
510 v_sub_co_u32 v84, vcc, v13, v31
511 // GFX9: v_sub_co_u32_e32 v84, vcc, v13, v31 ; encoding: [0x0d,0x3f,0xa8,0x34]
512 // NOVI: error: instruction not supported on this GPU
514 v_subrev_co_u32 v84, vcc, v13, v31
515 // GFX9: v_subrev_co_u32_e32 v84, vcc, v13, v31 ; encoding: [0x0d,0x3f,0xa8,0x36]
516 // NOVI: error: instruction not supported on this GPU
518 //===----------------------------------------------------------------------===//
519 // Validate register size checks (bug 37943)
520 //===----------------------------------------------------------------------===//
522 // NOVI: error: invalid operand for instruction
523 // NOGFX9: error: invalid operand for instruction
524 v_add_f64 v[0:1], s0, v[0:1]
526 // NOVI: error: invalid operand for instruction
527 // NOGFX9: error: invalid operand for instruction
528 v_add_f64 v[0:1], s[0:3], v[0:1]
530 // NOVI: error: invalid operand for instruction
531 // NOGFX9: error: invalid operand for instruction
532 v_add_f64 v[0:1], v0, v[0:1]
534 // NOVI: error: invalid operand for instruction
535 // NOGFX9: error: invalid operand for instruction
536 v_add_f64 v[0:1], v[0:2], v[0:1]
538 // NOVI: error: invalid operand for instruction
539 // NOGFX9: error: invalid operand for instruction
540 v_add_f64 v[0:1], v[0:3], v[0:1]
542 // NOVI: error: invalid operand for instruction
543 // NOGFX9: error: invalid operand for instruction
544 v_add_f64 v[0:1], v[0:1], v0
546 // NOVI: error: invalid operand for instruction
547 // NOGFX9: error: invalid operand for instruction
548 v_add_f64 v[0:1], v[0:1], s0
550 // NOVI: error: invalid operand for instruction
551 // NOGFX9: error: invalid operand for instruction
552 v_add_f32 v0, s[0:1], v0
554 // NOVI: error: invalid operand for instruction
555 // NOGFX9: error: invalid operand for instruction
556 v_add_f32 v0, v[0:1], v0
558 // NOVI: error: invalid operand for instruction
559 // NOGFX9: error: invalid operand for instruction
560 v_add_f32 v0, v0, s[0:1]
562 // NOVI: error: invalid operand for instruction
563 // NOGFX9: error: invalid operand for instruction
564 v_add_f32 v0, v0, v[0:1]
566 // NOVI: error: invalid operand for instruction
567 // NOGFX9: error: invalid operand for instruction
568 v_add_f16 v0, s[0:1], v0
570 // NOVI: error: invalid operand for instruction
571 // NOGFX9: error: invalid operand for instruction
572 v_add_f16 v0, v[0:1], v0
574 // NOVI: error: invalid operand for instruction
575 // NOGFX9: error: invalid operand for instruction
576 v_add_f16 v0, v0, s[0:1]
578 // NOVI: error: invalid operand for instruction
579 // NOGFX9: error: invalid operand for instruction
580 v_add_f16 v0, v0, v[0:1]
582 // NOVI: error: invalid operand for instruction
583 // NOGFX9: error: invalid operand for instruction
584 v_add_u16 v0, s[0:1], v0
586 // NOVI: error: invalid operand for instruction
587 // NOGFX9: error: invalid operand for instruction
588 v_add_u16 v0, v[0:1], v0
590 // NOVI: error: invalid operand for instruction
591 // NOGFX9: error: invalid operand for instruction
592 v_add_u16 v0, v0, s[0:1]
594 // NOVI: error: invalid operand for instruction
595 // NOGFX9: error: invalid operand for instruction
596 v_add_u16 v0, v0, v[0:1]