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

[AVR][NFC] Simplify branch relaxation tests #131871

Merged
merged 1 commit into from
Mar 26, 2025

Conversation

Patryk27
Copy link
Contributor

@Patryk27 Patryk27 commented Mar 18, 2025

Let's use the .space directive to simplify AVR's branch relaxation tests, as noticed by @MaskRay at #118015 (comment).

Having .space 4100 instead of .space 4096 is little bit awkward, but I'd rather avoid changing two things at once (i.e. current assertions are fine).

Copy link
Member

@benshi001 benshi001 left a comment

Choose a reason for hiding this comment

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

LGTM! But it would be better to change the title to [AVR][NFC] Simplify branch relaxation tests.

@Patryk27 Patryk27 force-pushed the avr-simplify-branch-relaxation-tests branch from 953eac6 to 6e47fe2 Compare March 22, 2025 17:34
@Patryk27
Copy link
Contributor Author

Sure, sounds good!

@Patryk27 Patryk27 changed the title [AVR] Simplify branch relaxation tests [AVR][NFC] Simplify branch relaxation tests Mar 22, 2025
Copy link
Member

@MaskRay MaskRay left a comment

Choose a reason for hiding this comment

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

The two tests can be merged into one branch-relaxation.ll, similar to other targets.

@Patryk27
Copy link
Contributor Author

Patryk27 commented Mar 24, 2025

Yes~no - they are separate, because they check this:

// The device potentially requires emitting rjmp that wraps across the flash
(aka #118015)

Merging them into a single file would probably work, but it'd be tiiiny bit illegal, because the generated binary would technically be larger than 8 kB that the lowest target provides (I could imagine LLVM refusing to compile such code in the future, for instance).

@Patryk27 Patryk27 merged commit 858f905 into llvm:main Mar 26, 2025
11 checks passed
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.

3 participants