[llvm-branch-commits] [compiler-rt-branch] r295217 - Merging r292257:

Hans Wennborg via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Wed Feb 15 11:02:22 PST 2017


Author: hans
Date: Wed Feb 15 13:02:22 2017
New Revision: 295217

URL: http://llvm.org/viewvc/llvm-project?rev=295217&view=rev
Log:
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
------------------------------------------------------------------------

Modified:
    compiler-rt/branches/release_40/   (props changed)
    compiler-rt/branches/release_40/test/builtins/Unit/fixunsdfdi_test.c
    compiler-rt/branches/release_40/test/builtins/Unit/fixunssfdi_test.c

Propchange: compiler-rt/branches/release_40/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Feb 15 13:02:22 2017
@@ -1 +1 @@
-/compiler-rt/trunk:292517,293120,293536,294425,294806,294886
+/compiler-rt/trunk:292257,292517,293120,293536,294425,294806,294886

Modified: compiler-rt/branches/release_40/test/builtins/Unit/fixunsdfdi_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_40/test/builtins/Unit/fixunsdfdi_test.c?rev=295217&r1=295216&r2=295217&view=diff
==============================================================================
--- compiler-rt/branches/release_40/test/builtins/Unit/fixunsdfdi_test.c (original)
+++ compiler-rt/branches/release_40/test/builtins/Unit/fixunsdfdi_test.c Wed Feb 15 13:02:22 2017
@@ -95,9 +95,6 @@ int main()
     if (test__fixunsdfdi(0x1.FFFFFFFFFFFFEp+62, 0x7FFFFFFFFFFFF800LL))
         return 1;
 
-    if (test__fixunsdfdi(0x1.p+64, 0xFFFFFFFFFFFFFFFFLL))
-        return 1;
-
 #if !TARGET_LIBGCC
     if (test__fixunsdfdi(-0x1.FFFFFFFFFFFFFp+62, 0))
         return 1;

Modified: compiler-rt/branches/release_40/test/builtins/Unit/fixunssfdi_test.c
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/branches/release_40/test/builtins/Unit/fixunssfdi_test.c?rev=295217&r1=295216&r2=295217&view=diff
==============================================================================
--- compiler-rt/branches/release_40/test/builtins/Unit/fixunssfdi_test.c (original)
+++ compiler-rt/branches/release_40/test/builtins/Unit/fixunssfdi_test.c Wed Feb 15 13:02:22 2017
@@ -79,8 +79,6 @@ int main()
         return 1;
     if (test__fixunssfdi(0x1.000000p+63F, 0x8000000000000000LL))
         return 1;
-    if (test__fixunssfdi(0x1.000000p+64F, 0xFFFFFFFFFFFFFFFFLL))
-        return 1;
     if (test__fixunssfdi(0x1.FFFFFEp+62F, 0x7FFFFF8000000000LL))
         return 1;
     if (test__fixunssfdi(0x1.FFFFFCp+62F, 0x7FFFFF0000000000LL))




More information about the llvm-branch-commits mailing list