From d674d96bc56c0f377879d01c9d8dfdaaa7859cdb Mon Sep 17 00:00:00 2001 From: Eli Friedman Date: Tue, 19 Mar 2019 21:55:58 +0000 Subject: [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/test/builtins/Unit/divtf3_test.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'compiler-rt/test/builtins/Unit/divtf3_test.c') 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"); -- cgit v1.2.3