Skip to content

Commit d572c4c

Browse files
ecnelisesbzEq
andauthored
[PowerPC] Disable float128 on AIX in Clang (#67298)
PowerPC AIX backend does not support float128 at all. Diagnose even when specifying -mfloat128 to avoid backend crash. --------- Co-authored-by: Kai Luo <[email protected]>
1 parent c1fe190 commit d572c4c

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

clang/lib/Basic/Targets/PPC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
5353
} else if (Feature == "+htm") {
5454
HasHTM = true;
5555
} else if (Feature == "+float128") {
56-
HasFloat128 = true;
56+
HasFloat128 = !getTriple().isOSAIX();
5757
} else if (Feature == "+power9-vector") {
5858
HasP9Vector = true;
5959
} else if (Feature == "+power10-vector") {

clang/test/Sema/128bitfloat.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
// RUN: %clang_cc1 -verify -std=gnu++11 %s
22
// RUN: %clang_cc1 -verify -std=c++11 %s
33
// RUN: %clang_cc1 -triple powerpc64-linux -verify -std=c++11 %s
4+
// RUN: %clang_cc1 -triple powerpc64-ibm-aix -target-feature +float128 -verify -std=c++11 %s
45
// RUN: %clang_cc1 -triple i686-windows-gnu -verify -std=c++11 %s
56
// RUN: %clang_cc1 -triple x86_64-windows-gnu -verify -std=c++11 %s
67
// RUN: %clang_cc1 -triple x86_64-windows-msvc -verify -std=c++11 %s

0 commit comments

Comments
 (0)