diff options
| author | Eli Friedman <efriedma@quicinc.com> | 2019-03-19 21:55:58 +0000 |
|---|---|---|
| committer | Eli Friedman <efriedma@quicinc.com> | 2019-03-19 21:55:58 +0000 |
| commit | d674d96bc56c0f377879d01c9d8dfdaaa7859cdb (patch) | |
| tree | 869005e7206fd8c7489d59822fddf38f6e0d319f /compiler-rt/test/builtins/Unit/divtf3_test.c | |
| parent | 4d03bbbb3aa8d7d12941f9743b87f430e1f3d92d (diff) | |
| download | bcm5719-llvm-d674d96bc56c0f377879d01c9d8dfdaaa7859cdb.tar.gz bcm5719-llvm-d674d96bc56c0f377879d01c9d8dfdaaa7859cdb.zip | |
[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
Diffstat (limited to 'compiler-rt/test/builtins/Unit/divtf3_test.c')
| -rw-r--r-- | compiler-rt/test/builtins/Unit/divtf3_test.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/compiler-rt/test/builtins/Unit/divtf3_test.c b/compiler-rt/test/builtins/Unit/divtf3_test.c index a9ff43e3885..23e1b5580b8 100644 --- a/compiler-rt/test/builtins/Unit/divtf3_test.c +++ b/compiler-rt/test/builtins/Unit/divtf3_test.c @@ -28,8 +28,8 @@ int test__divtf3(long double a, long double b, int ret = compareResultLD(x, expectedHi, expectedLo); if (ret){ - printf("error in test__divtf3(%.20Lf, %.20Lf) = %.20Lf, " - "expected %.20Lf\n", a, b, x, + printf("error in test__divtf3(%.20Le, %.20Le) = %.20Le, " + "expected %.20Le\n", a, b, x, fromRep128(expectedHi, expectedLo)); } return ret; @@ -86,6 +86,11 @@ int main() UINT64_C(0x50bf2e02f0798d36), UINT64_C(0x5e6fcb6b60044078))) return 1; + if (test__divtf3(6.72420628622418701252535563464350521E-4932L, + 2.L, + UINT64_C(0x0001000000000000), + UINT64_C(0))) + return 1; #else printf("skipped\n"); |

