2015-01-07 02:00:21 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
2015-01-28 01:27:15 +08:00
|
|
|
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
2014-04-01 02:21:18 +08:00
|
|
|
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
|
|
|
|
|
|
|
|
declare i32 @llvm.AMDGPU.bfi(i32, i32, i32) nounwind readnone
|
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; FUNC-LABEL: {{^}}bfi_arg_arg_arg:
|
2014-11-05 22:50:53 +08:00
|
|
|
; SI: v_bfi_b32
|
2014-04-01 02:21:18 +08:00
|
|
|
; EG: BFI_INT
|
|
|
|
define void @bfi_arg_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1, i32 %src2) nounwind {
|
|
|
|
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 %src1, i32 %src1) nounwind readnone
|
|
|
|
store i32 %bfi, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; FUNC-LABEL: {{^}}bfi_arg_arg_imm:
|
2014-11-05 22:50:53 +08:00
|
|
|
; SI: v_bfi_b32
|
2014-04-01 02:21:18 +08:00
|
|
|
; EG: BFI_INT
|
|
|
|
define void @bfi_arg_arg_imm(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind {
|
|
|
|
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 %src1, i32 123) nounwind readnone
|
|
|
|
store i32 %bfi, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; FUNC-LABEL: {{^}}bfi_arg_imm_arg:
|
2014-11-05 22:50:53 +08:00
|
|
|
; SI: v_bfi_b32
|
2014-04-01 02:21:18 +08:00
|
|
|
; EG: BFI_INT
|
|
|
|
define void @bfi_arg_imm_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src2) nounwind {
|
|
|
|
%bfi = call i32 @llvm.AMDGPU.bfi(i32 %src0, i32 123, i32 %src2) nounwind readnone
|
|
|
|
store i32 %bfi, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
2014-10-02 01:15:17 +08:00
|
|
|
; FUNC-LABEL: {{^}}bfi_imm_arg_arg:
|
2014-11-05 22:50:53 +08:00
|
|
|
; SI: v_bfi_b32
|
2014-04-01 02:21:18 +08:00
|
|
|
; EG: BFI_INT
|
|
|
|
define void @bfi_imm_arg_arg(i32 addrspace(1)* %out, i32 %src1, i32 %src2) nounwind {
|
|
|
|
%bfi = call i32 @llvm.AMDGPU.bfi(i32 123, i32 %src1, i32 %src2) nounwind readnone
|
|
|
|
store i32 %bfi, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|