You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is what GCC 5.4.0 produces. I was surprised by this code, since I only expected it to combine the CMP + CMP to a SUB + CMP. But now that I see this, I'd like the Go compiler to produce similar code.
What did you see instead?
MOVZX 0x8(SP), AX
CMPL $0x41, AL
JB L2
CMPL $0x5a, AL
JA L2
MOVL $0x1, AX
L1:
MOVB AL, 0x10(SP)
RET
L2:
CMPL $0x61, AL
JB L3
CMPL $0x7a, AL
SETBE AL
JMP L1
L3:
XORL AX, AX
JMP L1
The text was updated successfully, but these errors were encountered:
What version of Go are you using (
go version
)?go version go1.7.1 windows/amd64
What did you do?
https://play.golang.org/p/91drTKDs_m
What did you expect to see?
This is what GCC 5.4.0 produces. I was surprised by this code, since I only expected it to combine the
CMP + CMP
to aSUB + CMP
. But now that I see this, I'd like the Go compiler to produce similar code.What did you see instead?
The text was updated successfully, but these errors were encountered: