[clang] [llvm] [mlir] [clang][APFloat] Print floating-point literals in the shortest round-trip form (PR #218471)

Aaron Ballman via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 17 05:51:46 PDT 2026


https://github.com/AaronBallman commented:

Generally LGTM though I did not check the implementation of the algorithm very carefully. The results look correct to me in terms of the testing changes, but I think there are some tests we should add:
```
double bar = 0x10.1p0;
```
do we correctly round-trip that or do we still convert that to a decimal value instead of the hex literal?

Another question would be: do we have sufficient test coverage for some of the odder floating-point formats like double double or all the tiny floating point types for AI?

https://github.com/llvm/llvm-project/pull/218471


More information about the llvm-commits mailing list