summaryrefslogtreecommitdiffstats
path: root/clang/test/Index/annotate-comments-availability-attrs.cpp
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2012-10-18 13:16:11 +0000
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2012-10-18 13:16:11 +0000
commitd34b5bd610c56354810e154c11b0119e657aa452 (patch)
treeb1e8506c2ac5afb2ff8f9ebe99ba8a76d87a271f /clang/test/Index/annotate-comments-availability-attrs.cpp
parentb9fdf27357d2702a6ec90f063cd14d052e86b953 (diff)
downloadbcm5719-llvm-d34b5bd610c56354810e154c11b0119e657aa452.tar.gz
bcm5719-llvm-d34b5bd610c56354810e154c11b0119e657aa452.zip
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
Diffstat (limited to 'clang/test/Index/annotate-comments-availability-attrs.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud