Descriptioncmd/6g, cmd/8g: eliminate extra agen for nil comparisons.
Removes an extra LEAL/LEAQ instructions there and usually saves
a useless temporary in the idiom
if err := foo(); err != nil {...}
Generated code is also less involved:
MOVQ err+n(SP), AX
CMPQ AX, $0
(potentially CMPQ n(SP), $0) instead of
LEAQ err+n(SP), AX
CMPQ (AX), $0
Update issue 1914.
Patch Set 1 #Patch Set 2 : code review 6493099: cmd/6g, cmd/8g: eliminate extra agen for nil comparisons. #Patch Set 3 : diff -r 0a0666f2fe86 https://go.googlecode.com/hg/ #
Total comments: 5
Patch Set 4 : diff -r 46a4f787e8b7 https://go.googlecode.com/hg/ #Patch Set 5 : diff -r 46a4f787e8b7 https://go.googlecode.com/hg/ #MessagesTotal messages: 13
|