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

Work around bad code generation with clang at -O2 #4945

Conversation

davidhorstmann-arm
Copy link
Contributor

@davidhorstmann-arm davidhorstmann-arm commented Sep 14, 2021

Versions of clang from around 12 seem to generate code
badly in mpi_mul_hlp(), causing the mpi tests to fail.
Setting __attribute__ ((noinline)) fixes this issue.

Signed-off-by: David Horstmann david.horstmann@arm.com

Description

Fixes #4786
This works around bad code generation with clang-12 onwards, in mpi_mul_hlp(). We already work around code generation issues with clang on some platforms using __attribute__ ((noinline)), so this PR extends that workaround to all versions of clang.

Status

READY

Requires Backporting

Yes

Which branch?

Migrations

If there is any API change, what's the incentive and logic for it.
NO

Todos

  • Tests
  • Documentation
  • Changelog updated
  • Backported

Versions of clang from around 12 seem to generate code
badly in mpi_mul_hlp(), causing the mpi tests to fail.
Setting __attribute__ ((noinline)) fixes this issue.

Signed-off-by: David Horstmann <david.horstmann@arm.com>
Copy link
Contributor

@gilles-peskine-arm gilles-peskine-arm left a comment

Choose a reason for hiding this comment

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

As I wrote in #4786 (comment), there is actually a genuine bug in our code. I made a fix in #4941.

@davidhorstmann-arm
Copy link
Contributor Author

This is properly fixed by #4941 and its forward ports

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.

8e464c4 breaks clang 12 -O2 (make test failed)
2 participants