This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] [test] [builtins] Remove obsolete/UB tests in __fixuns?fdi based
ClosedPublic

Authored by mgorny on Dec 28 2016, 3:36 PM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

mgorny updated this revision to Diff 82625.Dec 28 2016, 3:36 PM
mgorny retitled this revision from to [compiler-rt] [test] [builtins] Remove obsolete/UB tests in __fixuns?fdi based.
mgorny updated this object.
mgorny added reviewers: ddunbar, sdmitrouk, dschuff.
mgorny added a subscriber: cfe-commits.
ddunbar resigned from this revision.Jan 17 2017, 11:37 AM
dschuff accepted this revision.Jan 17 2017, 11:42 AM

I don't have any particular ownership or knowledge of this file, but the change still LGTM

This revision is now accepted and ready to land.Jan 17 2017, 11:42 AM
This revision was automatically updated to reflect the committed changes.