[PATCH] D15120: Add support for __float128 type to be used by targets that support it
Hubert Tong via cfe-commits
cfe-commits at lists.llvm.org
Tue Feb 9 16:02:32 PST 2016
hubert.reinterpretcast added inline comments.
================
Comment at: lib/Basic/TargetInfo.cpp:231
@@ +230,3 @@
+ if (hasFloat128Type() &&
+ &getFloat128Format() == &llvm::APFloat::IEEEquad)
+ return Float128;
----------------
Is it necessary to check that `__float128` is IEEE quad here? Unlike the long double cases, `__float128` really better be 128 bits.
================
Comment at: lib/Sema/SemaExpr.cpp:1169
@@ +1168,3 @@
+ if (LHSElemType == S.Context.Float128Ty &&
+ RHSElemType == S.Context.LongDoubleTy)
+ return true;
----------------
I do not believe that the width of `long double` is sufficiently established to be the same as that of `__float128` in this context.
================
Comment at: lib/Sema/SemaExpr.cpp:1341
@@ +1340,3 @@
+ // Diagnose builtin types that have the same size and different representation
+ // as conversions between such type currently can't be handled.
+ if (sameWidthDifferentRepresentation(*this, LHSType, RHSType))
----------------
s/such type/such types;
================
Comment at: lib/Sema/SemaOverload.cpp:1655
@@ -1654,1 +1654,3 @@
} else if (FromType->isRealFloatingType() && ToType->isRealFloatingType()) {
+ // FIXME: disable conversions between long double and __float128 if
+ // their representation is different until there is back end support
----------------
Is conversion between `long double` and `__float128` the correct characterization of the missing back-end support? (as opposed to conversion between `PPCDoubleDouble` and `IEEEquad`)
Repository:
rL LLVM
http://reviews.llvm.org/D15120
More information about the cfe-commits
mailing list