[PATCH] D145645: [RISCV] Print Zfa fli instruction FP values in a more adaptive way.

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 07:16:51 PST 2023


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM - assuming my inline comment is correct.



================
Comment at: llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp:167
     O << "nan";
-  else
-    O << RISCVLoadFPImm::getFPImm(MO.getImm());
+  } else {
+    float FPVal = RISCVLoadFPImm::getFPImm(Imm);
----------------
To check my understanding - it's okay to treat FLI.D (doubles) as floats here since the only values for doubles which aren't representable exactly as floats are the ones we explicitly emit symbolically just above?  And the same basic argument for floats?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145645



More information about the llvm-commits mailing list