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] add a target guard to FMV test #133

Merged
merged 1 commit into from
Jun 12, 2024

Conversation

tmatheson-arm
Copy link
Contributor

@tmatheson-arm tmatheson-arm commented Jun 11, 2024

The FMV test uses FMV feature names (e.g. flagm2) which are not available to -march and therefore arguably should not be available to the target attribute. This change adds a way to specify the string for the target attribute independently from the FMV feature.

This is necessary for llvm/llvm-project@2cf1439 which had to be reverted because it caused this test to fail.

The FMV test uses FMV feature names (e.g. flagm2) which are not
available to -march and therefore arguably should not be available to
the target attribute. This change adds a way to specify the string for
the target attribute independently from the FMV feature.

This is necessary for 2cf1439 (#94279) which had to be reverted because
it caused this test to fail.
@tmatheson-arm tmatheson-arm marked this pull request as ready for review June 11, 2024 15:49
@tmatheson-arm tmatheson-arm requested a review from jroelofs June 11, 2024 15:51
@tmatheson-arm tmatheson-arm requested a review from labrinea June 11, 2024 16:15
asm volatile (
"cfinv" "\n"
"cfinv" "\n"
);
})
CHECK(flagm2, {
CHECK(flagm2, arch=armv8.5-a, {
Copy link
Contributor

Choose a reason for hiding this comment

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

should this one's TARGET_GUARD be altnzcv?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is the internal SubtargetFeature/-target-feature name, and I don't think they should be exposed via the target attribute. llvm/llvm-project@2cf1439 was trying to remove the ability to use internal names. Unfortunately these FMV features lack a corresponding -march extension. There are some discussions about adding them, but until now the architecture is the only way for a user to enable them.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The same applies to ccpp and ccdp.

Copy link
Contributor

@labrinea labrinea left a comment

Choose a reason for hiding this comment

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

It looks fine in the medium term. IMHO ideally we should try to unify FMV features with target-attribute/cmdline features, but that has not yet been concluded in ARM-software/acle#315. I have tested this change locally after relanding the reverted compiler patch and works fine on my machine. FYI the alternative medium term fix in the compiler would be llvm/llvm-project#92319 but @tmatheson-arm suggested this fix is the right way.

@tmatheson-arm tmatheson-arm merged commit f5838e4 into llvm:main Jun 12, 2024
@tmatheson-arm tmatheson-arm deleted the fmv_test_target_attribute branch June 12, 2024 10:33
labrinea added a commit to labrinea/llvm-project that referenced this pull request Jun 12, 2024
My reverted attempt to decouple feature dependency expansion (see llvm#95056)
made it evident that some features are still using the FMV dependencies
in the target attribute.

The original commit broke the llvm test suite. This was addressed here:
llvm/llvm-test-suite#133. I am now relanding it.
labrinea added a commit to llvm/llvm-project that referenced this pull request Jun 12, 2024
…95231)

My reverted attempt to decouple feature dependency expansion (see
#95056) made it evident that some features are still using the FMV
dependencies in the target attribute.

The original commit broke the llvm test suite. This was addressed here:
llvm/llvm-test-suite#133. I am now relanding it.
@luporl
Copy link
Contributor

luporl commented Jun 12, 2024

It looks like this broke buildbot https://lab.llvm.org/buildbot/#/builders/183/builds/22093

Shouldn't the CHECK macro in the #else branch be modified to accept the new TARGET_GUARD parameter as well?

@tmatheson-arm
Copy link
Contributor Author

Shouldn't the CHECK macro in the #else branch be modified to accept the new TARGET_GUARD parameter as well?

Yes, fixed by 9144576

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.

4 participants