Skip to content

Commit 8ecc852

Browse files
committed
[FPEnv] [Clang] Enable constrained FP support for PowerPC
d4ce862 introduced HasStrictFP to disable generating constrained FP operations for platforms lacking support. Since work for enabling constrained FP on PowerPC is almost done, we'd like to enable it. Reviewed By: kpn, steven.zhang Differential Revision: https://reviews.llvm.org/D87223
1 parent bd2f7ad commit 8ecc852

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

clang/lib/Basic/Targets/PPC.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ class LLVM_LIBRARY_VISIBILITY PPCTargetInfo : public TargetInfo {
8282
SimdDefaultAlign = 128;
8383
LongDoubleWidth = LongDoubleAlign = 128;
8484
LongDoubleFormat = &llvm::APFloat::PPCDoubleDouble();
85+
HasStrictFP = true;
8586
}
8687

8788
// Set the language option for altivec based on our value.

clang/test/CodeGen/builtins-ppc-fpconstrained.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,12 @@
22
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
33
// RUN: -emit-llvm %s -o - | FileCheck --check-prefix=CHECK-UNCONSTRAINED %s
44
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
5-
// RUN: -fexperimental-strict-floating-point \
65
// RUN: -ffp-exception-behavior=strict -emit-llvm %s -o - | FileCheck \
76
// RUN: --check-prefix=CHECK-CONSTRAINED -vv %s
87
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
98
// RUN: -fallow-half-arguments-and-returns -S -o - %s | \
109
// RUN: FileCheck --check-prefix=CHECK-ASM --check-prefix=NOT-FIXME-CHECK %s
1110
// RUN: %clang_cc1 -triple powerpc64le-gnu-linux -target-feature +vsx \
12-
// RUN: -fexperimental-strict-floating-point \
1311
// RUN: -fallow-half-arguments-and-returns -S -ffp-exception-behavior=strict \
1412
// RUN: -o - %s | FileCheck --check-prefix=CHECK-ASM \
1513
// RUN: --check-prefix=FIXME-CHECK %s

0 commit comments

Comments
 (0)