This is an archive of the discontinued LLVM Phabricator instance.

[RISCV] Add tests for .attribute stack_align
ClosedPublic

Authored by jobnoorman on Feb 9 2023, 3:50 AM.

Details

Summary

As suggested by @asb here, we need tests for .attribute stack_align. This patch simply verifies a stack alignment of 16 is emitted for any combination of currently supported base ISA and extensions.

Diff Detail

Event Timeline

jobnoorman created this revision.Feb 9 2023, 3:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 9 2023, 3:50 AM
jobnoorman requested review of this revision.Feb 9 2023, 3:50 AM
kito-cheng accepted this revision.Feb 10 2023, 1:44 AM

LGTM, my first impression is why so many diff, however I found it's because this patch also add llc -mtriple=riscv32/llc -mtriple=riscv64 without -mattr, and then...the diff algorithm result so many diff.

This revision is now accepted and ready to land.Feb 10 2023, 1:44 AM

Thanks for the review, @kito-cheng. Note that I do not have commit access so I cannot commit this myself.

Do you mind provide your email address, so that I can put right author info in commit log?

asb accepted this revision.Feb 10 2023, 3:57 AM

The other way of handling this would be to add additional run lines focused on the -target-abi flags and check the stackalign attribute in that output....but that doesn't seem necessarily better, and we get the same coverage due to the ABI inference logic that's implemented. So LGTM.

Sure! Job Noorman <jnoorman@igalia.com>

This revision was landed with ongoing or failed builds.Feb 10 2023, 5:22 AM
This revision was automatically updated to reflect the committed changes.