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

'#pragma float_control' is not supported on this target (AArch64) #55392

Open
rygorous opened this issue May 11, 2022 · 3 comments
Open

'#pragma float_control' is not supported on this target (AArch64) #55392

rygorous opened this issue May 11, 2022 · 3 comments
Labels
backend:AArch64 clang:frontend Language frontend issues, e.g. anything involving "Sema"

Comments

@rygorous
Copy link

#pragma float_control is documented in the Clang extensions manual but doesn't seem to be supported on AArch64.

https://godbolt.org/z/ejYc1nYjd

I think that's the check at the top of PragmaFloatControlHandler::HandlePragma. I think that logic is checking for the wrong thing there.

I'm assuming the issue is that the AArch64 target doesn't have hasStrictFP() because it doesn't have exception trap support (or at least makes it an optional feature). This affects #pragma float_control(except, ...) but I don't see why precise should be excluded as well. As-is there seems to be no way on AArch64 to turn off fast-math like behavior via pragmas at all.

@EugeneZelenko EugeneZelenko added backend:AArch64 clang:frontend Language frontend issues, e.g. anything involving "Sema" and removed new issue labels May 11, 2022
@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2022

@llvm/issue-subscribers-backend-aarch64

@llvmbot
Copy link
Collaborator

llvmbot commented May 11, 2022

@llvm/issue-subscribers-clang-frontend

@nfrechette
Copy link

I have just bumped into determinism issues caused fast math in clang14 (but not earlier versions) on arm64 and because of the lack of float_control support, I am stuck. I maintain header only C++ libraries where I do not have control over the compilation environment and must control things like fast math through pragma support. This ensures determinism across compiler releases and tool chains.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend:AArch64 clang:frontend Language frontend issues, e.g. anything involving "Sema"
Projects
None yet
Development

No branches or pull requests

4 participants