[PATCH] D159159: [PowerPC] Disable float128 on AIX in Clang
Qiu Chaofan via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Aug 29 21:01:53 PDT 2023
qiucf created this revision.
qiucf added a reviewer: PowerPC.
Herald added subscribers: steven.zhang, shchenz, kbarton, nemanjai.
Herald added a project: All.
qiucf requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.
PowerPC AIX backend does not support float128 at all. Diagnose even when specifying `-mfloat128` to avoid backend crash.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D159159
Files:
clang/lib/Basic/Targets/PPC.cpp
clang/test/Sema/128bitfloat.cpp
Index: clang/test/Sema/128bitfloat.cpp
===================================================================
--- clang/test/Sema/128bitfloat.cpp
+++ clang/test/Sema/128bitfloat.cpp
@@ -1,6 +1,7 @@
// RUN: %clang_cc1 -verify -std=gnu++11 %s
// RUN: %clang_cc1 -verify -std=c++11 %s
// RUN: %clang_cc1 -triple powerpc64-linux -verify -std=c++11 %s
+// RUN: %clang_cc1 -triple powerpc64-ibm-aix -target-feature +float128 -verify -std=c++11 %s
// RUN: %clang_cc1 -triple i686-windows-gnu -verify -std=c++11 %s
// RUN: %clang_cc1 -triple x86_64-windows-gnu -verify -std=c++11 %s
// RUN: %clang_cc1 -triple x86_64-windows-msvc -verify -std=c++11 %s
Index: clang/lib/Basic/Targets/PPC.cpp
===================================================================
--- clang/lib/Basic/Targets/PPC.cpp
+++ clang/lib/Basic/Targets/PPC.cpp
@@ -52,7 +52,7 @@
HasDirectMove = true;
} else if (Feature == "+htm") {
HasHTM = true;
- } else if (Feature == "+float128") {
+ } else if (Feature == "+float128" && !getTriple().isOSAIX()) {
HasFloat128 = true;
} else if (Feature == "+power9-vector") {
HasP9Vector = true;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D159159.554560.patch
Type: text/x-patch
Size: 1143 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230830/4181bd7d/attachment.bin>
More information about the cfe-commits
mailing list