1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=tahiti -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=SI %s
3 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=fiji -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=VI %s
4 # RUN: llc -mtriple=amdgcn-mesa-mesa3d -mcpu=gfx900 -run-pass=legalizer -global-isel-abort=0 %s -o - | FileCheck -check-prefix=GFX9 %s
12 ; SI-LABEL: name: test_fneg_s32
13 ; SI: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
14 ; SI: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[COPY]]
15 ; SI: $vgpr0 = COPY [[FNEG]](s32)
16 ; VI-LABEL: name: test_fneg_s32
17 ; VI: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
18 ; VI: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[COPY]]
19 ; VI: $vgpr0 = COPY [[FNEG]](s32)
20 ; GFX9-LABEL: name: test_fneg_s32
21 ; GFX9: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
22 ; GFX9: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[COPY]]
23 ; GFX9: $vgpr0 = COPY [[FNEG]](s32)
24 %0:_(s32) = COPY $vgpr0
34 ; SI-LABEL: name: test_fneg_s64
35 ; SI: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
36 ; SI: [[FNEG:%[0-9]+]]:_(s64) = G_FNEG [[COPY]]
37 ; SI: $vgpr0_vgpr1 = COPY [[FNEG]](s64)
38 ; VI-LABEL: name: test_fneg_s64
39 ; VI: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
40 ; VI: [[FNEG:%[0-9]+]]:_(s64) = G_FNEG [[COPY]]
41 ; VI: $vgpr0_vgpr1 = COPY [[FNEG]](s64)
42 ; GFX9-LABEL: name: test_fneg_s64
43 ; GFX9: [[COPY:%[0-9]+]]:_(s64) = COPY $vgpr0_vgpr1
44 ; GFX9: [[FNEG:%[0-9]+]]:_(s64) = G_FNEG [[COPY]]
45 ; GFX9: $vgpr0_vgpr1 = COPY [[FNEG]](s64)
46 %0:_(s64) = COPY $vgpr0_vgpr1
48 $vgpr0_vgpr1 = COPY %1
56 ; SI-LABEL: name: test_fneg_s16
57 ; SI: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
58 ; SI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
59 ; SI: [[FNEG:%[0-9]+]]:_(s16) = G_FNEG [[TRUNC]]
60 ; SI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FNEG]](s16)
61 ; SI: $vgpr0 = COPY [[ANYEXT]](s32)
62 ; VI-LABEL: name: test_fneg_s16
63 ; VI: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
64 ; VI: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
65 ; VI: [[FNEG:%[0-9]+]]:_(s16) = G_FNEG [[TRUNC]]
66 ; VI: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FNEG]](s16)
67 ; VI: $vgpr0 = COPY [[ANYEXT]](s32)
68 ; GFX9-LABEL: name: test_fneg_s16
69 ; GFX9: [[COPY:%[0-9]+]]:_(s32) = COPY $vgpr0
70 ; GFX9: [[TRUNC:%[0-9]+]]:_(s16) = G_TRUNC [[COPY]](s32)
71 ; GFX9: [[FNEG:%[0-9]+]]:_(s16) = G_FNEG [[TRUNC]]
72 ; GFX9: [[ANYEXT:%[0-9]+]]:_(s32) = G_ANYEXT [[FNEG]](s16)
73 ; GFX9: $vgpr0 = COPY [[ANYEXT]](s32)
74 %0:_(s32) = COPY $vgpr0
75 %1:_(s16) = G_TRUNC %0
77 %3:_(s32) = G_ANYEXT %2
87 ; SI-LABEL: name: test_fneg_v2s32
88 ; SI: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
89 ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
90 ; SI: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[UV]]
91 ; SI: [[FNEG1:%[0-9]+]]:_(s32) = G_FNEG [[UV1]]
92 ; SI: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[FNEG]](s32), [[FNEG1]](s32)
93 ; SI: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
94 ; VI-LABEL: name: test_fneg_v2s32
95 ; VI: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
96 ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
97 ; VI: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[UV]]
98 ; VI: [[FNEG1:%[0-9]+]]:_(s32) = G_FNEG [[UV1]]
99 ; VI: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[FNEG]](s32), [[FNEG1]](s32)
100 ; VI: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
101 ; GFX9-LABEL: name: test_fneg_v2s32
102 ; GFX9: [[COPY:%[0-9]+]]:_(<2 x s32>) = COPY $vgpr0_vgpr1
103 ; GFX9: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<2 x s32>)
104 ; GFX9: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[UV]]
105 ; GFX9: [[FNEG1:%[0-9]+]]:_(s32) = G_FNEG [[UV1]]
106 ; GFX9: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s32>) = G_BUILD_VECTOR [[FNEG]](s32), [[FNEG1]](s32)
107 ; GFX9: $vgpr0_vgpr1 = COPY [[BUILD_VECTOR]](<2 x s32>)
108 %0:_(<2 x s32>) = COPY $vgpr0_vgpr1
109 %1:_(<2 x s32>) = G_FNEG %0
110 $vgpr0_vgpr1 = COPY %1
114 name: test_fneg_v3s32
117 liveins: $vgpr0_vgpr1_vgpr2
119 ; SI-LABEL: name: test_fneg_v3s32
120 ; SI: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
121 ; SI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
122 ; SI: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[UV]]
123 ; SI: [[FNEG1:%[0-9]+]]:_(s32) = G_FNEG [[UV1]]
124 ; SI: [[FNEG2:%[0-9]+]]:_(s32) = G_FNEG [[UV2]]
125 ; SI: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[FNEG]](s32), [[FNEG1]](s32), [[FNEG2]](s32)
126 ; SI: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
127 ; VI-LABEL: name: test_fneg_v3s32
128 ; VI: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
129 ; VI: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
130 ; VI: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[UV]]
131 ; VI: [[FNEG1:%[0-9]+]]:_(s32) = G_FNEG [[UV1]]
132 ; VI: [[FNEG2:%[0-9]+]]:_(s32) = G_FNEG [[UV2]]
133 ; VI: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[FNEG]](s32), [[FNEG1]](s32), [[FNEG2]](s32)
134 ; VI: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
135 ; GFX9-LABEL: name: test_fneg_v3s32
136 ; GFX9: [[COPY:%[0-9]+]]:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
137 ; GFX9: [[UV:%[0-9]+]]:_(s32), [[UV1:%[0-9]+]]:_(s32), [[UV2:%[0-9]+]]:_(s32) = G_UNMERGE_VALUES [[COPY]](<3 x s32>)
138 ; GFX9: [[FNEG:%[0-9]+]]:_(s32) = G_FNEG [[UV]]
139 ; GFX9: [[FNEG1:%[0-9]+]]:_(s32) = G_FNEG [[UV1]]
140 ; GFX9: [[FNEG2:%[0-9]+]]:_(s32) = G_FNEG [[UV2]]
141 ; GFX9: [[BUILD_VECTOR:%[0-9]+]]:_(<3 x s32>) = G_BUILD_VECTOR [[FNEG]](s32), [[FNEG1]](s32), [[FNEG2]](s32)
142 ; GFX9: $vgpr0_vgpr1_vgpr2 = COPY [[BUILD_VECTOR]](<3 x s32>)
143 %0:_(<3 x s32>) = COPY $vgpr0_vgpr1_vgpr2
144 %1:_(<3 x s32>) = G_FNEG %0
145 $vgpr0_vgpr1_vgpr2 = COPY %1
149 name: test_fneg_v2s64
152 liveins: $vgpr0_vgpr1_vgpr2_vgpr3
154 ; SI-LABEL: name: test_fneg_v2s64
155 ; SI: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
156 ; SI: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
157 ; SI: [[FNEG:%[0-9]+]]:_(s64) = G_FNEG [[UV]]
158 ; SI: [[FNEG1:%[0-9]+]]:_(s64) = G_FNEG [[UV1]]
159 ; SI: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[FNEG]](s64), [[FNEG1]](s64)
160 ; SI: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>)
161 ; VI-LABEL: name: test_fneg_v2s64
162 ; VI: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
163 ; VI: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
164 ; VI: [[FNEG:%[0-9]+]]:_(s64) = G_FNEG [[UV]]
165 ; VI: [[FNEG1:%[0-9]+]]:_(s64) = G_FNEG [[UV1]]
166 ; VI: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[FNEG]](s64), [[FNEG1]](s64)
167 ; VI: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>)
168 ; GFX9-LABEL: name: test_fneg_v2s64
169 ; GFX9: [[COPY:%[0-9]+]]:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
170 ; GFX9: [[UV:%[0-9]+]]:_(s64), [[UV1:%[0-9]+]]:_(s64) = G_UNMERGE_VALUES [[COPY]](<2 x s64>)
171 ; GFX9: [[FNEG:%[0-9]+]]:_(s64) = G_FNEG [[UV]]
172 ; GFX9: [[FNEG1:%[0-9]+]]:_(s64) = G_FNEG [[UV1]]
173 ; GFX9: [[BUILD_VECTOR:%[0-9]+]]:_(<2 x s64>) = G_BUILD_VECTOR [[FNEG]](s64), [[FNEG1]](s64)
174 ; GFX9: $vgpr0_vgpr1_vgpr2_vgpr3 = COPY [[BUILD_VECTOR]](<2 x s64>)
175 %0:_(<2 x s64>) = COPY $vgpr0_vgpr1_vgpr2_vgpr3
176 %1:_(<2 x s64>) = G_FNEG %0
177 $vgpr0_vgpr1_vgpr2_vgpr3 = COPY %1
181 name: test_fneg_v2s16
186 ; SI-LABEL: name: test_fneg_v2s16
187 ; SI: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
188 ; SI: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[COPY]]
189 ; SI: $vgpr0 = COPY [[FNEG]](<2 x s16>)
190 ; VI-LABEL: name: test_fneg_v2s16
191 ; VI: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
192 ; VI: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[COPY]]
193 ; VI: $vgpr0 = COPY [[FNEG]](<2 x s16>)
194 ; GFX9-LABEL: name: test_fneg_v2s16
195 ; GFX9: [[COPY:%[0-9]+]]:_(<2 x s16>) = COPY $vgpr0
196 ; GFX9: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[COPY]]
197 ; GFX9: $vgpr0 = COPY [[FNEG]](<2 x s16>)
198 %0:_(<2 x s16>) = COPY $vgpr0
199 %1:_(<2 x s16>) = G_FNEG %0
204 name: test_fneg_v3s16
208 ; SI-LABEL: name: test_fneg_v3s16
209 ; SI: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
210 ; SI: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 0
211 ; SI: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
212 ; SI: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF1]](<4 x s16>), 0
213 ; SI: [[DEF2:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
214 ; SI: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF2]], [[EXTRACT]](<3 x s16>), 0
215 ; SI: [[EXTRACT2:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[INSERT]](<4 x s16>), 0
216 ; SI: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[EXTRACT2]]
217 ; SI: [[DEF3:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
218 ; SI: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF3]], [[EXTRACT1]](<3 x s16>), 0
219 ; SI: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT1]], [[FNEG]](<2 x s16>), 0
220 ; SI: [[EXTRACT3:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT2]](<4 x s16>), 0
221 ; SI: [[DEF4:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
222 ; SI: [[INSERT3:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF4]], [[EXTRACT]](<3 x s16>), 0
223 ; SI: [[EXTRACT4:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT3]](<4 x s16>), 32
224 ; SI: [[FNEG1:%[0-9]+]]:_(s16) = G_FNEG [[EXTRACT4]]
225 ; SI: [[DEF5:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
226 ; SI: [[INSERT4:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF5]], [[EXTRACT3]](<3 x s16>), 0
227 ; SI: [[INSERT5:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT4]], [[FNEG1]](s16), 32
228 ; SI: [[EXTRACT5:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT5]](<4 x s16>), 0
229 ; SI: S_NOP 0, implicit [[EXTRACT5]](<3 x s16>)
230 ; VI-LABEL: name: test_fneg_v3s16
231 ; VI: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
232 ; VI: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 0
233 ; VI: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
234 ; VI: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF1]](<4 x s16>), 0
235 ; VI: [[DEF2:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
236 ; VI: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF2]], [[EXTRACT]](<3 x s16>), 0
237 ; VI: [[EXTRACT2:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[INSERT]](<4 x s16>), 0
238 ; VI: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[EXTRACT2]]
239 ; VI: [[DEF3:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
240 ; VI: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF3]], [[EXTRACT1]](<3 x s16>), 0
241 ; VI: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT1]], [[FNEG]](<2 x s16>), 0
242 ; VI: [[EXTRACT3:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT2]](<4 x s16>), 0
243 ; VI: [[DEF4:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
244 ; VI: [[INSERT3:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF4]], [[EXTRACT]](<3 x s16>), 0
245 ; VI: [[EXTRACT4:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT3]](<4 x s16>), 32
246 ; VI: [[FNEG1:%[0-9]+]]:_(s16) = G_FNEG [[EXTRACT4]]
247 ; VI: [[DEF5:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
248 ; VI: [[INSERT4:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF5]], [[EXTRACT3]](<3 x s16>), 0
249 ; VI: [[INSERT5:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT4]], [[FNEG1]](s16), 32
250 ; VI: [[EXTRACT5:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT5]](<4 x s16>), 0
251 ; VI: S_NOP 0, implicit [[EXTRACT5]](<3 x s16>)
252 ; GFX9-LABEL: name: test_fneg_v3s16
253 ; GFX9: [[DEF:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
254 ; GFX9: [[EXTRACT:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF]](<4 x s16>), 0
255 ; GFX9: [[DEF1:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
256 ; GFX9: [[EXTRACT1:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[DEF1]](<4 x s16>), 0
257 ; GFX9: [[DEF2:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
258 ; GFX9: [[INSERT:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF2]], [[EXTRACT]](<3 x s16>), 0
259 ; GFX9: [[EXTRACT2:%[0-9]+]]:_(<2 x s16>) = G_EXTRACT [[INSERT]](<4 x s16>), 0
260 ; GFX9: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[EXTRACT2]]
261 ; GFX9: [[DEF3:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
262 ; GFX9: [[INSERT1:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF3]], [[EXTRACT1]](<3 x s16>), 0
263 ; GFX9: [[INSERT2:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT1]], [[FNEG]](<2 x s16>), 0
264 ; GFX9: [[EXTRACT3:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT2]](<4 x s16>), 0
265 ; GFX9: [[DEF4:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
266 ; GFX9: [[INSERT3:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF4]], [[EXTRACT]](<3 x s16>), 0
267 ; GFX9: [[EXTRACT4:%[0-9]+]]:_(s16) = G_EXTRACT [[INSERT3]](<4 x s16>), 32
268 ; GFX9: [[FNEG1:%[0-9]+]]:_(s16) = G_FNEG [[EXTRACT4]]
269 ; GFX9: [[DEF5:%[0-9]+]]:_(<4 x s16>) = G_IMPLICIT_DEF
270 ; GFX9: [[INSERT4:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[DEF5]], [[EXTRACT3]](<3 x s16>), 0
271 ; GFX9: [[INSERT5:%[0-9]+]]:_(<4 x s16>) = G_INSERT [[INSERT4]], [[FNEG1]](s16), 32
272 ; GFX9: [[EXTRACT5:%[0-9]+]]:_(<3 x s16>) = G_EXTRACT [[INSERT5]](<4 x s16>), 0
273 ; GFX9: S_NOP 0, implicit [[EXTRACT5]](<3 x s16>)
274 %0:_(<3 x s16>) = G_IMPLICIT_DEF
275 %1:_(<3 x s16>) = G_FNEG %0
280 name: test_fneg_v4s16
283 liveins: $vgpr0_vgpr1
285 ; SI-LABEL: name: test_fneg_v4s16
286 ; SI: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
287 ; SI: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
288 ; SI: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[UV]]
289 ; SI: [[FNEG1:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[UV1]]
290 ; SI: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[FNEG]](<2 x s16>), [[FNEG1]](<2 x s16>)
291 ; SI: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
292 ; VI-LABEL: name: test_fneg_v4s16
293 ; VI: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
294 ; VI: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
295 ; VI: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[UV]]
296 ; VI: [[FNEG1:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[UV1]]
297 ; VI: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[FNEG]](<2 x s16>), [[FNEG1]](<2 x s16>)
298 ; VI: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
299 ; GFX9-LABEL: name: test_fneg_v4s16
300 ; GFX9: [[COPY:%[0-9]+]]:_(<4 x s16>) = COPY $vgpr0_vgpr1
301 ; GFX9: [[UV:%[0-9]+]]:_(<2 x s16>), [[UV1:%[0-9]+]]:_(<2 x s16>) = G_UNMERGE_VALUES [[COPY]](<4 x s16>)
302 ; GFX9: [[FNEG:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[UV]]
303 ; GFX9: [[FNEG1:%[0-9]+]]:_(<2 x s16>) = G_FNEG [[UV1]]
304 ; GFX9: [[CONCAT_VECTORS:%[0-9]+]]:_(<4 x s16>) = G_CONCAT_VECTORS [[FNEG]](<2 x s16>), [[FNEG1]](<2 x s16>)
305 ; GFX9: $vgpr0_vgpr1 = COPY [[CONCAT_VECTORS]](<4 x s16>)
306 %0:_(<4 x s16>) = COPY $vgpr0_vgpr1
307 %1:_(<4 x s16>) = G_FNEG %0
308 $vgpr0_vgpr1 = COPY %1