Skip to content

Commit

Permalink
[Hexagon] [NFC] Rearranging def order.
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223487 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Colin LeMahieu committed Dec 5, 2014
1 parent 24ba299 commit 639b824
Showing 1 changed file with 27 additions and 28 deletions.
55 changes: 27 additions & 28 deletions lib/Target/Hexagon/HexagonInstrInfo.td
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,33 @@ def: BinOp32_pat<or, A2_or, i32>;
def: BinOp32_pat<sub, A2_sub, i32>;
def: BinOp32_pat<xor, A2_xor, i32>;

let hasSideEffects = 0, hasNewValue = 1, isCompare = 1, InputType = "reg" in
class T_ALU32_3op_cmp<string mnemonic, bits<2> 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<string mnemonic, RegisterClass RC, bit isNot,
bit isPredNew> {
let isPredicatedNew = isPredNew in
Expand Down Expand Up @@ -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<string mnemonic, bits<2> 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<string mnemonic, string suffix, bits<4> RegType,
bits<3> MajOp, bits<3> MinOp, bit OpsRev, bit IsComm,
string Op2Pfx>
Expand Down

0 comments on commit 639b824

Please sign in to comment.