cmd/asm: optimize if statement to return directly

Change-Id: Iddf4d3bcc3bc2badf0d0f6b06375c901e76a40bb
GitHub-Last-Rev: 95586bfc16
GitHub-Pull-Request: golang/go#56268
Reviewed-on: https://go-review.googlesource.com/c/go/+/443315
Run-TryBot: Ian Lance Taylor <iant@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
mantuliu 2022-10-18 03:49:04 +00:00 committed by Gopher Robot
parent 9860faa512
commit 0b7aa9fa5b
1 changed files with 1 additions and 4 deletions

View File

@ -567,10 +567,7 @@ func (p *Parser) atRegisterExtension() bool {
return false
}
// R1.xxx
if p.peek() == '.' {
return true
}
return false
return p.peek() == '.'
}
// registerReference parses a register given either the name, R10, or a parenthesized form, SPR(10).