From 7585a29bd426bdcfc90e6cbc64abb871273ca389 Mon Sep 17 00:00:00 2001 From: Marek Olsak Date: Tue, 3 Feb 2015 17:38:05 +0000 Subject: [PATCH] R600/SI: Remove VOP2_REV definitions from target-specific instructions MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The getCommute* functions are only used with pseudos, so this commit doesn't change anything. The issue with missing non-rev versions of shift instructions on VI will fixed separately. Tested-by: Michel Dänzer llvm-svn: 227989 --- llvm/lib/Target/R600/SIInstrInfo.td | 45 ++++++++++++++-------------------- llvm/lib/Target/R600/SIInstructions.td | 9 +++---- 2 files changed, 22 insertions(+), 32 deletions(-) diff --git a/llvm/lib/Target/R600/SIInstrInfo.td b/llvm/lib/Target/R600/SIInstrInfo.td index b793b5c..a8f73392 100644 --- a/llvm/lib/Target/R600/SIInstrInfo.td +++ b/llvm/lib/Target/R600/SIInstrInfo.td @@ -849,25 +849,22 @@ class VOP2_Pseudo pattern, string opName> : } multiclass VOP2SI_m pattern, - string opName, string revOpSI> { + string opName, string revOp> { def "" : VOP2_Pseudo , - VOP2_REV; + VOP2_REV; def _si : VOP2 , - VOP2_REV, SIMCInstr ; } multiclass VOP2_m pattern, - string opName, string revOpSI, string revOpVI> { + string opName, string revOp> { def "" : VOP2_Pseudo , - VOP2_REV; + VOP2_REV; def _si : VOP2 , - VOP2_REV, SIMCInstr ; def _vi : VOP2 , - VOP2_REV, SIMCInstr ; } @@ -941,20 +938,18 @@ multiclass VOP3_1_m pattern, string opName, string revOpSI, string revOpVI, + list pattern, string opName, string revOp, bit HasMods = 1, bit UseFullOp = 0> { def "" : VOP3_Pseudo , - VOP2_REV; + VOP2_REV; def _si : VOP3_Real_si , - VOP2_REV, VOP3DisableFields<1, 0, HasMods>; def _vi : VOP3_Real_vi , - VOP2_REV, VOP3DisableFields<1, 0, HasMods>; } @@ -970,14 +965,12 @@ multiclass VOP3b_2_m , VOP3DisableFields<1, 0, HasMods>, - SIMCInstr, - VOP2_REV; + SIMCInstr; // TODO: Do we need this VI variant here? /*def _vi : VOP3b_vi , VOP3DisableFields<1, 0, HasMods>, - SIMCInstr, - VOP2_REV;*/ + SIMCInstr;*/ } // End sdst = SIOperand.VCC, Defs = [VCC] } @@ -1056,17 +1049,17 @@ multiclass VOP1InstSI pat32, dag ins64, string asm64, list pat64, - string revOpSI, string revOpVI, bit HasMods> { - defm _e32 : VOP2_m ; + string revOp, bit HasMods> { + defm _e32 : VOP2_m ; defm _e64 : VOP3_2_m ; } multiclass VOP2Inst : VOP2_Helper < + string revOp = opName> : VOP2_Helper < op, opName, P.Outs, P.Ins32, P.Asm32, [], P.Ins64, P.Asm64, @@ -1076,7 +1069,7 @@ multiclass VOP2Inst ; multiclass VOP2b_Helper pat64, string revOp, bit HasMods> { - defm _e32 : VOP2_m ; + defm _e32 : VOP2_m ; defm _e64 : VOP3b_2_m pat32, dag ins64, string asm64, list pat64, - string revOpSI, string revOpVI, bit HasMods> { - defm _e32 : VOP2SI_m ; + string revOp, bit HasMods> { + defm _e32 : VOP2SI_m ; defm _e64 : VOP3_2_m ; + revOp, HasMods>; } multiclass VOP2_VI3_Inst + string revOp = opName> : VOP2_VI3_Helper < op, opName, P.Outs, P.Ins32, P.Asm32, [], @@ -1130,7 +1123,7 @@ multiclass VOP2_VI3_Inst ; class VOPC_Pseudo pattern, string opName> : diff --git a/llvm/lib/Target/R600/SIInstructions.td b/llvm/lib/Target/R600/SIInstructions.td index 1f589dd..75776c9 100644 --- a/llvm/lib/Target/R600/SIInstructions.td +++ b/llvm/lib/Target/R600/SIInstructions.td @@ -1457,22 +1457,19 @@ defm V_MAX_U32 : VOP2Inst , "v_max_u32", VOP_I32_I32_I32, AMDGPUumax >; -// No non-Rev Op on VI defm V_LSHRREV_B32 : VOP2Inst < vop2<0x16, 0x10>, "v_lshrrev_b32", VOP_I32_I32_I32, null_frag, - "v_lshr_b32", "v_lshrrev_b32" + "v_lshr_b32" >; -// No non-Rev OP on VI defm V_ASHRREV_I32 : VOP2Inst < vop2<0x18, 0x11>, "v_ashrrev_i32", VOP_I32_I32_I32, null_frag, - "v_ashr_i32", "v_ashrrev_i32" + "v_ashr_i32" >; -// No non-Rev OP on VI defm V_LSHLREV_B32 : VOP2Inst < vop2<0x1a, 0x12>, "v_lshlrev_b32", VOP_I32_I32_I32, null_frag, - "v_lshl_b32", "v_lshlrev_b32" + "v_lshl_b32" >; defm V_AND_B32 : VOP2Inst , "v_and_b32", -- 2.7.4