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

excessively large loops #32

Open
sajattack opened this issue Dec 5, 2024 · 0 comments
Open

excessively large loops #32

sajattack opened this issue Dec 5, 2024 · 0 comments

Comments

@sajattack
Copy link

Hey, I'm not sure if this is something that can be fixed or required by LLVM/Rust ABI, but I noticed some simple busy loops were quite large (42 bytes).

#[inline(never)]
extern fn delay() {
    for _ in 0..16u8 {
        for _ in 0..255u8 {
            unsafe { nop(); }
        }
    }
}

This emits:
image

When imo it should emit something more like

image

Let me know if this isn't possible and feel free to close, but I thought I should mention it.

@sajattack sajattack changed the title Unnecessarily large loops excessively large loops Dec 15, 2024
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

No branches or pull requests

1 participant