diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoD.td b/llvm/lib/Target/RISCV/RISCVInstrInfoD.td index 1e551cca7ef2f3..01b10fe15382c3 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoD.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoD.td @@ -281,11 +281,8 @@ def : Pat<(fma (fneg FPR64:$rs1), FPR64:$rs2, FPR64:$rs3), def : Pat<(fma (fneg FPR64:$rs1), FPR64:$rs2, (fneg FPR64:$rs3)), (FNMADD_D FPR64:$rs1, FPR64:$rs2, FPR64:$rs3, 0b111)>; -// The RISC-V 2.2 user-level ISA spec defines fmin and fmax as returning the -// canonical NaN when giving a signaling NaN. This doesn't match the LLVM -// behaviour (see https://bugs.llvm.org/show_bug.cgi?id=27363). However, the -// draft 2.3 ISA spec changes the definition of fmin and fmax in a way that -// matches LLVM's fminnum and fmaxnum +// The ratified 20191213 ISA spec defines fmin and fmax in a way that matches +// LLVM's fminnum and fmaxnum. // . def : PatFpr64Fpr64; def : PatFpr64Fpr64; diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td index d311c35444598c..bdc6b319016a33 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoF.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoF.td @@ -337,11 +337,8 @@ def : Pat<(fma (fneg FPR32:$rs1), FPR32:$rs2, FPR32:$rs3), def : Pat<(fma (fneg FPR32:$rs1), FPR32:$rs2, (fneg FPR32:$rs3)), (FNMADD_S FPR32:$rs1, FPR32:$rs2, FPR32:$rs3, 0b111)>; -// The RISC-V 2.2 user-level ISA spec defines fmin and fmax as returning the -// canonical NaN when given a signaling NaN. This doesn't match the LLVM -// behaviour (see https://bugs.llvm.org/show_bug.cgi?id=27363). However, the -// draft 2.3 ISA spec changes the definition of fmin and fmax in a way that -// matches LLVM's fminnum and fmaxnum +// The ratified 20191213 ISA spec defines fmin and fmax in a way that matches +// LLVM's fminnum and fmaxnum // . def : PatFpr32Fpr32; def : PatFpr32Fpr32; diff --git a/llvm/lib/Target/RISCV/RISCVInstrInfoZfh.td b/llvm/lib/Target/RISCV/RISCVInstrInfoZfh.td index 9337501a5a30a1..282b3a29f384d4 100644 --- a/llvm/lib/Target/RISCV/RISCVInstrInfoZfh.td +++ b/llvm/lib/Target/RISCV/RISCVInstrInfoZfh.td @@ -297,6 +297,9 @@ def : Pat<(fma (fneg FPR16:$rs1), FPR16:$rs2, FPR16:$rs3), def : Pat<(fma (fneg FPR16:$rs1), FPR16:$rs2, (fneg FPR16:$rs3)), (FNMADD_H FPR16:$rs1, FPR16:$rs2, FPR16:$rs3, 0b111)>; +// The ratified 20191213 ISA spec defines fmin and fmax in a way that matches +// LLVM's fminnum and fmaxnum +// . def : PatFpr16Fpr16; def : PatFpr16Fpr16;