[PATCH] D139391: [RISCV] Codegen support for Zfhmin.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 6 15:14:13 PST 2022


craig.topper added inline comments.


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:288
+      const MachineFunction *MF = MBB.getParent();
+      const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
+      MCRegister F32DstReg = TRI->getMatchingSuperReg(DstReg, RISCV::sub_16,
----------------
I think you can use `const TargetRegisterInfo *TRI = STI.getRegisterInfo()`


================
Comment at: llvm/lib/Target/RISCV/RISCVInstrInfo.cpp:289
+      const TargetRegisterInfo *TRI = MF->getSubtarget().getRegisterInfo();
+      MCRegister F32DstReg = TRI->getMatchingSuperReg(DstReg, RISCV::sub_16,
+                                                      &RISCV::FPR32RegClass);
----------------
If we assigned over DstReg and SrcReg here and did `Opc = FSGNJ_S` and `IsScalableVector = false`, would the common code at the end still work?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D139391/new/

https://reviews.llvm.org/D139391



More information about the llvm-commits mailing list