forked from gcc-mirror/gcc
-
Notifications
You must be signed in to change notification settings - Fork 11
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
LOOP construct good with Os but not optimal with -O2 -O3 -OFast #217
Labels
Comments
you might consider using |
-OS creates:
This is good.
|
bebbo
added a commit
that referenced
this issue
Jan 8, 2024
also set -freorder-blocks-algorithm=simple as default.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hallo Bebbo,
I hope you are OK.
Maybe this was reported before.
I found that the basic loop construct loop very good when compiled with -Os
but looks not optimal when compiled with any other O mode
C Example:
compile with -mregparm=2 -Os
Good result!
4 instructions total.
Bra to DBRA - this is both short and fast.
not optimal result when compile with -O2 or -O3 -OFast
8 instructions total
4 instruction header instead 1 BR
This result is not good.
the BRA to the DBRA was much better
Hello Bebbo,
do you know a way to enable the BRA to the DBRA in all -O options?
This would be very good for code size and for performance on all 68K members!
Many thanks in advance
regards Gunnar
The text was updated successfully, but these errors were encountered: