1
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
2
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
3
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
5
declare i32 @llvm.AMDGPU.bfi(i32, i32, i32) nounwind readnone
7
; FUNC-LABEL: {{^}}bfi_arg_arg_arg:
10
define void @bfi_arg_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1, i32 %src2) nounwind {
11
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 %src1, i32 %src1) nounwind readnone
12
store i32 %bfi, i32 addrspace(1)* %out, align 4
16
; FUNC-LABEL: {{^}}bfi_arg_arg_imm:
19
define void @bfi_arg_arg_imm(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind {
20
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 %src1, i32 123) nounwind readnone
21
store i32 %bfi, i32 addrspace(1)* %out, align 4
25
; FUNC-LABEL: {{^}}bfi_arg_imm_arg:
28
define void @bfi_arg_imm_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src2) nounwind {
29
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 123, i32 %src2) nounwind readnone
30
store i32 %bfi, i32 addrspace(1)* %out, align 4
34
; FUNC-LABEL: {{^}}bfi_imm_arg_arg:
37
define void @bfi_imm_arg_arg(i32 addrspace(1)* %out, i32 %src1, i32 %src2) nounwind {
38
%bfi = call i32 @llvm.AMDGPU.bfi(i32 123, i32 %src1, i32 %src2) nounwind readnone
39
store i32 %bfi, i32 addrspace(1)* %out, align 4