2014-03-31 18:21:18 +00:00
|
|
|
; RUN: llc -march=r600 -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
2014-04-03 20:19:29 +00:00
|
|
|
; RUN: llc -march=r600 -mcpu=redwood -show-mc-encoding -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
|
2014-03-31 18:21:18 +00:00
|
|
|
|
|
|
|
declare i32 @llvm.AMDGPU.bfe.i32(i32, i32, i32) nounwind readnone
|
|
|
|
|
|
|
|
; FUNC-LABEL: @bfe_i32_arg_arg_arg
|
|
|
|
; SI: V_BFE_I32
|
|
|
|
; EG: BFE_INT
|
2014-04-03 20:19:29 +00:00
|
|
|
; EG: encoding: [{{[x0-9a-f]+,[x0-9a-f]+,[x0-9a-f]+,[x0-9a-f]+,[x0-9a-f]+}},0xac
|
2014-03-31 18:21:18 +00:00
|
|
|
define void @bfe_i32_arg_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1, i32 %src2) nounwind {
|
|
|
|
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 %src0, i32 %src1, i32 %src1) nounwind readnone
|
|
|
|
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: @bfe_i32_arg_arg_imm
|
|
|
|
; SI: V_BFE_I32
|
|
|
|
; EG: BFE_INT
|
|
|
|
define void @bfe_i32_arg_arg_imm(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind {
|
|
|
|
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 %src0, i32 %src1, i32 123) nounwind readnone
|
|
|
|
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: @bfe_i32_arg_imm_arg
|
|
|
|
; SI: V_BFE_I32
|
|
|
|
; EG: BFE_INT
|
|
|
|
define void @bfe_i32_arg_imm_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src2) nounwind {
|
|
|
|
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 %src0, i32 123, i32 %src2) nounwind readnone
|
|
|
|
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|
|
|
|
|
|
|
|
; FUNC-LABEL: @bfe_i32_imm_arg_arg
|
|
|
|
; SI: V_BFE_I32
|
|
|
|
; EG: BFE_INT
|
|
|
|
define void @bfe_i32_imm_arg_arg(i32 addrspace(1)* %out, i32 %src1, i32 %src2) nounwind {
|
|
|
|
%bfe_i32 = call i32 @llvm.AMDGPU.bfe.i32(i32 123, i32 %src1, i32 %src2) nounwind readnone
|
|
|
|
store i32 %bfe_i32, i32 addrspace(1)* %out, align 4
|
|
|
|
ret void
|
|
|
|
}
|