[PATCH] D152952: [RISCV] Remove fcvt.d.l(u) and fcvt.l(u).d instructions with _IN32X suffix.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 14 12:56:20 PDT 2023
craig.topper created this revision.
craig.topper added reviewers: asb, jrtc27, sunshaoce.
Herald added subscribers: jobnoorman, luke, VincentWu, vkmr, frasercrmck, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya, arichardson.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
This is the same as D152950 <https://reviews.llvm.org/D152950> without depending on D152948 <https://reviews.llvm.org/D152948>.
_IN32X instructions are for Zdinx on RV32 where doubles are split
across 2 registers.
fcvt.d.l(u) and fcvt.l(u).d are RV64 only instructions so we don't
need _IN32X versions of them.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152952
Files:
llvm/lib/Target/RISCV/RISCVInstrInfoD.td
Index: llvm/lib/Target/RISCV/RISCVInstrInfoD.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoD.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoD.td
@@ -85,6 +85,11 @@
defvar FDINX = [FD, FD_INX, FD_IN32X];
defvar XDINX = [XD, XD_INX, XD_IN32X];
+// Lists without the IN32X classes that aren't needed for some RV64-only
+// instructions.
+defvar DXINXRV64 = [DX, DX_INX];
+defvar XDINXRV64 = [XD, XD_INX];
+
//===----------------------------------------------------------------------===//
// Instructions
//===----------------------------------------------------------------------===//
@@ -160,20 +165,20 @@
defm FCVT_D_WU : FPUnaryOp_r_m<0b1101001, 0b00001, 0b000, DXINX, "fcvt.d.wu">,
Sched<[WriteFCvtI32ToF64, ReadFCvtI32ToF64]>;
-defm FCVT_L_D : FPUnaryOp_r_frm_m<0b1100001, 0b00010, XDINX, "fcvt.l.d", [IsRV64]>,
+defm FCVT_L_D : FPUnaryOp_r_frm_m<0b1100001, 0b00010, XDINXRV64, "fcvt.l.d", [IsRV64]>,
Sched<[WriteFCvtF64ToI64, ReadFCvtF64ToI64]>;
-defm FCVT_LU_D : FPUnaryOp_r_frm_m<0b1100001, 0b00011, XDINX, "fcvt.lu.d", [IsRV64]>,
+defm FCVT_LU_D : FPUnaryOp_r_frm_m<0b1100001, 0b00011, XDINXRV64, "fcvt.lu.d", [IsRV64]>,
Sched<[WriteFCvtF64ToI64, ReadFCvtF64ToI64]>;
let Predicates = [HasStdExtD, IsRV64], mayRaiseFPException = 0 in
def FMV_X_D : FPUnaryOp_r<0b1110001, 0b00000, 0b000, GPR, FPR64, "fmv.x.d">,
Sched<[WriteFMovF64ToI64, ReadFMovF64ToI64]>;
-defm FCVT_D_L : FPUnaryOp_r_frm_m<0b1101001, 0b00010, DXINX, "fcvt.d.l", [IsRV64]>,
+defm FCVT_D_L : FPUnaryOp_r_frm_m<0b1101001, 0b00010, DXINXRV64, "fcvt.d.l", [IsRV64]>,
Sched<[WriteFCvtI64ToF64, ReadFCvtI64ToF64]>;
-defm FCVT_D_LU : FPUnaryOp_r_frm_m<0b1101001, 0b00011, DXINX, "fcvt.d.lu", [IsRV64]>,
+defm FCVT_D_LU : FPUnaryOp_r_frm_m<0b1101001, 0b00011, DXINXRV64, "fcvt.d.lu", [IsRV64]>,
Sched<[WriteFCvtI64ToF64, ReadFCvtI64ToF64]>;
let Predicates = [HasStdExtD, IsRV64], mayRaiseFPException = 0 in
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152952.531469.patch
Type: text/x-patch
Size: 2078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230614/965a8724/attachment.bin>
More information about the llvm-commits
mailing list