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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 8 20:09:23 PST 2023


craig.topper created this revision.
craig.topper added reviewers: reames, asb, joshua-arch1.
Herald added subscribers: luke, 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, 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.

Previously, we printed all constants in scientific notation with
6 digits of precision. This is not enough to accurately display
the smallest value, but increasing the precision would be too much
for other values.

This patch prints values with fractional bits using only as many digits as
needed. 1*2^-15 and 1*2^-16 will be printed in scientific notation while
the others are printed without scientific notation. The integer values
are printed with a single 0 after the decimal point.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D145645

Files:
  llvm/lib/Target/RISCV/MCTargetDesc/RISCVInstPrinter.cpp
  llvm/test/CodeGen/RISCV/double-zfa.ll
  llvm/test/CodeGen/RISCV/float-zfa.ll
  llvm/test/CodeGen/RISCV/half-zfa.ll
  llvm/test/MC/RISCV/zfa-valid.s

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145645.503604.patch
Type: text/x-patch
Size: 28718 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230309/b500c27e/attachment.bin>


More information about the llvm-commits mailing list