summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/x86-long-double.cpp
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2019-07-12 02:32:15 +0000
committerFangrui Song <maskray@google.com>2019-07-12 02:32:15 +0000
commitc46d78d1b7a06aad11f8810279271224fc8466af (patch)
tree0198801636fef0431e53fabc96c0af74f012b005 /clang/test/CodeGen/x86-long-double.cpp
parentca39bb388095aeab6a3246b177c938838afa6cc7 (diff)
downloadbcm5719-llvm-c46d78d1b7a06aad11f8810279271224fc8466af.tar.gz
bcm5719-llvm-c46d78d1b7a06aad11f8810279271224fc8466af.zip
[X86][PowerPC] Support -mlong-double-128
This patch makes the driver option -mlong-double-128 available for X86 and PowerPC. The CC1 option -mlong-double-128 is available on all targets for users to test on unsupported targets. On PowerPC, -mlong-double-128 uses the IBM extended double format because we don't support -mabi=ieeelongdouble yet (D64283). Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D64277 llvm-svn: 365866
Diffstat (limited to 'clang/test/CodeGen/x86-long-double.cpp')
-rw-r--r--clang/test/CodeGen/x86-long-double.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/CodeGen/x86-long-double.cpp b/clang/test/CodeGen/x86-long-double.cpp
index a05470aeab6..40ac29715fd 100644
--- a/clang/test/CodeGen/x86-long-double.cpp
+++ b/clang/test/CodeGen/x86-long-double.cpp
@@ -16,6 +16,15 @@
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin -mlong-double-64 | \
// RUN: FileCheck --check-prefixes=FP64,FP64-X64 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686 -mlong-double-128 | \
+// RUN: FileCheck --check-prefix=FP128 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686-apple-darwin -mlong-double-128 | \
+// RUN: FileCheck --check-prefix=FP128 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64 -mlong-double-128 | \
+// RUN: FileCheck --check-prefix=FP128 %s
+// RUN: %clang_cc1 %s -emit-llvm -o - -triple=x86_64-apple-darwin -mlong-double-128 | \
+// RUN: FileCheck --check-prefix=FP128 %s
+
// Check -malign-double increases the alignment from 4 to 8 on x86-32.
// RUN: %clang_cc1 %s -emit-llvm -o - -triple=i686 -mlong-double-64 \
// RUN: -malign-double | FileCheck --check-prefixes=FP64,FP64-X64 %s
@@ -37,7 +46,11 @@ int size = sizeof(x);
// FP64-X64: @x = global double {{.*}}, align 8
// FP64-X64: @size = global i32 8
+// FP128: @x = global fp128 {{.*}}, align 16
+// FP128: @size = global i32 16
+
long double foo(long double d) { return d; }
// FP64: double @_Z3fooe(double %d)
// FP80: x86_fp80 @_Z3fooe(x86_fp80 %d)
+// FP128: fp128 @_Z3foog(fp128 %d)
OpenPOWER on IntegriCloud