Skip to content
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

[AArch64][Clang] Implement ACLE rintn intrinsics #66112

Merged
merged 2 commits into from
Sep 14, 2023
Merged

Conversation

Blue-Dot
Copy link
Contributor

This patch adds support for two missing ACLE intrinsics for floating point round with ties to even:

  • rintn
  • rintnf

These are specified in ACLE section 8.6: [https://arm-software.github.io/acle/main/acle.html#floating-point-data-processing-intrinsics]

Change-Id: I951971ad5a3fd3822efdf8cbae22918c31eef28a

@Blue-Dot Blue-Dot requested review from a team as code owners September 12, 2023 17:00
@llvmbot llvmbot added clang Clang issues not falling into any other category backend:AArch64 backend:X86 clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:headers Headers provided by Clang, e.g. for intrinsics clang:codegen labels Sep 12, 2023
Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

Could this use __builtin_roundeven directly, avoiding the need for __builtin_arm_rintnf?

@RKSimon RKSimon removed the request for review from a team September 13, 2023 09:42
@vhscampos
Copy link
Member

Just a nit, but please add a tag to the commit message, like "[Clang][AArch64]".

Change-Id: I7f05a59f07f05ff8ac84cbab59a7803f1fe1642f
Change-Id: Ibfe830cf69e3ea10f68f651e5a5d507769792496
@Blue-Dot
Copy link
Contributor Author

Thank you both for your comments. I've simplified the patch by using the llvm intrinsic that you suggested David, thanks!

In trying to fix the commit message, I messed up my git history, hence the force-pushes above to try to fix it. Hopefully the couple of commits make sense. In retrospect, I should have used git commit --fixup. Sorry for any confusion with that!

@Blue-Dot Blue-Dot requested a review from davemgreen September 13, 2023 17:18
@Blue-Dot Blue-Dot changed the title Implement ACLE rintn and rintnf intrinsics [AArch64][Clang] Implement ACLE rintn intrinsics Sep 13, 2023
Copy link
Collaborator

@davemgreen davemgreen left a comment

Choose a reason for hiding this comment

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

Thanks. LGTM

@vhscampos vhscampos merged commit 09ffb9e into llvm:main Sep 14, 2023
kstoimenov pushed a commit to kstoimenov/llvm-project that referenced this pull request Sep 14, 2023
This patch adds support for two missing ACLE intrinsics for floating
point round with ties to even:

- rintn
- rintnf

These are specified in ACLE section 8.6:
[https://arm-software.github.io/acle/main/acle.html#floating-point-data-processing-intrinsics]
ZijunZhaoCCK pushed a commit to ZijunZhaoCCK/llvm-project that referenced this pull request Sep 19, 2023
This patch adds support for two missing ACLE intrinsics for floating
point round with ties to even:

- rintn
- rintnf

These are specified in ACLE section 8.6:
[https://arm-software.github.io/acle/main/acle.html#floating-point-data-processing-intrinsics]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 backend:X86 clang:codegen clang:frontend Language frontend issues, e.g. anything involving "Sema" clang:headers Headers provided by Clang, e.g. for intrinsics clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants