From f34625adbdb909edcea6df896f0045553f86719a Mon Sep 17 00:00:00 2001 From: Marek Olsak Date: Tue, 3 Feb 2015 21:53:08 +0000 Subject: [PATCH] R600/SI: Remove useless patterns in VALU which are already covered by SALU MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Also remove hasPostISelHook=1 from V_LSHL_B32. It's defined by InstSI already. Tested-by: Michel Dänzer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@228039 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/R600/SIInstructions.td | 61 ++++++++----------------------- 1 file changed, 16 insertions(+), 45 deletions(-) diff --git a/lib/Target/R600/SIInstructions.td b/lib/Target/R600/SIInstructions.td index 6bc6a82e7ad..188c2cdae19 100644 --- a/lib/Target/R600/SIInstructions.td +++ b/lib/Target/R600/SIInstructions.td @@ -1444,18 +1444,10 @@ defm V_MIN_F32 : VOP2Inst , "v_min_f32", VOP_F32_F32_F32, fminnum>; defm V_MAX_F32 : VOP2Inst , "v_max_f32", VOP_F32_F32_F32, fmaxnum>; -defm V_MIN_I32 : VOP2Inst , "v_min_i32", VOP_I32_I32_I32, - AMDGPUsmin ->; -defm V_MAX_I32 : VOP2Inst , "v_max_i32", VOP_I32_I32_I32, - AMDGPUsmax ->; -defm V_MIN_U32 : VOP2Inst , "v_min_u32", VOP_I32_I32_I32, - AMDGPUumin ->; -defm V_MAX_U32 : VOP2Inst , "v_max_u32", VOP_I32_I32_I32, - AMDGPUumax ->; +defm V_MIN_I32 : VOP2Inst , "v_min_i32", VOP_I32_I32_I32>; +defm V_MAX_I32 : VOP2Inst , "v_max_i32", VOP_I32_I32_I32>; +defm V_MIN_U32 : VOP2Inst , "v_min_u32", VOP_I32_I32_I32>; +defm V_MAX_U32 : VOP2Inst , "v_max_u32", VOP_I32_I32_I32>; defm V_LSHRREV_B32 : VOP2Inst < vop2<0x16, 0x10>, "v_lshrrev_b32", VOP_I32_I32_I32, null_frag, @@ -1472,14 +1464,9 @@ defm V_LSHLREV_B32 : VOP2Inst < "v_lshl_b32" >; -defm V_AND_B32 : VOP2Inst , "v_and_b32", - VOP_I32_I32_I32, and>; -defm V_OR_B32 : VOP2Inst , "v_or_b32", - VOP_I32_I32_I32, or ->; -defm V_XOR_B32 : VOP2Inst , "v_xor_b32", - VOP_I32_I32_I32, xor ->; +defm V_AND_B32 : VOP2Inst , "v_and_b32", VOP_I32_I32_I32>; +defm V_OR_B32 : VOP2Inst , "v_or_b32", VOP_I32_I32_I32>; +defm V_XOR_B32 : VOP2Inst , "v_xor_b32", VOP_I32_I32_I32>; defm V_MAC_F32 : VOP2Inst , "v_mac_f32", VOP_F32_F32_F32>; } // End isCommutable = 1 @@ -1499,9 +1486,7 @@ let isCommutable = 1, Defs = [VCC] in { // Carry-out goes to VCC defm V_ADD_I32 : VOP2bInst , "v_add_i32", VOP_I32_I32_I32, add >; -defm V_SUB_I32 : VOP2bInst , "v_sub_i32", - VOP_I32_I32_I32, sub ->; +defm V_SUB_I32 : VOP2bInst , "v_sub_i32", VOP_I32_I32_I32>; defm V_SUBREV_I32 : VOP2bInst , "v_subrev_i32", VOP_I32_I32_I32, null_frag, "v_sub_i32" @@ -1509,10 +1494,10 @@ defm V_SUBREV_I32 : VOP2bInst , "v_subrev_i32", let Uses = [VCC] in { // Carry-in comes from VCC defm V_ADDC_U32 : VOP2bInst , "v_addc_u32", - VOP_I32_I32_I32_VCC, adde + VOP_I32_I32_I32_VCC >; defm V_SUBB_U32 : VOP2bInst , "v_subb_u32", - VOP_I32_I32_I32_VCC, sube + VOP_I32_I32_I32_VCC >; defm V_SUBBREV_U32 : VOP2bInst , "v_subbrev_u32", VOP_I32_I32_I32_VCC, null_frag, "v_subb_u32" @@ -1548,15 +1533,9 @@ defm V_MAX_LEGACY_F32 : VOP2InstSI , "v_max_legacy_f32", >; let isCommutable = 1 in { -defm V_LSHR_B32 : VOP2InstSI , "v_lshr_b32", VOP_I32_I32_I32, srl>; -defm V_ASHR_I32 : VOP2InstSI , "v_ashr_i32", - VOP_I32_I32_I32, sra ->; - -let hasPostISelHook = 1 in { -defm V_LSHL_B32 : VOP2InstSI , "v_lshl_b32", VOP_I32_I32_I32, shl>; -} - +defm V_LSHR_B32 : VOP2InstSI , "v_lshr_b32", VOP_I32_I32_I32>; +defm V_ASHR_I32 : VOP2InstSI , "v_ashr_i32", VOP_I32_I32_I32>; +defm V_LSHL_B32 : VOP2InstSI , "v_lshl_b32", VOP_I32_I32_I32>; } // End isCommutable = 1 } // End let SubtargetPredicate = SICI @@ -1788,17 +1767,9 @@ defm V_TRIG_PREOP_F64 : VOP3Inst < // These instructions only exist on SI and CI let SubtargetPredicate = isSICI in { -defm V_LSHL_B64 : VOP3Inst , "v_lshl_b64", - VOP_I64_I64_I32, shl ->; - -defm V_LSHR_B64 : VOP3Inst , "v_lshr_b64", - VOP_I64_I64_I32, srl ->; - -defm V_ASHR_I64 : VOP3Inst , "v_ashr_i64", - VOP_I64_I64_I32, sra ->; +defm V_LSHL_B64 : VOP3Inst , "v_lshl_b64", VOP_I64_I64_I32>; +defm V_LSHR_B64 : VOP3Inst , "v_lshr_b64", VOP_I64_I64_I32>; +defm V_ASHR_I64 : VOP3Inst , "v_ashr_i64", VOP_I64_I64_I32>; defm V_MULLIT_F32 : VOP3Inst , "v_mullit_f32", VOP_F32_F32_F32_F32>; -- 2.34.1