[PATCH] D114081: [flang] Fix printing of constc and parsing of #fir.real

Eric Schweitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 18 14:10:06 PST 2021


schweitz added a comment.

Thanks for cleaning this up. We had some early and convoluted workarounds to support precisions more than double in the early days of MLIR.



================
Comment at: flang/lib/Optimizer/Dialect/FIRAttr.cpp:167
+    const llvm::fltSemantics &sem{kindMap.getFloatSemantics(kind)};
+    unsigned int numBits{llvm::APFloat::semanticsSizeInBits(sem)};
+    auto bits = llvm::APInt(numBits, hex.drop_front(), 16);
----------------
LLVM convention is to prefer `=` for these.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114081



More information about the llvm-commits mailing list