Skip to content

[NFC] fix build failure #100993

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 1 commit into from
Jul 30, 2024
Merged

[NFC] fix build failure #100993

merged 1 commit into from
Jul 30, 2024

Conversation

chenzheng1030
Copy link
Collaborator

Fix the build failure caused by #94944

Fixes #100296

@llvmbot llvmbot added the llvm:analysis Includes value tracking, cost tables and constant folding label Jul 29, 2024
@llvmbot
Copy link
Member

llvmbot commented Jul 29, 2024

@llvm/pr-subscribers-llvm-analysis

Author: Chen Zheng (chenzheng1030)

Changes

Fix the build failure caused by #94944

Fixes #100296


Full diff: https://github.com/llvm/llvm-project/pull/100993.diff

1 Files Affected:

  • (modified) llvm/lib/Analysis/ConstantFolding.cpp (+2-2)
diff --git a/llvm/lib/Analysis/ConstantFolding.cpp b/llvm/lib/Analysis/ConstantFolding.cpp
index df75745645e049..ff30fece5fce93 100644
--- a/llvm/lib/Analysis/ConstantFolding.cpp
+++ b/llvm/lib/Analysis/ConstantFolding.cpp
@@ -1784,8 +1784,8 @@ Constant *ConstantFoldFP(double (*NativeFP)(double), const APFloat &V,
 }
 
 #if defined(HAS_IEE754_FLOAT128) && defined(HAS_LOGF128)
-Constant *ConstantFoldFP128(long double (*NativeFP)(long double),
-                            const APFloat &V, Type *Ty) {
+Constant *ConstantFoldFP128(float128 (*NativeFP)(float128), const APFloat &V,
+                            Type *Ty) {
   llvm_fenv_clearexcept();
   float128 Result = NativeFP(V.convertToQuad());
   if (llvm_fenv_testexcept()) {

@chenzheng1030 chenzheng1030 requested a review from arsenm July 29, 2024 09:19
@chenzheng1030 chenzheng1030 merged commit 40b4fd7 into llvm:main Jul 30, 2024
9 checks passed
@chenzheng1030 chenzheng1030 deleted the issue100296 branch July 30, 2024 01:02
@aaronpuchert
Copy link
Member

Any thoughts about picking this to the LLVM 19 release branch? It seems relatively harmless and fixes a build error.

@mgorny
Copy link
Member

mgorny commented Oct 16, 2024

Any thoughts about picking this to the LLVM 19 release branch? It seems relatively harmless and fixes a build error.

I agree (and had someone in Gentoo ping me about it), so I've requested the backport in the linked bug.

llvmbot pushed a commit to llvmbot/llvm-project that referenced this pull request Oct 16, 2024
Fix the build failure caused by
llvm#94944

Fixes llvm#100296

(cherry picked from commit 40b4fd7)
tru pushed a commit to llvmbot/llvm-project that referenced this pull request Oct 29, 2024
Fix the build failure caused by
llvm#94944

Fixes llvm#100296

(cherry picked from commit 40b4fd7)
GZGavinZhao pushed a commit to GZGavinZhao/rocm-llvm-project that referenced this pull request May 13, 2025
Fix the build failure caused by
llvm#94944

Fixes llvm#100296

(cherry picked from commit 40b4fd7)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
llvm:analysis Includes value tracking, cost tables and constant folding
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LLVM incorrectly assumes long double is the same type as _Float128 on ppc64le
5 participants