[PATCH] D139105: [RISCV] Add correct predicate over FMV instructions
Konstantin Vladimirov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 05:36:05 PST 2022
kv-sc created this revision.
Herald added subscribers: sunshaoce, VincentWu, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, shiva0217, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, asb, hiraditya, arichardson.
Herald added a project: All.
kv-sc requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.
Restricts FMV usage for subtargets without 'f' extension.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D139105
Files:
llvm/lib/Target/RISCV/RISCVInstrInfoF.td
Index: llvm/lib/Target/RISCV/RISCVInstrInfoF.td
===================================================================
--- llvm/lib/Target/RISCV/RISCVInstrInfoF.td
+++ llvm/lib/Target/RISCV/RISCVInstrInfoF.td
@@ -372,7 +372,7 @@
Sched<[WriteFCvtF32ToI32, ReadFCvtF32ToI32]>;
defm : FPUnaryOpDynFrmAlias_m<FCVT_WU_S, "fcvt.wu.s", XFINX>;
-let mayRaiseFPException = 0 in
+let Predicates = [HasStdExtF], mayRaiseFPException = 0 in
def FMV_X_W : FPUnaryOp_r<0b1110000, 0b00000, 0b000, GPR, FPR32, "fmv.x.w">,
Sched<[WriteFMovF32ToI32, ReadFMovF32ToI32]>;
@@ -394,7 +394,7 @@
Sched<[WriteFCvtI32ToF32, ReadFCvtI32ToF32]>;
defm : FPUnaryOpDynFrmAlias_m<FCVT_S_WU, "fcvt.s.wu", FXINX>;
-let mayRaiseFPException = 0 in
+let Predicates = [HasStdExtF], mayRaiseFPException = 0 in
def FMV_W_X : FPUnaryOp_r<0b1111000, 0b00000, 0b000, FPR32, GPR, "fmv.w.x">,
Sched<[WriteFMovI32ToF32, ReadFMovI32ToF32]>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D139105.479259.patch
Type: text/x-patch
Size: 988 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20221201/93133725/attachment.bin>
More information about the llvm-commits
mailing list