[builtins] Divide shouldn't underflow if rounded result would be normal.
authorEli Friedman <efriedma@quicinc.com>
Tue, 19 Mar 2019 21:55:58 +0000 (21:55 +0000)
committerEli Friedman <efriedma@quicinc.com>
Tue, 19 Mar 2019 21:55:58 +0000 (21:55 +0000)
commitd674d96bc56c0f377879d01c9d8dfdaaa7859cdb
tree869005e7206fd8c7489d59822fddf38f6e0d319f
parent4d03bbbb3aa8d7d12941f9743b87f430e1f3d92d
[builtins] Divide shouldn't underflow if rounded result would be normal.

We were treating certain edge cases that are actually normal as denormal
results, and flushing them to zero; we shouldn't do that. Not sure this
is the cleanest way to implement this edge case, but I wanted to avoid
adding any code on the common path.

Differential Revision: https://reviews.llvm.org/D59070

llvm-svn: 356529
compiler-rt/lib/builtins/divdf3.c
compiler-rt/lib/builtins/divsf3.c
compiler-rt/lib/builtins/divtf3.c
compiler-rt/test/builtins/Unit/divdf3_test.c [new file with mode: 0644]
compiler-rt/test/builtins/Unit/divsf3_test.c [new file with mode: 0644]
compiler-rt/test/builtins/Unit/divtf3_test.c