mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 19:23:23 +01:00
AMDGPU: Remove bfi and bfm intrinsics
Nothing is using them. llvm-svn: 260123
This commit is contained in:
parent
fc270dff80
commit
eed0ad4e3e
@ -945,17 +945,6 @@ SDValue AMDGPUTargetLowering::LowerINTRINSIC_WO_CHAIN(SDValue Op,
|
||||
Op.getOperand(2),
|
||||
Op.getOperand(3));
|
||||
|
||||
case AMDGPUIntrinsic::AMDGPU_bfi:
|
||||
return DAG.getNode(AMDGPUISD::BFI, DL, VT,
|
||||
Op.getOperand(1),
|
||||
Op.getOperand(2),
|
||||
Op.getOperand(3));
|
||||
|
||||
case AMDGPUIntrinsic::AMDGPU_bfm:
|
||||
return DAG.getNode(AMDGPUISD::BFM, DL, VT,
|
||||
Op.getOperand(1),
|
||||
Op.getOperand(2));
|
||||
|
||||
case AMDGPUIntrinsic::AMDIL_exp: // Legacy name.
|
||||
return DAG.getNode(ISD::FEXP2, DL, VT, Op.getOperand(1));
|
||||
|
||||
|
@ -26,10 +26,8 @@ let TargetPrefix = "AMDGPU", isTarget = 1 in {
|
||||
def int_AMDGPU_cube : Intrinsic<[llvm_v4f32_ty], [llvm_v4f32_ty], [IntrNoMem]>;
|
||||
|
||||
// Deprecated in favor of expanded bit operations
|
||||
def int_AMDGPU_bfi : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_AMDGPU_bfe_i32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_AMDGPU_bfe_u32 : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
|
||||
def int_AMDGPU_bfm : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrNoMem]>;
|
||||
|
||||
def int_AMDGPU_rsq_clamped : Intrinsic<
|
||||
[llvm_anyfloat_ty], [LLVMMatchType<0>], [IntrNoMem]
|
||||
|
24
test/CodeGen/AMDGPU/bfm.ll
Normal file
24
test/CodeGen/AMDGPU/bfm.ll
Normal file
@ -0,0 +1,24 @@
|
||||
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
||||
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
||||
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_pattern:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
|
||||
define void @bfm_pattern(i32 addrspace(1)* %out, i32 %x, i32 %y) #0 {
|
||||
%a = shl i32 1, %x
|
||||
%b = sub i32 %a, 1
|
||||
%c = shl i32 %b, %y
|
||||
store i32 %c, i32 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_pattern_simple:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, {{s[0-9]+}}, 0
|
||||
define void @bfm_pattern_simple(i32 addrspace(1)* %out, i32 %x) #0 {
|
||||
%a = shl i32 1, %x
|
||||
%b = sub i32 %a, 1
|
||||
store i32 %b, i32 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
attributes #0 = { nounwind }
|
@ -1,42 +0,0 @@
|
||||
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
||||
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
||||
; 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
|
||||
|
||||
; FUNC-LABEL: {{^}}bfi_arg_arg_arg:
|
||||
; SI: v_bfi_b32
|
||||
; 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
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfi_arg_arg_imm:
|
||||
; SI: v_bfi_b32
|
||||
; 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
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfi_arg_imm_arg:
|
||||
; SI: v_bfi_b32
|
||||
; 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
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfi_imm_arg_arg:
|
||||
; SI: v_bfi_b32
|
||||
; 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
|
||||
}
|
||||
|
@ -1,60 +0,0 @@
|
||||
; RUN: llc -march=amdgcn -mcpu=SI -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
||||
; RUN: llc -march=amdgcn -mcpu=tonga -verify-machineinstrs < %s | FileCheck -check-prefix=SI -check-prefix=FUNC %s
|
||||
; RUN: llc -march=r600 -mcpu=redwood -verify-machineinstrs < %s | FileCheck -check-prefix=EG -check-prefix=FUNC %s
|
||||
|
||||
declare i32 @llvm.AMDGPU.bfm(i32, i32) nounwind readnone
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_arg_arg:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
|
||||
; EG: BFM_INT
|
||||
define void @bfm_arg_arg(i32 addrspace(1)* %out, i32 %src0, i32 %src1) nounwind {
|
||||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 %src0, i32 %src1) nounwind readnone
|
||||
store i32 %bfm, i32 addrspace(1)* %out, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_arg_imm:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, {{s[0-9]+}}, 0x7b
|
||||
; EG: BFM_INT
|
||||
define void @bfm_arg_imm(i32 addrspace(1)* %out, i32 %src0) nounwind {
|
||||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 %src0, i32 123) nounwind readnone
|
||||
store i32 %bfm, i32 addrspace(1)* %out, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_imm_arg:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, 0x7b, {{s[0-9]+}}
|
||||
; EG: BFM_INT
|
||||
define void @bfm_imm_arg(i32 addrspace(1)* %out, i32 %src1) nounwind {
|
||||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 123, i32 %src1) nounwind readnone
|
||||
store i32 %bfm, i32 addrspace(1)* %out, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_imm_imm:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, 0x7b, 0x1c8
|
||||
; EG: BFM_INT
|
||||
define void @bfm_imm_imm(i32 addrspace(1)* %out) nounwind {
|
||||
%bfm = call i32 @llvm.AMDGPU.bfm(i32 123, i32 456) nounwind readnone
|
||||
store i32 %bfm, i32 addrspace(1)* %out, align 4
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_pattern:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, {{s[0-9]+}}, {{s[0-9]+}}
|
||||
define void @bfm_pattern(i32 addrspace(1)* %out, i32 %x, i32 %y) {
|
||||
%a = shl i32 1, %x
|
||||
%b = sub i32 %a, 1
|
||||
%c = shl i32 %b, %y
|
||||
store i32 %c, i32 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
||||
|
||||
; FUNC-LABEL: {{^}}bfm_pattern_simple:
|
||||
; SI: s_bfm_b32 {{s[0-9]+}}, {{s[0-9]+}}, 0
|
||||
define void @bfm_pattern_simple(i32 addrspace(1)* %out, i32 %x) {
|
||||
%a = shl i32 1, %x
|
||||
%b = sub i32 %a, 1
|
||||
store i32 %b, i32 addrspace(1)* %out
|
||||
ret void
|
||||
}
|
Loading…
Reference in New Issue
Block a user