ygao added you to the CC list for the revision "Adding type info for f16c
floating-point type".
Hi,
The following patch adds support for half-precision floating point type
supported by the clang front-end.
Native operations on this type is supported by OpenCL and to a limited extent
by f16c (conversions are
supported); otherwise it is a storage-only type.
Could someone take a look whether this is good to go in?
- Gao.
http://llvm-reviews.chandlerc.com/D2750
Files:
lib/CodeGen/CGRTTI.cpp
test/CodeGenCXX/rtti-fundamental.cpp
Index: lib/CodeGen/CGRTTI.cpp
===================================================================
--- lib/CodeGen/CGRTTI.cpp
+++ lib/CodeGen/CGRTTI.cpp
@@ -969,7 +969,8 @@
Context.UnsignedShortTy, Context.IntTy,
Context.UnsignedIntTy, Context.LongTy,
Context.UnsignedLongTy, Context.LongLongTy,
- Context.UnsignedLongLongTy, Context.FloatTy,
+ Context.UnsignedLongLongTy,
+ Context.HalfTy, Context.FloatTy,
Context.DoubleTy, Context.LongDoubleTy,
Context.Char16Ty, Context.Char32Ty };
for (unsigned i = 0; i < llvm::array_lengthof(FundamentalTypes); ++i)
Index: test/CodeGenCXX/rtti-fundamental.cpp
===================================================================
--- test/CodeGenCXX/rtti-fundamental.cpp
+++ test/CodeGenCXX/rtti-fundamental.cpp
@@ -89,6 +89,11 @@
// CHECK: @_ZTIPy = unnamed_addr constant
// CHECK: @_ZTIPKy = unnamed_addr constant
+// half
+// CHECK: @_ZTIDh = unnamed_addr constant
+// CHECK: @_ZTIPDh = unnamed_addr constant
+// CHECK: @_ZTIPKDh = unnamed_addr constant
+
// float
// CHECK: @_ZTIf = unnamed_addr constant
// CHECK: @_ZTIPf = unnamed_addr constant
Index: lib/CodeGen/CGRTTI.cpp
===================================================================
--- lib/CodeGen/CGRTTI.cpp
+++ lib/CodeGen/CGRTTI.cpp
@@ -969,7 +969,8 @@
Context.UnsignedShortTy, Context.IntTy,
Context.UnsignedIntTy, Context.LongTy,
Context.UnsignedLongTy, Context.LongLongTy,
- Context.UnsignedLongLongTy, Context.FloatTy,
+ Context.UnsignedLongLongTy,
+ Context.HalfTy, Context.FloatTy,
Context.DoubleTy, Context.LongDoubleTy,
Context.Char16Ty, Context.Char32Ty };
for (unsigned i = 0; i < llvm::array_lengthof(FundamentalTypes); ++i)
Index: test/CodeGenCXX/rtti-fundamental.cpp
===================================================================
--- test/CodeGenCXX/rtti-fundamental.cpp
+++ test/CodeGenCXX/rtti-fundamental.cpp
@@ -89,6 +89,11 @@
// CHECK: @_ZTIPy = unnamed_addr constant
// CHECK: @_ZTIPKy = unnamed_addr constant
+// half
+// CHECK: @_ZTIDh = unnamed_addr constant
+// CHECK: @_ZTIPDh = unnamed_addr constant
+// CHECK: @_ZTIPKDh = unnamed_addr constant
+
// float
// CHECK: @_ZTIf = unnamed_addr constant
// CHECK: @_ZTIPf = unnamed_addr constant
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits