1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
2 ; RUN: llc -mtriple=amdgcn-amd-amdhsa -mcpu=gfx90a %s -o - | FileCheck %s
4 define void @scalar(double %num, ptr addrspace(1) %p) {
6 ; CHECK: ; %bb.0: ; %entry
7 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
8 ; CHECK-NEXT: v_cvt_f32_f64_e64 v6, |v[0:1]|
9 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v6
10 ; CHECK-NEXT: v_and_b32_e32 v7, 1, v6
11 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[0:1]|, v[4:5]
12 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[0:1]|, v[4:5]
13 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v7
14 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[6:7]
15 ; CHECK-NEXT: v_add_u32_e32 v4, v6, v4
16 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
17 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v6, vcc
18 ; CHECK-NEXT: s_brev_b32 s4, 1
19 ; CHECK-NEXT: v_and_or_b32 v5, v1, s4, v4
20 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
21 ; CHECK-NEXT: s_movk_i32 s4, 0x7fff
22 ; CHECK-NEXT: v_add3_u32 v4, v4, v5, s4
23 ; CHECK-NEXT: v_or_b32_e32 v5, 0x400000, v5
24 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[0:1]
25 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v4, v5, vcc
26 ; CHECK-NEXT: global_store_short_d16_hi v[2:3], v0, off
27 ; CHECK-NEXT: s_waitcnt vmcnt(0)
28 ; CHECK-NEXT: s_setpc_b64 s[30:31]
30 %conv = fptrunc double %num to bfloat
31 store bfloat %conv, ptr addrspace(1) %p, align 8
35 define void @v2(<2 x double> %num, ptr addrspace(1) %p) {
37 ; CHECK: ; %bb.0: ; %entry
38 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
39 ; CHECK-NEXT: v_cvt_f32_f64_e64 v8, |v[0:1]|
40 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[6:7], v8
41 ; CHECK-NEXT: v_and_b32_e32 v9, 1, v8
42 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[0:1]|, v[6:7]
43 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[0:1]|, v[6:7]
44 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v9
45 ; CHECK-NEXT: v_cndmask_b32_e64 v6, -1, 1, s[6:7]
46 ; CHECK-NEXT: v_add_u32_e32 v6, v8, v6
47 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
48 ; CHECK-NEXT: v_cndmask_b32_e32 v6, v6, v8, vcc
49 ; CHECK-NEXT: s_brev_b32 s8, 1
50 ; CHECK-NEXT: v_and_or_b32 v7, v1, s8, v6
51 ; CHECK-NEXT: v_bfe_u32 v6, v6, 16, 1
52 ; CHECK-NEXT: s_movk_i32 s9, 0x7fff
53 ; CHECK-NEXT: v_add3_u32 v6, v6, v7, s9
54 ; CHECK-NEXT: v_or_b32_e32 v7, 0x400000, v7
55 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[0:1]
56 ; CHECK-NEXT: v_cndmask_b32_e32 v6, v6, v7, vcc
57 ; CHECK-NEXT: v_cvt_f32_f64_e64 v7, |v[2:3]|
58 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v7
59 ; CHECK-NEXT: v_and_b32_e32 v8, 1, v7
60 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[2:3]|, v[0:1]
61 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[2:3]|, v[0:1]
62 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v8
63 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[6:7]
64 ; CHECK-NEXT: v_add_u32_e32 v0, v7, v0
65 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
66 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v7, vcc
67 ; CHECK-NEXT: v_and_or_b32 v1, v3, s8, v0
68 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
69 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s9
70 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
71 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[2:3], v[2:3]
72 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
73 ; CHECK-NEXT: s_mov_b32 s4, 0x7060302
74 ; CHECK-NEXT: v_perm_b32 v0, v0, v6, s4
75 ; CHECK-NEXT: global_store_dword v[4:5], v0, off
76 ; CHECK-NEXT: s_waitcnt vmcnt(0)
77 ; CHECK-NEXT: s_setpc_b64 s[30:31]
79 %conv = fptrunc <2 x double> %num to <2 x bfloat>
80 store <2 x bfloat> %conv, ptr addrspace(1) %p, align 8
84 define void @v3(<3 x double> %num, ptr addrspace(1) %p) {
86 ; CHECK: ; %bb.0: ; %entry
87 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
88 ; CHECK-NEXT: v_cvt_f32_f64_e64 v10, |v[0:1]|
89 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[8:9], v10
90 ; CHECK-NEXT: v_and_b32_e32 v11, 1, v10
91 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[0:1]|, v[8:9]
92 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[0:1]|, v[8:9]
93 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v11
94 ; CHECK-NEXT: v_cndmask_b32_e64 v8, -1, 1, s[6:7]
95 ; CHECK-NEXT: v_add_u32_e32 v8, v10, v8
96 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
97 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v10, vcc
98 ; CHECK-NEXT: s_brev_b32 s8, 1
99 ; CHECK-NEXT: v_and_or_b32 v9, v1, s8, v8
100 ; CHECK-NEXT: v_bfe_u32 v8, v8, 16, 1
101 ; CHECK-NEXT: s_movk_i32 s9, 0x7fff
102 ; CHECK-NEXT: v_add3_u32 v8, v8, v9, s9
103 ; CHECK-NEXT: v_or_b32_e32 v9, 0x400000, v9
104 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[0:1]
105 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v9, vcc
106 ; CHECK-NEXT: v_cvt_f32_f64_e64 v9, |v[2:3]|
107 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v9
108 ; CHECK-NEXT: v_and_b32_e32 v10, 1, v9
109 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[2:3]|, v[0:1]
110 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[2:3]|, v[0:1]
111 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v10
112 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[6:7]
113 ; CHECK-NEXT: v_add_u32_e32 v0, v9, v0
114 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
115 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v9, vcc
116 ; CHECK-NEXT: v_and_or_b32 v1, v3, s8, v0
117 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
118 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s9
119 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
120 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[2:3], v[2:3]
121 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
122 ; CHECK-NEXT: s_mov_b32 s4, 0x7060302
123 ; CHECK-NEXT: v_cvt_f32_f64_e64 v3, |v[4:5]|
124 ; CHECK-NEXT: v_perm_b32 v2, v0, v8, s4
125 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v3
126 ; CHECK-NEXT: v_and_b32_e32 v8, 1, v3
127 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[4:5]|, v[0:1]
128 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[4:5]|, v[0:1]
129 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v8
130 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[6:7]
131 ; CHECK-NEXT: v_add_u32_e32 v0, v3, v0
132 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
133 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v3, vcc
134 ; CHECK-NEXT: v_and_or_b32 v1, v5, s8, v0
135 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
136 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s9
137 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
138 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[4:5], v[4:5]
139 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
140 ; CHECK-NEXT: global_store_short_d16_hi v[6:7], v0, off offset:4
141 ; CHECK-NEXT: global_store_dword v[6:7], v2, off
142 ; CHECK-NEXT: s_waitcnt vmcnt(0)
143 ; CHECK-NEXT: s_setpc_b64 s[30:31]
145 %conv = fptrunc <3 x double> %num to <3 x bfloat>
146 store <3 x bfloat> %conv, ptr addrspace(1) %p, align 8
150 define void @v4(<4 x double> %num, ptr addrspace(1) %p) {
152 ; CHECK: ; %bb.0: ; %entry
153 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
154 ; CHECK-NEXT: v_cvt_f32_f64_e64 v12, |v[4:5]|
155 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[10:11], v12
156 ; CHECK-NEXT: v_and_b32_e32 v13, 1, v12
157 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[4:5]|, v[10:11]
158 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[4:5]|, v[10:11]
159 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v13
160 ; CHECK-NEXT: v_cndmask_b32_e64 v10, -1, 1, s[6:7]
161 ; CHECK-NEXT: v_add_u32_e32 v10, v12, v10
162 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
163 ; CHECK-NEXT: v_cndmask_b32_e32 v10, v10, v12, vcc
164 ; CHECK-NEXT: s_brev_b32 s8, 1
165 ; CHECK-NEXT: v_and_or_b32 v11, v5, s8, v10
166 ; CHECK-NEXT: v_bfe_u32 v10, v10, 16, 1
167 ; CHECK-NEXT: s_movk_i32 s9, 0x7fff
168 ; CHECK-NEXT: v_add3_u32 v10, v10, v11, s9
169 ; CHECK-NEXT: v_or_b32_e32 v11, 0x400000, v11
170 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[4:5], v[4:5]
171 ; CHECK-NEXT: v_cndmask_b32_e32 v10, v10, v11, vcc
172 ; CHECK-NEXT: v_cvt_f32_f64_e64 v11, |v[6:7]|
173 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v11
174 ; CHECK-NEXT: v_and_b32_e32 v12, 1, v11
175 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[6:7]|, v[4:5]
176 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[6:7]|, v[4:5]
177 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v12
178 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[6:7]
179 ; CHECK-NEXT: v_add_u32_e32 v4, v11, v4
180 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
181 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v11, vcc
182 ; CHECK-NEXT: v_and_or_b32 v5, v7, s8, v4
183 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
184 ; CHECK-NEXT: v_add3_u32 v4, v4, v5, s9
185 ; CHECK-NEXT: v_or_b32_e32 v5, 0x400000, v5
186 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[6:7], v[6:7]
187 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v5, vcc
188 ; CHECK-NEXT: s_mov_b32 s10, 0x7060302
189 ; CHECK-NEXT: v_perm_b32 v5, v4, v10, s10
190 ; CHECK-NEXT: v_cvt_f32_f64_e64 v4, |v[0:1]|
191 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[6:7], v4
192 ; CHECK-NEXT: v_and_b32_e32 v10, 1, v4
193 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[0:1]|, v[6:7]
194 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[0:1]|, v[6:7]
195 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v10
196 ; CHECK-NEXT: v_cndmask_b32_e64 v6, -1, 1, s[6:7]
197 ; CHECK-NEXT: v_add_u32_e32 v6, v4, v6
198 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
199 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v6, v4, vcc
200 ; CHECK-NEXT: v_and_or_b32 v6, v1, s8, v4
201 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
202 ; CHECK-NEXT: v_add3_u32 v4, v4, v6, s9
203 ; CHECK-NEXT: v_or_b32_e32 v6, 0x400000, v6
204 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[0:1]
205 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v6, vcc
206 ; CHECK-NEXT: v_cvt_f32_f64_e64 v6, |v[2:3]|
207 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v6
208 ; CHECK-NEXT: v_and_b32_e32 v7, 1, v6
209 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[2:3]|, v[0:1]
210 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[2:3]|, v[0:1]
211 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v7
212 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[6:7]
213 ; CHECK-NEXT: v_add_u32_e32 v0, v6, v0
214 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
215 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v6, vcc
216 ; CHECK-NEXT: v_and_or_b32 v1, v3, s8, v0
217 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
218 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s9
219 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
220 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[2:3], v[2:3]
221 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
222 ; CHECK-NEXT: v_perm_b32 v4, v0, v4, s10
223 ; CHECK-NEXT: global_store_dwordx2 v[8:9], v[4:5], off
224 ; CHECK-NEXT: s_waitcnt vmcnt(0)
225 ; CHECK-NEXT: s_setpc_b64 s[30:31]
227 %conv = fptrunc <4 x double> %num to <4 x bfloat>
228 store <4 x bfloat> %conv, ptr addrspace(1) %p, align 8
232 define void @v8(<8 x double> %num, ptr addrspace(1) %p) {
234 ; CHECK: ; %bb.0: ; %entry
235 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
236 ; CHECK-NEXT: v_cvt_f32_f64_e64 v20, |v[12:13]|
237 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[18:19], v20
238 ; CHECK-NEXT: v_and_b32_e32 v21, 1, v20
239 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[12:13]|, v[18:19]
240 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[12:13]|, v[18:19]
241 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v21
242 ; CHECK-NEXT: v_cndmask_b32_e64 v18, -1, 1, s[6:7]
243 ; CHECK-NEXT: v_add_u32_e32 v18, v20, v18
244 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
245 ; CHECK-NEXT: v_cndmask_b32_e32 v18, v18, v20, vcc
246 ; CHECK-NEXT: s_brev_b32 s8, 1
247 ; CHECK-NEXT: v_and_or_b32 v19, v13, s8, v18
248 ; CHECK-NEXT: v_bfe_u32 v18, v18, 16, 1
249 ; CHECK-NEXT: s_movk_i32 s9, 0x7fff
250 ; CHECK-NEXT: v_add3_u32 v18, v18, v19, s9
251 ; CHECK-NEXT: v_or_b32_e32 v19, 0x400000, v19
252 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[12:13], v[12:13]
253 ; CHECK-NEXT: v_cndmask_b32_e32 v18, v18, v19, vcc
254 ; CHECK-NEXT: v_cvt_f32_f64_e64 v19, |v[14:15]|
255 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[12:13], v19
256 ; CHECK-NEXT: v_and_b32_e32 v20, 1, v19
257 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[14:15]|, v[12:13]
258 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[14:15]|, v[12:13]
259 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v20
260 ; CHECK-NEXT: v_cndmask_b32_e64 v12, -1, 1, s[6:7]
261 ; CHECK-NEXT: v_add_u32_e32 v12, v19, v12
262 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
263 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v12, v19, vcc
264 ; CHECK-NEXT: v_and_or_b32 v13, v15, s8, v12
265 ; CHECK-NEXT: v_bfe_u32 v12, v12, 16, 1
266 ; CHECK-NEXT: v_add3_u32 v12, v12, v13, s9
267 ; CHECK-NEXT: v_or_b32_e32 v13, 0x400000, v13
268 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[14:15], v[14:15]
269 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v12, v13, vcc
270 ; CHECK-NEXT: s_mov_b32 s10, 0x7060302
271 ; CHECK-NEXT: v_perm_b32 v13, v12, v18, s10
272 ; CHECK-NEXT: v_cvt_f32_f64_e64 v12, |v[8:9]|
273 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[14:15], v12
274 ; CHECK-NEXT: v_and_b32_e32 v18, 1, v12
275 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[8:9]|, v[14:15]
276 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[8:9]|, v[14:15]
277 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v18
278 ; CHECK-NEXT: v_cndmask_b32_e64 v14, -1, 1, s[6:7]
279 ; CHECK-NEXT: v_add_u32_e32 v14, v12, v14
280 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
281 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v14, v12, vcc
282 ; CHECK-NEXT: v_and_or_b32 v14, v9, s8, v12
283 ; CHECK-NEXT: v_bfe_u32 v12, v12, 16, 1
284 ; CHECK-NEXT: v_add3_u32 v12, v12, v14, s9
285 ; CHECK-NEXT: v_or_b32_e32 v14, 0x400000, v14
286 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[8:9], v[8:9]
287 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v12, v14, vcc
288 ; CHECK-NEXT: v_cvt_f32_f64_e64 v14, |v[10:11]|
289 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[8:9], v14
290 ; CHECK-NEXT: v_and_b32_e32 v15, 1, v14
291 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[10:11]|, v[8:9]
292 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[10:11]|, v[8:9]
293 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v15
294 ; CHECK-NEXT: v_cndmask_b32_e64 v8, -1, 1, s[6:7]
295 ; CHECK-NEXT: v_add_u32_e32 v8, v14, v8
296 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
297 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v14, vcc
298 ; CHECK-NEXT: v_and_or_b32 v9, v11, s8, v8
299 ; CHECK-NEXT: v_bfe_u32 v8, v8, 16, 1
300 ; CHECK-NEXT: v_add3_u32 v8, v8, v9, s9
301 ; CHECK-NEXT: v_or_b32_e32 v9, 0x400000, v9
302 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[10:11], v[10:11]
303 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v9, vcc
304 ; CHECK-NEXT: v_cvt_f32_f64_e64 v10, |v[4:5]|
305 ; CHECK-NEXT: v_perm_b32 v12, v8, v12, s10
306 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[8:9], v10
307 ; CHECK-NEXT: v_and_b32_e32 v11, 1, v10
308 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[4:5]|, v[8:9]
309 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[4:5]|, v[8:9]
310 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v11
311 ; CHECK-NEXT: v_cndmask_b32_e64 v8, -1, 1, s[6:7]
312 ; CHECK-NEXT: v_add_u32_e32 v8, v10, v8
313 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
314 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v10, vcc
315 ; CHECK-NEXT: v_and_or_b32 v9, v5, s8, v8
316 ; CHECK-NEXT: v_bfe_u32 v8, v8, 16, 1
317 ; CHECK-NEXT: v_add3_u32 v8, v8, v9, s9
318 ; CHECK-NEXT: v_or_b32_e32 v9, 0x400000, v9
319 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[4:5], v[4:5]
320 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v9, vcc
321 ; CHECK-NEXT: v_cvt_f32_f64_e64 v9, |v[6:7]|
322 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v9
323 ; CHECK-NEXT: v_and_b32_e32 v10, 1, v9
324 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[6:7]|, v[4:5]
325 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[6:7]|, v[4:5]
326 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v10
327 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[6:7]
328 ; CHECK-NEXT: v_add_u32_e32 v4, v9, v4
329 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
330 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v9, vcc
331 ; CHECK-NEXT: v_and_or_b32 v5, v7, s8, v4
332 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
333 ; CHECK-NEXT: v_add3_u32 v4, v4, v5, s9
334 ; CHECK-NEXT: v_or_b32_e32 v5, 0x400000, v5
335 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[6:7], v[6:7]
336 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v5, vcc
337 ; CHECK-NEXT: v_cvt_f32_f64_e64 v6, |v[0:1]|
338 ; CHECK-NEXT: v_perm_b32 v11, v4, v8, s10
339 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v6
340 ; CHECK-NEXT: v_and_b32_e32 v7, 1, v6
341 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[0:1]|, v[4:5]
342 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[0:1]|, v[4:5]
343 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v7
344 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[6:7]
345 ; CHECK-NEXT: v_add_u32_e32 v4, v6, v4
346 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
347 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v6, vcc
348 ; CHECK-NEXT: v_and_or_b32 v5, v1, s8, v4
349 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
350 ; CHECK-NEXT: v_add3_u32 v4, v4, v5, s9
351 ; CHECK-NEXT: v_or_b32_e32 v5, 0x400000, v5
352 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[0:1]
353 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v5, vcc
354 ; CHECK-NEXT: v_cvt_f32_f64_e64 v5, |v[2:3]|
355 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v5
356 ; CHECK-NEXT: v_and_b32_e32 v6, 1, v5
357 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[2:3]|, v[0:1]
358 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[2:3]|, v[0:1]
359 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v6
360 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[6:7]
361 ; CHECK-NEXT: v_add_u32_e32 v0, v5, v0
362 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
363 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
364 ; CHECK-NEXT: v_and_or_b32 v1, v3, s8, v0
365 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
366 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s9
367 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
368 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[2:3], v[2:3]
369 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
370 ; CHECK-NEXT: v_perm_b32 v10, v0, v4, s10
371 ; CHECK-NEXT: global_store_dwordx4 v[16:17], v[10:13], off
372 ; CHECK-NEXT: s_waitcnt vmcnt(0)
373 ; CHECK-NEXT: s_setpc_b64 s[30:31]
375 %conv = fptrunc <8 x double> %num to <8 x bfloat>
376 store <8 x bfloat> %conv, ptr addrspace(1) %p, align 8
380 define void @v16(<16 x double> %num, ptr addrspace(1) %p) {
382 ; CHECK: ; %bb.0: ; %entry
383 ; CHECK-NEXT: s_waitcnt vmcnt(0) expcnt(0) lgkmcnt(0)
384 ; CHECK-NEXT: buffer_load_dword v33, off, s[0:3], s32 offset:8
385 ; CHECK-NEXT: buffer_load_dword v32, off, s[0:3], s32 offset:4
386 ; CHECK-NEXT: buffer_load_dword v31, off, s[0:3], s32
387 ; CHECK-NEXT: v_cvt_f32_f64_e64 v36, |v[12:13]|
388 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[34:35], v36
389 ; CHECK-NEXT: v_and_b32_e32 v37, 1, v36
390 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[6:7], |v[12:13]|, v[34:35]
391 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[4:5], |v[12:13]|, v[34:35]
392 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v37
393 ; CHECK-NEXT: v_cndmask_b32_e64 v34, -1, 1, s[6:7]
394 ; CHECK-NEXT: v_add_u32_e32 v34, v36, v34
395 ; CHECK-NEXT: s_or_b64 vcc, s[4:5], vcc
396 ; CHECK-NEXT: v_cndmask_b32_e32 v34, v34, v36, vcc
397 ; CHECK-NEXT: s_brev_b32 s4, 1
398 ; CHECK-NEXT: v_and_or_b32 v35, v13, s4, v34
399 ; CHECK-NEXT: v_bfe_u32 v34, v34, 16, 1
400 ; CHECK-NEXT: s_movk_i32 s5, 0x7fff
401 ; CHECK-NEXT: v_add3_u32 v34, v34, v35, s5
402 ; CHECK-NEXT: v_or_b32_e32 v35, 0x400000, v35
403 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[12:13], v[12:13]
404 ; CHECK-NEXT: v_cndmask_b32_e32 v34, v34, v35, vcc
405 ; CHECK-NEXT: v_cvt_f32_f64_e64 v35, |v[14:15]|
406 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[12:13], v35
407 ; CHECK-NEXT: v_and_b32_e32 v36, 1, v35
408 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[8:9], |v[14:15]|, v[12:13]
409 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[6:7], |v[14:15]|, v[12:13]
410 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v36
411 ; CHECK-NEXT: v_cndmask_b32_e64 v12, -1, 1, s[8:9]
412 ; CHECK-NEXT: v_add_u32_e32 v12, v35, v12
413 ; CHECK-NEXT: s_or_b64 vcc, s[6:7], vcc
414 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v12, v35, vcc
415 ; CHECK-NEXT: v_and_or_b32 v13, v15, s4, v12
416 ; CHECK-NEXT: v_bfe_u32 v12, v12, 16, 1
417 ; CHECK-NEXT: v_add3_u32 v12, v12, v13, s5
418 ; CHECK-NEXT: v_or_b32_e32 v13, 0x400000, v13
419 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[14:15], v[14:15]
420 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v12, v13, vcc
421 ; CHECK-NEXT: s_mov_b32 s6, 0x7060302
422 ; CHECK-NEXT: v_perm_b32 v13, v12, v34, s6
423 ; CHECK-NEXT: v_cvt_f32_f64_e64 v12, |v[8:9]|
424 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[14:15], v12
425 ; CHECK-NEXT: v_and_b32_e32 v34, 1, v12
426 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[8:9]|, v[14:15]
427 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[8:9]|, v[14:15]
428 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v34
429 ; CHECK-NEXT: v_cndmask_b32_e64 v14, -1, 1, s[10:11]
430 ; CHECK-NEXT: v_add_u32_e32 v14, v12, v14
431 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
432 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v14, v12, vcc
433 ; CHECK-NEXT: v_and_or_b32 v14, v9, s4, v12
434 ; CHECK-NEXT: v_bfe_u32 v12, v12, 16, 1
435 ; CHECK-NEXT: v_add3_u32 v12, v12, v14, s5
436 ; CHECK-NEXT: v_or_b32_e32 v14, 0x400000, v14
437 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[8:9], v[8:9]
438 ; CHECK-NEXT: v_cndmask_b32_e32 v12, v12, v14, vcc
439 ; CHECK-NEXT: v_cvt_f32_f64_e64 v14, |v[10:11]|
440 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[8:9], v14
441 ; CHECK-NEXT: v_and_b32_e32 v15, 1, v14
442 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[10:11]|, v[8:9]
443 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[10:11]|, v[8:9]
444 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v15
445 ; CHECK-NEXT: v_cndmask_b32_e64 v8, -1, 1, s[10:11]
446 ; CHECK-NEXT: v_add_u32_e32 v8, v14, v8
447 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
448 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v14, vcc
449 ; CHECK-NEXT: v_and_or_b32 v9, v11, s4, v8
450 ; CHECK-NEXT: v_bfe_u32 v8, v8, 16, 1
451 ; CHECK-NEXT: v_add3_u32 v8, v8, v9, s5
452 ; CHECK-NEXT: v_or_b32_e32 v9, 0x400000, v9
453 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[10:11], v[10:11]
454 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v9, vcc
455 ; CHECK-NEXT: v_cvt_f32_f64_e64 v10, |v[4:5]|
456 ; CHECK-NEXT: v_perm_b32 v12, v8, v12, s6
457 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[8:9], v10
458 ; CHECK-NEXT: v_and_b32_e32 v11, 1, v10
459 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[4:5]|, v[8:9]
460 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[4:5]|, v[8:9]
461 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v11
462 ; CHECK-NEXT: v_cndmask_b32_e64 v8, -1, 1, s[10:11]
463 ; CHECK-NEXT: v_add_u32_e32 v8, v10, v8
464 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
465 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v10, vcc
466 ; CHECK-NEXT: v_and_or_b32 v9, v5, s4, v8
467 ; CHECK-NEXT: v_bfe_u32 v8, v8, 16, 1
468 ; CHECK-NEXT: v_add3_u32 v8, v8, v9, s5
469 ; CHECK-NEXT: v_or_b32_e32 v9, 0x400000, v9
470 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[4:5], v[4:5]
471 ; CHECK-NEXT: v_cndmask_b32_e32 v8, v8, v9, vcc
472 ; CHECK-NEXT: v_cvt_f32_f64_e64 v9, |v[6:7]|
473 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v9
474 ; CHECK-NEXT: v_and_b32_e32 v10, 1, v9
475 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[6:7]|, v[4:5]
476 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[6:7]|, v[4:5]
477 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v10
478 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[10:11]
479 ; CHECK-NEXT: v_add_u32_e32 v4, v9, v4
480 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
481 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v9, vcc
482 ; CHECK-NEXT: v_and_or_b32 v5, v7, s4, v4
483 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
484 ; CHECK-NEXT: v_add3_u32 v4, v4, v5, s5
485 ; CHECK-NEXT: v_or_b32_e32 v5, 0x400000, v5
486 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[6:7], v[6:7]
487 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v5, vcc
488 ; CHECK-NEXT: v_cvt_f32_f64_e64 v6, |v[0:1]|
489 ; CHECK-NEXT: v_perm_b32 v11, v4, v8, s6
490 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v6
491 ; CHECK-NEXT: v_and_b32_e32 v7, 1, v6
492 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[0:1]|, v[4:5]
493 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[0:1]|, v[4:5]
494 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v7
495 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[10:11]
496 ; CHECK-NEXT: v_add_u32_e32 v4, v6, v4
497 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
498 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v6, vcc
499 ; CHECK-NEXT: v_and_or_b32 v5, v1, s4, v4
500 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
501 ; CHECK-NEXT: v_add3_u32 v4, v4, v5, s5
502 ; CHECK-NEXT: v_or_b32_e32 v5, 0x400000, v5
503 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[0:1], v[0:1]
504 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v5, vcc
505 ; CHECK-NEXT: v_cvt_f32_f64_e64 v5, |v[2:3]|
506 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v5
507 ; CHECK-NEXT: v_and_b32_e32 v6, 1, v5
508 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[2:3]|, v[0:1]
509 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[2:3]|, v[0:1]
510 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v6
511 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[10:11]
512 ; CHECK-NEXT: v_add_u32_e32 v0, v5, v0
513 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
514 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
515 ; CHECK-NEXT: v_and_or_b32 v1, v3, s4, v0
516 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
517 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s5
518 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
519 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[2:3], v[2:3]
520 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
521 ; CHECK-NEXT: v_cvt_f32_f64_e64 v2, |v[28:29]|
522 ; CHECK-NEXT: v_perm_b32 v10, v0, v4, s6
523 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v2
524 ; CHECK-NEXT: v_and_b32_e32 v3, 1, v2
525 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[28:29]|, v[0:1]
526 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[28:29]|, v[0:1]
527 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v3
528 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[10:11]
529 ; CHECK-NEXT: v_add_u32_e32 v0, v2, v0
530 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
531 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
532 ; CHECK-NEXT: v_and_or_b32 v1, v29, s4, v0
533 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
534 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s5
535 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
536 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[28:29], v[28:29]
537 ; CHECK-NEXT: s_waitcnt vmcnt(0)
538 ; CHECK-NEXT: v_cvt_f32_f64_e64 v3, |v[30:31]|
539 ; CHECK-NEXT: v_cndmask_b32_e32 v2, v0, v1, vcc
540 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v3
541 ; CHECK-NEXT: v_and_b32_e32 v4, 1, v3
542 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[30:31]|, v[0:1]
543 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[30:31]|, v[0:1]
544 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v4
545 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[10:11]
546 ; CHECK-NEXT: v_add_u32_e32 v0, v3, v0
547 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
548 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v3, vcc
549 ; CHECK-NEXT: v_and_or_b32 v1, v31, s4, v0
550 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
551 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s5
552 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
553 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[30:31], v[30:31]
554 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
555 ; CHECK-NEXT: v_perm_b32 v3, v0, v2, s6
556 ; CHECK-NEXT: v_cvt_f32_f64_e64 v2, |v[24:25]|
557 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v2
558 ; CHECK-NEXT: v_and_b32_e32 v4, 1, v2
559 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[24:25]|, v[0:1]
560 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[24:25]|, v[0:1]
561 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v4
562 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[10:11]
563 ; CHECK-NEXT: v_add_u32_e32 v0, v2, v0
564 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
565 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v2, vcc
566 ; CHECK-NEXT: v_and_or_b32 v1, v25, s4, v0
567 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
568 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s5
569 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
570 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[24:25], v[24:25]
571 ; CHECK-NEXT: v_cvt_f32_f64_e64 v4, |v[26:27]|
572 ; CHECK-NEXT: v_cndmask_b32_e32 v2, v0, v1, vcc
573 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v4
574 ; CHECK-NEXT: v_and_b32_e32 v5, 1, v4
575 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[26:27]|, v[0:1]
576 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[26:27]|, v[0:1]
577 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v5
578 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[10:11]
579 ; CHECK-NEXT: v_add_u32_e32 v0, v4, v0
580 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
581 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
582 ; CHECK-NEXT: v_and_or_b32 v1, v27, s4, v0
583 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
584 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s5
585 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
586 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[26:27], v[26:27]
587 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
588 ; CHECK-NEXT: v_cvt_f32_f64_e64 v4, |v[20:21]|
589 ; CHECK-NEXT: v_perm_b32 v2, v0, v2, s6
590 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v4
591 ; CHECK-NEXT: v_and_b32_e32 v5, 1, v4
592 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[20:21]|, v[0:1]
593 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[20:21]|, v[0:1]
594 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v5
595 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[10:11]
596 ; CHECK-NEXT: v_add_u32_e32 v0, v4, v0
597 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
598 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
599 ; CHECK-NEXT: v_and_or_b32 v1, v21, s4, v0
600 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
601 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s5
602 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
603 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[20:21], v[20:21]
604 ; CHECK-NEXT: v_cvt_f32_f64_e64 v5, |v[22:23]|
605 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v0, v1, vcc
606 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[0:1], v5
607 ; CHECK-NEXT: v_and_b32_e32 v6, 1, v5
608 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[22:23]|, v[0:1]
609 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[22:23]|, v[0:1]
610 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v6
611 ; CHECK-NEXT: v_cndmask_b32_e64 v0, -1, 1, s[10:11]
612 ; CHECK-NEXT: v_add_u32_e32 v0, v5, v0
613 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
614 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v5, vcc
615 ; CHECK-NEXT: v_and_or_b32 v1, v23, s4, v0
616 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
617 ; CHECK-NEXT: v_add3_u32 v0, v0, v1, s5
618 ; CHECK-NEXT: v_or_b32_e32 v1, 0x400000, v1
619 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[22:23], v[22:23]
620 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v1, vcc
621 ; CHECK-NEXT: v_perm_b32 v1, v0, v4, s6
622 ; CHECK-NEXT: v_cvt_f32_f64_e64 v0, |v[16:17]|
623 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v0
624 ; CHECK-NEXT: v_and_b32_e32 v6, 1, v0
625 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[16:17]|, v[4:5]
626 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[16:17]|, v[4:5]
627 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v6
628 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[10:11]
629 ; CHECK-NEXT: v_add_u32_e32 v4, v0, v4
630 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
631 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v4, v0, vcc
632 ; CHECK-NEXT: v_and_or_b32 v4, v17, s4, v0
633 ; CHECK-NEXT: v_bfe_u32 v0, v0, 16, 1
634 ; CHECK-NEXT: v_add3_u32 v0, v0, v4, s5
635 ; CHECK-NEXT: v_or_b32_e32 v4, 0x400000, v4
636 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[16:17], v[16:17]
637 ; CHECK-NEXT: v_cvt_f32_f64_e64 v6, |v[18:19]|
638 ; CHECK-NEXT: v_cndmask_b32_e32 v0, v0, v4, vcc
639 ; CHECK-NEXT: v_cvt_f64_f32_e32 v[4:5], v6
640 ; CHECK-NEXT: v_and_b32_e32 v7, 1, v6
641 ; CHECK-NEXT: v_cmp_gt_f64_e64 s[10:11], |v[18:19]|, v[4:5]
642 ; CHECK-NEXT: v_cmp_nlg_f64_e64 s[8:9], |v[18:19]|, v[4:5]
643 ; CHECK-NEXT: v_cmp_eq_u32_e32 vcc, 1, v7
644 ; CHECK-NEXT: v_cndmask_b32_e64 v4, -1, 1, s[10:11]
645 ; CHECK-NEXT: v_add_u32_e32 v4, v6, v4
646 ; CHECK-NEXT: s_or_b64 vcc, s[8:9], vcc
647 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v6, vcc
648 ; CHECK-NEXT: v_and_or_b32 v5, v19, s4, v4
649 ; CHECK-NEXT: v_bfe_u32 v4, v4, 16, 1
650 ; CHECK-NEXT: v_add3_u32 v4, v4, v5, s5
651 ; CHECK-NEXT: v_or_b32_e32 v5, 0x400000, v5
652 ; CHECK-NEXT: v_cmp_u_f64_e32 vcc, v[18:19], v[18:19]
653 ; CHECK-NEXT: v_cndmask_b32_e32 v4, v4, v5, vcc
654 ; CHECK-NEXT: v_perm_b32 v0, v4, v0, s6
655 ; CHECK-NEXT: global_store_dwordx4 v[32:33], v[0:3], off offset:16
656 ; CHECK-NEXT: global_store_dwordx4 v[32:33], v[10:13], off
657 ; CHECK-NEXT: s_waitcnt vmcnt(0)
658 ; CHECK-NEXT: s_setpc_b64 s[30:31]
660 %conv = fptrunc <16 x double> %num to <16 x bfloat>
661 store <16 x bfloat> %conv, ptr addrspace(1) %p, align 8