[llvm-bugs] [Bug 51396] New: __divdf3 returns zero with some extreme values
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Aug 6 19:03:12 PDT 2021
https://bugs.llvm.org/show_bug.cgi?id=51396
Bug ID: 51396
Summary: __divdf3 returns zero with some extreme values
Product: compiler-rt
Version: 11.0
Hardware: Other
OS: other
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: aykevanlaethem at gmail.com
CC: llvm-bugs at lists.llvm.org
I've found that __divdf3 returns an incorrect result for a specific input.
Specifically:
a = 1.7112092293746032e-193 (raw bits: 0x17E8FBBB7CBDC600)
b = 8.858903059828881e+116 (raw bits: 0x58367bbed68d8223)
result = __divdf3(a, b)
I've found that the output is 0, while all hardware implementations I've tested
this code with return a non-zero value: 1.9316265431712e-310 (raw bits:
0x0000238ee05c879e). Therefore, I think this is a bug in __divdf3.
In practice, this issue causes the math package in Go to fail the tests when
compiled with TinyGo and when using the compiler-rt library on a baremetal
system.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210807/b378f5d8/attachment.html>
More information about the llvm-bugs
mailing list