We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The following go function
func ss(u, q uint32) uint32 { if u & q == 0 { return 2 } if u + q == 0 { return 3 } if q ^ u == 0 { return 9 } return 1 }
is compiled to
...... a.go:7 0x9ca50 e0002001 AND R1, R0, R2 a.go:7 0x9ca54 e3520000 CMP $0, R2 a.go:7 0x9ca58 0a00000e B.EQ 0x9ca98 a.go:10 0x9ca5c e0802001 ADD R1, R0, R2 a.go:10 0x9ca60 e3520000 CMP $0, R2 a.go:10 0x9ca64 0a000008 B.EQ 0x9ca8c a.go:13 0x9ca68 e0210000 EOR R0, R1, R0 a.go:13 0x9ca6c e3500000 CMP $0, R0 a.go:13 0x9ca70 1a000002 B.NE 0x9ca80 ......
But can be optimized to
CMN R1, R0, R2 B.EQ xxx TST R1, R0, R2 B.EQ XXX TEQ R0, R1, r2 B.NE xxx
The text was updated successfully, but these errors were encountered:
Change https://golang.org/cl/67490 mentions this issue: cmd/compile: optimize ARM code with CMN/TST/TEQ
cmd/compile: optimize ARM code with CMN/TST/TEQ
Sorry, something went wrong.
1ec78d1
No branches or pull requests
The following go function
is compiled to
But can be optimized to
The text was updated successfully, but these errors were encountered: