Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/Target/LoongArch/LoongArchInstrInfo.td
Show First 20 Lines • Show All 158 Lines • ▼ Show 20 Lines | def simm12_plus1 : ImmLeaf<GRLenVT, | ||||
[{return (isInt<12>(Imm) && Imm != -2048) || Imm == 2048;}]>; | [{return (isInt<12>(Imm) && Imm != -2048) || Imm == 2048;}]>; | ||||
// Return the negation of an immediate value. | // Return the negation of an immediate value. | ||||
def NegImm : SDNodeXForm<imm, [{ | def NegImm : SDNodeXForm<imm, [{ | ||||
return CurDAG->getTargetConstant(-N->getSExtValue(), SDLoc(N), | return CurDAG->getTargetConstant(-N->getSExtValue(), SDLoc(N), | ||||
N->getValueType(0)); | N->getValueType(0)); | ||||
}]>; | }]>; | ||||
// FP immediate patterns. | |||||
def fpimm0 : PatLeaf<(fpimm), [{return N->isExactlyValue(+0.0);}]>; | |||||
def fpimm0neg : PatLeaf<(fpimm), [{return N->isExactlyValue(-0.0);}]>; | |||||
def fpimm1 : PatLeaf<(fpimm), [{return N->isExactlyValue(+1.0);}]>; | |||||
def CallSymbol: AsmOperandClass { | def CallSymbol: AsmOperandClass { | ||||
SixWeining: Suggest to remove useless blank lines and indent. | |||||
Thanks. I will change that. gonglingqin: Thanks. I will change that. | |||||
let Name = "CallSymbol"; | let Name = "CallSymbol"; | ||||
let RenderMethod = "addImmOperands"; | let RenderMethod = "addImmOperands"; | ||||
let PredicateMethod = "isImm"; | let PredicateMethod = "isImm"; | ||||
} | } | ||||
// A bare symbol used in call only. | // A bare symbol used in call only. | ||||
def call_symbol : Operand<iPTR> { | def call_symbol : Operand<iPTR> { | ||||
let ParserMatchClass = CallSymbol; | let ParserMatchClass = CallSymbol; | ||||
▲ Show 20 Lines • Show All 692 Lines • Show Last 20 Lines |
Suggest to remove useless blank lines and indent.