Skip to content

[IR] Add a test for f128 libm libcall lowering (NFC) #148308

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 commits into from
Jul 14, 2025

Conversation

tgross35
Copy link
Contributor

f128 intrinsic functions from libm sometimes lower to long double library calls when they instead need to be f128 versions. Add a generic test demonstrating current behavior.

@tgross35 tgross35 force-pushed the f128-math-lowering-test branch from 4e92f6d to b81e4dc Compare July 11, 2025 22:14
@tgross35
Copy link
Contributor Author

tgross35 commented Jul 11, 2025

This commit just adds a test showing #44744, I will be following up with a fix (in progress at #76558)

@tgross35 tgross35 force-pushed the f128-math-lowering-test branch from b81e4dc to 4fc2b26 Compare July 12, 2025 00:55
`f128` intrinsic functions from libm sometimes lower to `long double`
library calls when they instead need to be `f128` versions. Add a
generic test demonstrating current behavior.
@tgross35 tgross35 force-pushed the f128-math-lowering-test branch from 4fc2b26 to 7e51c6b Compare July 12, 2025 00:56
@tgross35
Copy link
Contributor Author

@nikic would you mind also reviewing this or requesting somebody reasonable?

; f128 long double. They should be passing with CHECK-F128 rather than
; CHECK-USELD.

; RUN: %if aarch64-registered-target %{ llc < %s -mtriple=aarch64-unknown-linux-gnu -verify-machineinstrs | FileCheck %s --check-prefixes=CHECK-ALL,CHECK-USELD %}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please drop -verify-machineinstrs everywhere.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated. What does this actually do? Many tests seem to use it, which is where I got it from

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It forces expensive verification outside EXPENSIVE_CHECKS builds. Should not be enabled unless you are specifically fixing an issue that triggers machine verifier errors.

@tgross35 tgross35 requested a review from nikic July 13, 2025 18:28
@nikic nikic merged commit d214f07 into llvm:main Jul 14, 2025
9 checks passed
@tgross35 tgross35 deleted the f128-math-lowering-test branch July 14, 2025 17:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants