[PATCH] D103235: [SPE] Disable strict-fp for SPE by default
Qiu Chaofan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 27 03:37:27 PDT 2021
qiucf created this revision.
qiucf added reviewers: nemanjai, jhibbits, vit9696, kpn.
Herald added subscribers: steven.zhang, kbarton.
qiucf requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
As discussed in PR50385 <https://bugs.llvm.org/show_bug.cgi?id=50385>, strict-fp on PowerPC SPE has not been handled well. This patch disables it by default for SPE.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D103235
Files:
clang/lib/Basic/Targets/PPC.cpp
clang/test/CodeGen/builtins-ppc-fpconstrained.c
Index: clang/test/CodeGen/builtins-ppc-fpconstrained.c
===================================================================
--- clang/test/CodeGen/builtins-ppc-fpconstrained.c
+++ clang/test/CodeGen/builtins-ppc-fpconstrained.c
@@ -11,6 +11,9 @@
// RUN: -fallow-half-arguments-and-returns -S -ffp-exception-behavior=strict \
// RUN: -o - %s | FileCheck --check-prefix=CHECK-ASM \
// RUN: --check-prefix=FIXME-CHECK %s
+// RUN: %clang_cc1 -triple powerpcspe -S -ffp-exception-behavior=strict \
+// RUN: -target-feature +spe -fexperimental-strict-floating-point -emit-llvm \
+// RUN: %s -o - | FileCheck --check-prefix=CHECK-CONSTRAINED %s
typedef __attribute__((vector_size(4 * sizeof(float)))) float vec_float;
typedef __attribute__((vector_size(2 * sizeof(double)))) double vec_double;
Index: clang/lib/Basic/Targets/PPC.cpp
===================================================================
--- clang/lib/Basic/Targets/PPC.cpp
+++ clang/lib/Basic/Targets/PPC.cpp
@@ -59,6 +59,7 @@
} else if (Feature == "+prefix-instrs") {
HasPrefixInstrs = true;
} else if (Feature == "+spe" || Feature == "+efpu2") {
+ HasStrictFP = false;
HasSPE = true;
LongDoubleWidth = LongDoubleAlign = 64;
LongDoubleFormat = &llvm::APFloat::IEEEdouble();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103235.348209.patch
Type: text/x-patch
Size: 1282 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210527/76b14066/attachment.bin>
More information about the cfe-commits
mailing list