-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[PowerPC] Disable float128 on AIX in Clang #67298
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
+2
−1
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PowerPC AIX backend does not support float128 at all. Diagnose even when specifying -mfloat128 to avoid backend crash.
@llvm/pr-subscribers-clang ChangesPowerPC AIX backend does not support float128 at all. Diagnose even when specifying -mfloat128 to avoid backend crash. Full diff: https://github.com/llvm/llvm-project/pull/67298.diff 2 Files Affected:
diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp
index e0abc069032e1ce..119ed9c1ac4504e 100644
--- a/clang/lib/Basic/Targets/PPC.cpp
+++ b/clang/lib/Basic/Targets/PPC.cpp
@@ -52,7 +52,7 @@ bool PPCTargetInfo::handleTargetFeatures(std::vector<std::string> &Features,
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;
diff --git a/clang/test/Sema/128bitfloat.cpp b/clang/test/Sema/128bitfloat.cpp
index b98b42496e8db27..bd9f2889c98f6aa 100644
--- a/clang/test/Sema/128bitfloat.cpp
+++ b/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
|
bzEq
reviewed
Nov 16, 2023
bzEq
reviewed
Nov 16, 2023
Co-authored-by: Kai Luo <[email protected]>
bzEq
approved these changes
Nov 17, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
sr-tream
pushed a commit
to sr-tream/llvm-project
that referenced
this pull request
Nov 20, 2023
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]>
zahiraam
pushed a commit
to zahiraam/llvm-project
that referenced
this pull request
Nov 20, 2023
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]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
clang:frontend
Language frontend issues, e.g. anything involving "Sema"
clang
Clang issues not falling into any other category
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PowerPC AIX backend does not support float128 at all. Diagnose even when specifying -mfloat128 to avoid backend crash.