Skip to content
This repository was archived by the owner on Apr 23, 2020. It is now read-only.

Commit 3a7308f

Browse files
committed
[SystemZ] Do not support __float128
As of rev. 268898, clang supports __float128 on SystemZ. This seems to have been in error. GCC has never supported __float128 on SystemZ, since the "long double" type on the platform is already IEEE-128. (GCC only supports __float128 on platforms where "long double" is some other data type.) For compatibility reasons this patch removes __float128 on SystemZ again. The test case is updated accordingly. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@348247 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent dee7e8f commit 3a7308f

File tree

2 files changed

+1
-27
lines changed

2 files changed

+1
-27
lines changed

lib/Basic/Targets/OSTargets.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,6 @@ class LLVM_LIBRARY_VISIBILITY LinuxTargetInfo : public OSTargetInfo<Target> {
364364
break;
365365
case llvm::Triple::x86:
366366
case llvm::Triple::x86_64:
367-
case llvm::Triple::systemz:
368367
this->HasFloat128 = true;
369368
break;
370369
}

test/CodeGenCXX/float128-declarations.cpp

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@
66
// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
77
// RUN: %clang_cc1 -emit-llvm -triple x86_64-unknown-linux-gnu -std=c++11 \
88
// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
9-
// RUN: %clang_cc1 -emit-llvm -triple systemz-unknown-linux-gnu -std=c++11 \
10-
// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-SYSZ
119
// RUN: %clang_cc1 -emit-llvm -triple i686-pc-openbsd -std=c++11 \
1210
// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
1311
// RUN: %clang_cc1 -emit-llvm -triple amd64-pc-openbsd -std=c++11 \
@@ -18,8 +16,7 @@
1816
// RUN: %s -o - | FileCheck %s -check-prefix=CHECK-X86
1917
//
2018
/* Various contexts where type __float128 can appear. The different check
21-
prefixes are due to different mangling on X86 and different calling
22-
convention on SystemZ. */
19+
prefixes are due to different mangling on X86. */
2320

2421
/* Namespace */
2522
namespace {
@@ -122,25 +119,3 @@ int main(void) {
122119
// CHECK-X86-DAG: [[F4L:%[a-z0-9]+]] = load fp128, fp128* %f4l
123120
// CHECK-X86-DAG: [[INC:%[a-z0-9]+]] = fadd fp128 [[F4L]], 0xL00000000000000003FFF000000000000
124121
// CHECK-X86-DAG: store fp128 [[INC]], fp128* %f4l
125-
126-
// CHECK-SYSZ-DAG: @_ZN12_GLOBAL__N_13f1nE = internal global fp128 0xL00000000000000000000000000000000
127-
// CHECK-SYSZ-DAG: @_ZN12_GLOBAL__N_13f2nE = internal global fp128 0xL00000000000000004004080000000000
128-
// CHECK-SYSZ-DAG: @_ZN12_GLOBAL__N_15arr1nE = internal global [10 x fp128]
129-
// CHECK-SYSZ-DAG: @_ZN12_GLOBAL__N_15arr2nE = internal global [3 x fp128] [fp128 0xL33333333333333333FFF333333333333, fp128 0xL00000000000000004000800000000000, fp128 0xL00000000000000004025176592E00000]
130-
// CHECK-SYSZ-DAG: define internal void @_ZN12_GLOBAL__N_16func1nERKU10__float128(fp128*
131-
// CHECK-SYSZ-DAG: @f1f = global fp128 0xL00000000000000000000000000000000
132-
// CHECK-SYSZ-DAG: @f2f = global fp128 0xL33333333333333334004033333333333
133-
// CHECK-SYSZ-DAG: @arr1f = global [10 x fp128]
134-
// CHECK-SYSZ-DAG: @arr2f = global [3 x fp128] [fp128 0xL3333333333333333BFFF333333333333, fp128 0xL0000000000000000C000800000000000, fp128 0xL0000000000000000C025176592E00000]
135-
// CHECK-SYSZ-DAG: declare void @_Z6func1fU10__float128(fp128*
136-
// CHECK-SYSZ-DAG: define linkonce_odr void @_ZN2C1C2EU10__float128(%class.C1* %this, fp128*
137-
// CHECK-SYSZ-DAG: define linkonce_odr void @_ZN2C16func2cEU10__float128(fp128*
138-
// CHECK-SYSZ-DAG: define linkonce_odr void @_Z6func1tIU10__float128ET_S0_(fp128*
139-
// CHECK-SYSZ-DAG: @__const.main.s1 = private unnamed_addr constant %struct.S1 { fp128 0xL00000000000000004006080000000000 }
140-
// CHECK-SYSZ-DAG: store fp128 0xLF0AFD0EBFF292DCE42E0B38CDD83F26F, fp128* %f1l, align 16
141-
// CHECK-SYSZ-DAG: store fp128 0xL00000000000000008000000000000000, fp128* %f2l, align 16
142-
// CHECK-SYSZ-DAG: store fp128 0xLFFFFFFFFFFFFFFFF7FFEFFFFFFFFFFFF, fp128* %f3l, align 16
143-
// CHECK-SYSZ-DAG: store fp128 0xL0000000000000000BFFF000000000000, fp128* %f5l, align 16
144-
// CHECK-SYSZ-DAG: [[F4L:%[a-z0-9]+]] = load fp128, fp128* %f4l
145-
// CHECK-SYSZ-DAG: [[INC:%[a-z0-9]+]] = fadd fp128 [[F4L]], 0xL00000000000000003FFF000000000000
146-
// CHECK-SYSZ-DAG: store fp128 [[INC]], fp128* %f4l

0 commit comments

Comments
 (0)