1 ; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2 ; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
4 declare i32 @llvm.AMDGPU.bfe.u32(i32, i32, i32) nounwind readnone
6 ; FUNC-LABEL: @bfe_u32_arg_arg_arg
9 define void @bfe_u32_arg_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1, i32 %src2) nounwind {
10 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 %src1, i32 %src1) nounwind readnone
11 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
15 ; FUNC-LABEL: @bfe_u32_arg_arg_imm
18 define void @bfe_u32_arg_arg_imm(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind {
19 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 %src1, i32 123) nounwind readnone
20 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
24 ; FUNC-LABEL: @bfe_u32_arg_imm_arg
27 define void @bfe_u32_arg_imm_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src2) nounwind {
28 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 123, i32 %src2) nounwind readnone
29 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
33 ; FUNC-LABEL: @bfe_u32_imm_arg_arg
36 define void @bfe_u32_imm_arg_arg(i32 addrspace(1)* %out, i32 %src1, i32 %src2) nounwind {
37 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 123, i32 %src1, i32 %src2) nounwind readnone
38 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
42 ; FUNC-LABEL: @bfe_u32_arg_0_width_reg_offset
46 define void @bfe_u32_arg_0_width_reg_offset(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind {
47 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 %src1, i32 0) nounwind readnone
48 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
52 ; FUNC-LABEL: @bfe_u32_arg_0_width_imm_offset
56 define void @bfe_u32_arg_0_width_imm_offset(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind {
57 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 %src0, i32 8, i32 0) nounwind readnone
58 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
62 ; FUNC-LABEL: @bfe_u32_zextload_i8
63 ; SI: BUFFER_LOAD_UBYTE
66 define void @bfe_u32_zextload_i8(i32 addrspace(1)* %out, i8 addrspace(1)* %in) nounwind {
67 %load = load i8 addrspace(1)* %in
68 %ext = zext i8 %load to i32
69 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %ext, i32 0, i32 8)
70 store i32 %bfe, i32 addrspace(1)* %out, align 4
74 ; FUNC-LABEL: @bfe_u32_zext_in_reg_i8
75 ; SI: BUFFER_LOAD_DWORD
77 ; SI-NEXT: V_AND_B32_e32
80 define void @bfe_u32_zext_in_reg_i8(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
81 %load = load i32 addrspace(1)* %in, align 4
82 %add = add i32 %load, 1
83 %ext = and i32 %add, 255
84 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %ext, i32 0, i32 8)
85 store i32 %bfe, i32 addrspace(1)* %out, align 4
89 ; FUNC-LABEL: @bfe_u32_zext_in_reg_i16
90 ; SI: BUFFER_LOAD_DWORD
92 ; SI-NEXT: V_AND_B32_e32
95 define void @bfe_u32_zext_in_reg_i16(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
96 %load = load i32 addrspace(1)* %in, align 4
97 %add = add i32 %load, 1
98 %ext = and i32 %add, 65535
99 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %ext, i32 0, i32 16)
100 store i32 %bfe, i32 addrspace(1)* %out, align 4
104 ; FUNC-LABEL: @bfe_u32_zext_in_reg_i8_offset_1
105 ; SI: BUFFER_LOAD_DWORD
109 define void @bfe_u32_zext_in_reg_i8_offset_1(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
110 %load = load i32 addrspace(1)* %in, align 4
111 %add = add i32 %load, 1
112 %ext = and i32 %add, 255
113 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %ext, i32 1, i32 8)
114 store i32 %bfe, i32 addrspace(1)* %out, align 4
118 ; FUNC-LABEL: @bfe_u32_zext_in_reg_i8_offset_3
119 ; SI: BUFFER_LOAD_DWORD
121 ; SI-NEXT: V_AND_B32_e32 {{v[0-9]+}}, 0xf8
124 define void @bfe_u32_zext_in_reg_i8_offset_3(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
125 %load = load i32 addrspace(1)* %in, align 4
126 %add = add i32 %load, 1
127 %ext = and i32 %add, 255
128 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %ext, i32 3, i32 8)
129 store i32 %bfe, i32 addrspace(1)* %out, align 4
133 ; FUNC-LABEL: @bfe_u32_zext_in_reg_i8_offset_7
134 ; SI: BUFFER_LOAD_DWORD
136 ; SI-NEXT: V_AND_B32_e32 {{v[0-9]+}}, 0x80
139 define void @bfe_u32_zext_in_reg_i8_offset_7(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
140 %load = load i32 addrspace(1)* %in, align 4
141 %add = add i32 %load, 1
142 %ext = and i32 %add, 255
143 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %ext, i32 7, i32 8)
144 store i32 %bfe, i32 addrspace(1)* %out, align 4
148 ; FUNC-LABEL: @bfe_u32_zext_in_reg_i16_offset_8
149 ; SI: BUFFER_LOAD_DWORD
153 define void @bfe_u32_zext_in_reg_i16_offset_8(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
154 %load = load i32 addrspace(1)* %in, align 4
155 %add = add i32 %load, 1
156 %ext = and i32 %add, 65535
157 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %ext, i32 8, i32 8)
158 store i32 %bfe, i32 addrspace(1)* %out, align 4
162 ; FUNC-LABEL: @bfe_u32_test_1
163 ; SI: BUFFER_LOAD_DWORD
164 ; SI: V_AND_B32_e32 {{v[0-9]+}}, 1, {{v[0-9]+}}
166 ; EG: AND_INT T{{[0-9]\.[XYZW]}}, T{{[0-9]\.[XYZW]}}, 1,
167 define void @bfe_u32_test_1(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
168 %x = load i32 addrspace(1)* %in, align 4
169 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %x, i32 0, i32 1)
170 store i32 %bfe, i32 addrspace(1)* %out, align 4
174 define void @bfe_u32_test_2(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
175 %x = load i32 addrspace(1)* %in, align 4
176 %shl = shl i32 %x, 31
177 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shl, i32 0, i32 8)
178 store i32 %bfe, i32 addrspace(1)* %out, align 4
182 define void @bfe_u32_test_3(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
183 %x = load i32 addrspace(1)* %in, align 4
184 %shl = shl i32 %x, 31
185 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shl, i32 0, i32 1)
186 store i32 %bfe, i32 addrspace(1)* %out, align 4
190 ; FUNC-LABEL: @bfe_u32_test_4
194 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0
195 ; SI: BUFFER_STORE_DWORD [[VREG]],
197 define void @bfe_u32_test_4(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
198 %x = load i32 addrspace(1)* %in, align 4
199 %shl = shl i32 %x, 31
200 %shr = lshr i32 %shl, 31
201 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shr, i32 31, i32 1)
202 store i32 %bfe, i32 addrspace(1)* %out, align 4
206 ; FUNC-LABEL: @bfe_u32_test_5
207 ; SI: BUFFER_LOAD_DWORD
210 ; SI: V_BFE_I32 {{v[0-9]+}}, {{v[0-9]+}}, 0, 1
212 define void @bfe_u32_test_5(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
213 %x = load i32 addrspace(1)* %in, align 4
214 %shl = shl i32 %x, 31
215 %shr = ashr i32 %shl, 31
216 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shr, i32 0, i32 1)
217 store i32 %bfe, i32 addrspace(1)* %out, align 4
221 ; FUNC-LABEL: @bfe_u32_test_6
222 ; SI: V_LSHLREV_B32_e32 v{{[0-9]+}}, 31, v{{[0-9]+}}
223 ; SI: V_LSHRREV_B32_e32 v{{[0-9]+}}, 1, v{{[0-9]+}}
225 define void @bfe_u32_test_6(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
226 %x = load i32 addrspace(1)* %in, align 4
227 %shl = shl i32 %x, 31
228 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shl, i32 1, i32 31)
229 store i32 %bfe, i32 addrspace(1)* %out, align 4
233 ; FUNC-LABEL: @bfe_u32_test_7
234 ; SI: V_LSHLREV_B32_e32 v{{[0-9]+}}, 31, v{{[0-9]+}}
237 define void @bfe_u32_test_7(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
238 %x = load i32 addrspace(1)* %in, align 4
239 %shl = shl i32 %x, 31
240 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shl, i32 0, i32 31)
241 store i32 %bfe, i32 addrspace(1)* %out, align 4
245 ; FUNC-LABEL: @bfe_u32_test_8
247 ; SI: V_AND_B32_e32 {{v[0-9]+}}, 1, {{v[0-9]+}}
250 define void @bfe_u32_test_8(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
251 %x = load i32 addrspace(1)* %in, align 4
252 %shl = shl i32 %x, 31
253 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shl, i32 31, i32 1)
254 store i32 %bfe, i32 addrspace(1)* %out, align 4
258 ; FUNC-LABEL: @bfe_u32_test_9
260 ; SI: V_LSHRREV_B32_e32 v{{[0-9]+}}, 31, v{{[0-9]+}}
263 define void @bfe_u32_test_9(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
264 %x = load i32 addrspace(1)* %in, align 4
265 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %x, i32 31, i32 1)
266 store i32 %bfe, i32 addrspace(1)* %out, align 4
270 ; FUNC-LABEL: @bfe_u32_test_10
272 ; SI: V_LSHRREV_B32_e32 v{{[0-9]+}}, 1, v{{[0-9]+}}
275 define void @bfe_u32_test_10(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
276 %x = load i32 addrspace(1)* %in, align 4
277 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %x, i32 1, i32 31)
278 store i32 %bfe, i32 addrspace(1)* %out, align 4
282 ; FUNC-LABEL: @bfe_u32_test_11
284 ; SI: V_LSHRREV_B32_e32 v{{[0-9]+}}, 8, v{{[0-9]+}}
287 define void @bfe_u32_test_11(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
288 %x = load i32 addrspace(1)* %in, align 4
289 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %x, i32 8, i32 24)
290 store i32 %bfe, i32 addrspace(1)* %out, align 4
294 ; FUNC-LABEL: @bfe_u32_test_12
296 ; SI: V_LSHRREV_B32_e32 v{{[0-9]+}}, 24, v{{[0-9]+}}
299 define void @bfe_u32_test_12(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
300 %x = load i32 addrspace(1)* %in, align 4
301 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %x, i32 24, i32 8)
302 store i32 %bfe, i32 addrspace(1)* %out, align 4
306 ; FUNC-LABEL: @bfe_u32_test_13
307 ; V_ASHRREV_U32_e32 {{v[0-9]+}}, 31, {{v[0-9]+}}
310 define void @bfe_u32_test_13(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
311 %x = load i32 addrspace(1)* %in, align 4
312 %shl = ashr i32 %x, 31
313 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shl, i32 31, i32 1)
314 store i32 %bfe, i32 addrspace(1)* %out, align 4 ret void
317 ; FUNC-LABEL: @bfe_u32_test_14
321 define void @bfe_u32_test_14(i32 addrspace(1)* %out, i32 addrspace(1)* %in) nounwind {
322 %x = load i32 addrspace(1)* %in, align 4
323 %shl = lshr i32 %x, 31
324 %bfe = call i32 @llvm.AMDGPU.bfe.u32(i32 %shl, i32 31, i32 1)
325 store i32 %bfe, i32 addrspace(1)* %out, align 4 ret void
328 ; FUNC-LABEL: @bfe_u32_constant_fold_test_0
330 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0
331 ; SI: BUFFER_STORE_DWORD [[VREG]],
334 define void @bfe_u32_constant_fold_test_0(i32 addrspace(1)* %out) nounwind {
335 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 0, i32 0, i32 0) nounwind readnone
336 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
340 ; FUNC-LABEL: @bfe_u32_constant_fold_test_1
342 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0
343 ; SI: BUFFER_STORE_DWORD [[VREG]],
346 define void @bfe_u32_constant_fold_test_1(i32 addrspace(1)* %out) nounwind {
347 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 12334, i32 0, i32 0) nounwind readnone
348 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
352 ; FUNC-LABEL: @bfe_u32_constant_fold_test_2
354 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0
355 ; SI: BUFFER_STORE_DWORD [[VREG]],
358 define void @bfe_u32_constant_fold_test_2(i32 addrspace(1)* %out) nounwind {
359 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 0, i32 0, i32 1) nounwind readnone
360 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
364 ; FUNC-LABEL: @bfe_u32_constant_fold_test_3
366 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 1
367 ; SI: BUFFER_STORE_DWORD [[VREG]],
370 define void @bfe_u32_constant_fold_test_3(i32 addrspace(1)* %out) nounwind {
371 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 1, i32 0, i32 1) nounwind readnone
372 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
376 ; FUNC-LABEL: @bfe_u32_constant_fold_test_4
378 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], -1
379 ; SI: BUFFER_STORE_DWORD [[VREG]],
382 define void @bfe_u32_constant_fold_test_4(i32 addrspace(1)* %out) nounwind {
383 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 4294967295, i32 0, i32 1) nounwind readnone
384 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
388 ; FUNC-LABEL: @bfe_u32_constant_fold_test_5
390 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 1
391 ; SI: BUFFER_STORE_DWORD [[VREG]],
394 define void @bfe_u32_constant_fold_test_5(i32 addrspace(1)* %out) nounwind {
395 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 128, i32 7, i32 1) nounwind readnone
396 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
400 ; FUNC-LABEL: @bfe_u32_constant_fold_test_6
402 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0x80
403 ; SI: BUFFER_STORE_DWORD [[VREG]],
406 define void @bfe_u32_constant_fold_test_6(i32 addrspace(1)* %out) nounwind {
407 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 128, i32 0, i32 8) nounwind readnone
408 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
412 ; FUNC-LABEL: @bfe_u32_constant_fold_test_7
414 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0x7f
415 ; SI: BUFFER_STORE_DWORD [[VREG]],
418 define void @bfe_u32_constant_fold_test_7(i32 addrspace(1)* %out) nounwind {
419 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 127, i32 0, i32 8) nounwind readnone
420 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
424 ; FUNC-LABEL: @bfe_u32_constant_fold_test_8
426 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 1
427 ; SI: BUFFER_STORE_DWORD [[VREG]],
430 define void @bfe_u32_constant_fold_test_8(i32 addrspace(1)* %out) nounwind {
431 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 127, i32 6, i32 8) nounwind readnone
432 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
436 ; FUNC-LABEL: @bfe_u32_constant_fold_test_9
438 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 1
439 ; SI: BUFFER_STORE_DWORD [[VREG]],
441 ; EG-NOT: BFEfppppppppppppp
442 define void @bfe_u32_constant_fold_test_9(i32 addrspace(1)* %out) nounwind {
443 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 65536, i32 16, i32 8) nounwind readnone
444 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
448 ; FUNC-LABEL: @bfe_u32_constant_fold_test_10
450 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0
451 ; SI: BUFFER_STORE_DWORD [[VREG]],
454 define void @bfe_u32_constant_fold_test_10(i32 addrspace(1)* %out) nounwind {
455 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 65535, i32 16, i32 16) nounwind readnone
456 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
460 ; FUNC-LABEL: @bfe_u32_constant_fold_test_11
462 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 10
463 ; SI: BUFFER_STORE_DWORD [[VREG]],
466 define void @bfe_u32_constant_fold_test_11(i32 addrspace(1)* %out) nounwind {
467 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 160, i32 4, i32 4) nounwind readnone
468 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
472 ; FUNC-LABEL: @bfe_u32_constant_fold_test_12
474 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0
475 ; SI: BUFFER_STORE_DWORD [[VREG]],
478 define void @bfe_u32_constant_fold_test_12(i32 addrspace(1)* %out) nounwind {
479 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 160, i32 31, i32 1) nounwind readnone
480 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
484 ; FUNC-LABEL: @bfe_u32_constant_fold_test_13
486 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 1
487 ; SI: BUFFER_STORE_DWORD [[VREG]],
490 define void @bfe_u32_constant_fold_test_13(i32 addrspace(1)* %out) nounwind {
491 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 131070, i32 16, i32 16) nounwind readnone
492 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
496 ; FUNC-LABEL: @bfe_u32_constant_fold_test_14
498 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 40
499 ; SI: BUFFER_STORE_DWORD [[VREG]],
502 define void @bfe_u32_constant_fold_test_14(i32 addrspace(1)* %out) nounwind {
503 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 160, i32 2, i32 30) nounwind readnone
504 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
508 ; FUNC-LABEL: @bfe_u32_constant_fold_test_15
510 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 10
511 ; SI: BUFFER_STORE_DWORD [[VREG]],
514 define void @bfe_u32_constant_fold_test_15(i32 addrspace(1)* %out) nounwind {
515 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 160, i32 4, i32 28) nounwind readnone
516 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
520 ; FUNC-LABEL: @bfe_u32_constant_fold_test_16
522 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0x7f
523 ; SI: BUFFER_STORE_DWORD [[VREG]],
526 define void @bfe_u32_constant_fold_test_16(i32 addrspace(1)* %out) nounwind {
527 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 4294967295, i32 1, i32 7) nounwind readnone
528 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
532 ; FUNC-LABEL: @bfe_u32_constant_fold_test_17
534 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0x7f
535 ; SI: BUFFER_STORE_DWORD [[VREG]],
538 define void @bfe_u32_constant_fold_test_17(i32 addrspace(1)* %out) nounwind {
539 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 255, i32 1, i32 31) nounwind readnone
540 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4
544 ; FUNC-LABEL: @bfe_u32_constant_fold_test_18
546 ; SI: V_MOV_B32_e32 [[VREG:v[0-9]+]], 0
547 ; SI: BUFFER_STORE_DWORD [[VREG]],
550 define void @bfe_u32_constant_fold_test_18(i32 addrspace(1)* %out) nounwind {
551 %bfe_u32 = call i32 @llvm.AMDGPU.bfe.u32(i32 255, i32 31, i32 1) nounwind readnone
552 store i32 %bfe_u32, i32 addrspace(1)* %out, align 4