cmd/asm: optimize if statement to return directly

Change-Id: Ieb8fb7c623ecd8b9ddd15cdb6eb2c6326a9bbd3b
Reviewed-on: https://go-review.googlesource.com/c/go/+/435941
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Ian Lance Taylor <iant@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Auto-Submit: Ian Lance Taylor <iant@google.com>
This commit is contained in:
cuiweixie 2022-09-28 21:24:10 +08:00 committed by Gopher Robot
parent c4a3fae27e
commit 58093e8e2b

View file

@ -118,10 +118,7 @@ func IsARM64STLXR(op obj.As) bool {
return true
}
// LDADDx/SWPx/CASx atomic instructions
if arm64.IsAtomicInstruction(op) {
return true
}
return false
return arm64.IsAtomicInstruction(op)
}
// IsARM64TBL reports whether the op (as defined by an arm64.A*