1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2025-01-31 20:51:52 +01:00
Ulrich Weigand 2248bca601 This patch fixes failures in the SingleSource/Regression/C/uint64_to_float
test case on PowerPC caused by rounding errors when converting from a 64-bit
integer to a single-precision floating point. The reason for this are
double-rounding effects, since on PowerPC we have to convert to an
intermediate double-precision value first, which gets rounded to the
final single-precision result.

The patch fixes the problem by preparing the 64-bit integer so that the
first conversion step to double-precision will always be exact, and the
final rounding step will result in the correctly-rounded single-precision
result.  The generated code sequence is equivalent to what GCC would generate.

When -enable-unsafe-fp-math is in effect, that extra effort is omitted
and we accept possible rounding errors (just like GCC does as well).

llvm-svn: 166178
2012-10-18 13:16:11 +00:00
..
2011-05-02 15:58:16 +00:00
2012-06-19 21:46:25 +00:00
2010-07-16 22:51:10 +00:00
2010-03-28 07:58:37 +00:00
2012-10-11 15:38:20 +00:00
2012-10-05 13:32:38 +00:00
2012-08-28 02:10:15 +00:00
2011-05-02 15:58:16 +00:00
2010-01-05 17:55:26 +00:00
2012-08-28 02:10:33 +00:00
2010-11-14 22:22:14 +00:00
2010-11-14 22:22:14 +00:00
2012-10-16 13:30:53 +00:00
2012-10-16 13:30:53 +00:00
2010-01-21 20:01:04 +00:00
2012-06-04 17:36:38 +00:00
2010-11-14 22:22:14 +00:00