diff options
Diffstat (limited to 'llvm/lib/Target/LoongArch')
5 files changed, 14 insertions, 2 deletions
diff --git a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp index 904aabed..fe700e1 100644 --- a/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp +++ b/llvm/lib/Target/LoongArch/LoongArchISelLowering.cpp @@ -375,6 +375,8 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,        setOperationAction(ISD::FFLOOR, VT, Legal);        setOperationAction(ISD::FTRUNC, VT, Legal);        setOperationAction(ISD::FROUNDEVEN, VT, Legal); +      setOperationAction(ISD::FMINNUM, VT, Legal); +      setOperationAction(ISD::FMAXNUM, VT, Legal);      }      setOperationAction(ISD::CTPOP, GRLenVT, Legal);      setOperationAction(ISD::FCEIL, {MVT::f32, MVT::f64}, Legal); @@ -461,6 +463,8 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,        setOperationAction(ISD::FFLOOR, VT, Legal);        setOperationAction(ISD::FTRUNC, VT, Legal);        setOperationAction(ISD::FROUNDEVEN, VT, Legal); +      setOperationAction(ISD::FMINNUM, VT, Legal); +      setOperationAction(ISD::FMAXNUM, VT, Legal);      }    } diff --git a/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td b/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td index 610ba05..b502b056 100644 --- a/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td +++ b/llvm/lib/Target/LoongArch/LoongArchLASXInstrInfo.td @@ -1558,6 +1558,10 @@ defm : PatXrXrF<fmul, "XVFMUL">;  // XVFDIV_{S/D}  defm : PatXrXrF<fdiv, "XVFDIV">; +// XVFMAX_{S/D}, XVFMIN_{S/D} +defm : PatXrXrF<fmaxnum, "XVFMAX">; +defm : PatXrXrF<fminnum, "XVFMIN">; +  // XVFMADD_{S/D}  def : Pat<(fma v8f32:$xj, v8f32:$xk, v8f32:$xa),            (XVFMADD_S v8f32:$xj, v8f32:$xk, v8f32:$xa)>; diff --git a/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td b/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td index 6470842..6b74a4b 100644 --- a/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td +++ b/llvm/lib/Target/LoongArch/LoongArchLSXInstrInfo.td @@ -1760,6 +1760,10 @@ defm : PatVrVrF<fmul, "VFMUL">;  // VFDIV_{S/D}  defm : PatVrVrF<fdiv, "VFDIV">; +// VFMAX_{S/D}, VFMIN_{S/D} +defm : PatVrVrF<fmaxnum, "VFMAX">; +defm : PatVrVrF<fminnum, "VFMIN">; +  // VFMADD_{S/D}  def : Pat<(fma v4f32:$vj, v4f32:$vk, v4f32:$va),            (VFMADD_S v4f32:$vj, v4f32:$vk, v4f32:$va)>; diff --git a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp index 7d54565..6d69af5 100644 --- a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp +++ b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFObjectWriter.cpp @@ -39,7 +39,7 @@ LoongArchELFObjectWriter::LoongArchELFObjectWriter(uint8_t OSABI, bool Is64Bit)      : MCELFObjectTargetWriter(Is64Bit, OSABI, ELF::EM_LOONGARCH,                                /*HasRelocationAddend=*/true) {} -LoongArchELFObjectWriter::~LoongArchELFObjectWriter() {} +LoongArchELFObjectWriter::~LoongArchELFObjectWriter() = default;  unsigned LoongArchELFObjectWriter::getRelocType(const MCFixup &Fixup,                                                  const MCValue &Target, diff --git a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCCodeEmitter.cpp b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCCodeEmitter.cpp index f0e2bc4..08fa51d 100644 --- a/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCCodeEmitter.cpp +++ b/llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchMCCodeEmitter.cpp @@ -38,7 +38,7 @@ public:    LoongArchMCCodeEmitter(MCContext &ctx, MCInstrInfo const &MCII)        : Ctx(ctx), MCII(MCII) {} -  ~LoongArchMCCodeEmitter() override {} +  ~LoongArchMCCodeEmitter() override = default;    void encodeInstruction(const MCInst &MI, SmallVectorImpl<char> &CB,                           SmallVectorImpl<MCFixup> &Fixups,  | 
