From 7358593e344ec75ff6c2951c94fe84ef51527937 Mon Sep 17 00:00:00 2001 From: Colin LeMahieu Date: Fri, 5 Dec 2014 17:55:51 +0000 Subject: [PATCH] [Hexagon] [NFC] Rearranging def order. llvm-svn: 223487 --- llvm/lib/Target/Hexagon/HexagonInstrInfo.td | 55 ++++++++++++++--------------- 1 file changed, 27 insertions(+), 28 deletions(-) diff --git a/llvm/lib/Target/Hexagon/HexagonInstrInfo.td b/llvm/lib/Target/Hexagon/HexagonInstrInfo.td index dba0e52..c60e002 100644 --- a/llvm/lib/Target/Hexagon/HexagonInstrInfo.td +++ b/llvm/lib/Target/Hexagon/HexagonInstrInfo.td @@ -202,6 +202,33 @@ def: BinOp32_pat; def: BinOp32_pat; def: BinOp32_pat; +let hasSideEffects = 0, hasNewValue = 1, isCompare = 1, InputType = "reg" in +class T_ALU32_3op_cmp MinOp, bit IsNeg, bit IsComm> + : ALU32_rr<(outs PredRegs:$Pd), (ins IntRegs:$Rs, IntRegs:$Rt), + "$Pd = "#mnemonic#"($Rs, $Rt)", + [], "", ALU32_3op_tc_1_SLOT0123>, ImmRegRel { + let CextOpcode = mnemonic; + let isCommutable = IsComm; + bits<5> Rs; + bits<5> Rt; + bits<2> Pd; + + let IClass = 0b1111; + let Inst{27-24} = 0b0010; + let Inst{22-21} = MinOp; + let Inst{20-16} = Rs; + let Inst{12-8} = Rt; + let Inst{4} = IsNeg; + let Inst{3-2} = 0b00; + let Inst{1-0} = Pd; +} + +let Itinerary = ALU32_3op_tc_2early_SLOT0123, isCodeGenOnly = 0 in { + def C2_cmpeq : T_ALU32_3op_cmp< "cmp.eq", 0b00, 0, 1>; + def C2_cmpgt : T_ALU32_3op_cmp< "cmp.gt", 0b10, 0, 0>; + def C2_cmpgtu : T_ALU32_3op_cmp< "cmp.gtu", 0b11, 0, 0>; +} + multiclass ALU32_Pbase { let isPredicatedNew = isPredNew in @@ -668,34 +695,6 @@ def : Pat <(sext_inreg (i32 IntRegs:$src1), i16), // ALU32/PRED + //===----------------------------------------------------------------------===// - -let hasSideEffects = 0, hasNewValue = 1, isCompare = 1, InputType = "reg" in -class T_ALU32_3op_cmp MinOp, bit IsNeg, bit IsComm> - : ALU32_rr<(outs PredRegs:$Pd), (ins IntRegs:$Rs, IntRegs:$Rt), - "$Pd = "#mnemonic#"($Rs, $Rt)", - [], "", ALU32_3op_tc_1_SLOT0123>, ImmRegRel { - let CextOpcode = mnemonic; - let isCommutable = IsComm; - bits<5> Rs; - bits<5> Rt; - bits<2> Pd; - - let IClass = 0b1111; - let Inst{27-24} = 0b0010; - let Inst{22-21} = MinOp; - let Inst{20-16} = Rs; - let Inst{12-8} = Rt; - let Inst{4} = IsNeg; - let Inst{3-2} = 0b00; - let Inst{1-0} = Pd; -} - -let Itinerary = ALU32_3op_tc_2early_SLOT0123, isCodeGenOnly = 0 in { - def C2_cmpeq : T_ALU32_3op_cmp< "cmp.eq", 0b00, 0, 1>; - def C2_cmpgt : T_ALU32_3op_cmp< "cmp.gt", 0b10, 0, 0>; - def C2_cmpgtu : T_ALU32_3op_cmp< "cmp.gtu", 0b11, 0, 0>; -} - class T_ALU64_rr RegType, bits<3> MajOp, bits<3> MinOp, bit OpsRev, bit IsComm, string Op2Pfx> -- 2.7.4