[PATCH] D57527: Do not copy floating pointer format from aux target

Yaxun Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 31 10:47:12 PST 2019


yaxunl created this revision.
yaxunl added a reviewer: rjmccall.

rC352620 <https://reviews.llvm.org/rC352620> caused regressions because it copied floating point format from
aux target.

floating point format decides whether extended long double is supported.
It is x86_fp80 on x86 but IEEE double on amdgcn. It should be determined
by target backend therefore should not be copied.


https://reviews.llvm.org/D57527

Files:
  include/clang/Basic/TargetInfo.h


Index: include/clang/Basic/TargetInfo.h
===================================================================
--- include/clang/Basic/TargetInfo.h
+++ include/clang/Basic/TargetInfo.h
@@ -97,9 +97,6 @@
   unsigned short MaxVectorAlign;
   unsigned short MaxTLSAlign;
 
-  const llvm::fltSemantics *HalfFormat, *FloatFormat, *DoubleFormat,
-    *LongDoubleFormat, *Float128Format;
-
   ///===---- Target Data Type Query Methods -------------------------------===//
   enum IntType {
     NoInt = 0,
@@ -174,6 +171,9 @@
   bool HasFloat128;
   bool HasFloat16;
 
+  const llvm::fltSemantics *HalfFormat, *FloatFormat, *DoubleFormat,
+    *LongDoubleFormat, *Float128Format;
+
   unsigned char MaxAtomicPromoteWidth, MaxAtomicInlineWidth;
   unsigned short SimdDefaultAlign;
   std::unique_ptr<llvm::DataLayout> DataLayout;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D57527.184546.patch
Type: text/x-patch
Size: 819 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190131/31ce9701/attachment.bin>


More information about the cfe-commits mailing list