Skip to content
This repository was archived by the owner on May 21, 2019. It is now read-only.

Commit 84c9f24

Browse files
committed
Merging r292257:
------------------------------------------------------------------------ r292257 | mgorny | 2017-01-17 13:08:25 -0800 (Tue, 17 Jan 2017) | 17 lines [test] [builtins] Remove obsolete/UB tests in __fixuns?fdi based Remove the failing tests for __fixunssfdi() and __fixunsdfdi() that relied on undefined (and most likely obsolete in terms of compiler-rt implementation behavior). Both tests presumed that 0x1.p+64 would be converted to 0xFFFFFFFFFFFFFFFFLL, that is the largest value in uint64 range. However, the C/C++ standards do not specify the behavior for converting a floating-point value to an integer of smaller range, and in this case both libgcc and compiler-rt implementations return 0 instead. Since the current behavior is correct with regards to standards and there is no good way of expressing 0xFFFFFFFFFFFFFFFFLL in single- or double-precision float, I've removed the failing test altogether. Differential Revision: https://reviews.llvm.org/D28146 ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/compiler-rt/branches/release_40@295217 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 31cead5 commit 84c9f24

File tree

2 files changed

+0
-5
lines changed

2 files changed

+0
-5
lines changed

test/builtins/Unit/fixunsdfdi_test.c

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,9 +95,6 @@ int main()
9595
if (test__fixunsdfdi(0x1.FFFFFFFFFFFFEp+62, 0x7FFFFFFFFFFFF800LL))
9696
return 1;
9797

98-
if (test__fixunsdfdi(0x1.p+64, 0xFFFFFFFFFFFFFFFFLL))
99-
return 1;
100-
10198
#if !TARGET_LIBGCC
10299
if (test__fixunsdfdi(-0x1.FFFFFFFFFFFFFp+62, 0))
103100
return 1;

test/builtins/Unit/fixunssfdi_test.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,6 @@ int main()
7979
return 1;
8080
if (test__fixunssfdi(0x1.000000p+63F, 0x8000000000000000LL))
8181
return 1;
82-
if (test__fixunssfdi(0x1.000000p+64F, 0xFFFFFFFFFFFFFFFFLL))
83-
return 1;
8482
if (test__fixunssfdi(0x1.FFFFFEp+62F, 0x7FFFFF8000000000LL))
8583
return 1;
8684
if (test__fixunssfdi(0x1.FFFFFCp+62F, 0x7FFFFF0000000000LL))

0 commit comments

Comments
 (0)