aboutsummaryrefslogtreecommitdiff
path: root/lib/Support/APFloat.cpp
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-04 22:11:11 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-04 22:11:11 +0000
commitc82ad72f63369bc462e59458f09960d66daa58a9 (patch)
tree58bc455a8d052220f9ae11e65d6f06d671a7a4c4 /lib/Support/APFloat.cpp
parentb915e9e0fc85ba6f398b3fab0db6a81a8913af94 (diff)
Vendor import of llvm trunk r291012:vendor/llvm/llvm-trunk-r291012
Notes
Notes: svn path=/vendor/llvm/dist/; revision=311315 svn path=/vendor/llvm/llvm-trunk-r291012/; revision=311316; tag=vendor/llvm/llvm-trunk-r291012
Diffstat (limited to 'lib/Support/APFloat.cpp')
-rw-r--r--lib/Support/APFloat.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/Support/APFloat.cpp b/lib/Support/APFloat.cpp
index 30f0deab90a0..4cfbbf8645e0 100644
--- a/lib/Support/APFloat.cpp
+++ b/lib/Support/APFloat.cpp
@@ -76,8 +76,12 @@ namespace llvm {
compile-time arithmetic on PPC double-double numbers, it is not able
to represent all possible values held by a PPC double-double number,
for example: (long double) 1.0 + (long double) 0x1p-106
- Should this be replaced by a full emulation of PPC double-double? */
- static const fltSemantics semPPCDoubleDouble = {0, 0, 0, 0};
+ Should this be replaced by a full emulation of PPC double-double?
+
+ Note: we need to make the value different from semBogus as otherwise
+ an unsafe optimization may collapse both values to a single address,
+ and we heavily rely on them having distinct addresses. */
+ static const fltSemantics semPPCDoubleDouble = {-1, 0, 0, 0};
/* There are temporary semantics for the real PPCDoubleDouble implementation.
Currently, APFloat of PPCDoubleDouble holds one PPCDoubleDoubleImpl as the