From 574b5decf239f5dad1f25a71d2853a08e237821d Mon Sep 17 00:00:00 2001 From: cuiweixie Date: Thu, 29 Sep 2022 20:59:41 +0800 Subject: [PATCH] cmd/internal/obj/x86: return comparison directly Change-Id: I4b596b252c1785b13c4a166e9ef5f4ae812cd1bc Reviewed-on: https://go-review.googlesource.com/c/go/+/436704 TryBot-Result: Gopher Robot Auto-Submit: Ian Lance Taylor Reviewed-by: Ian Lance Taylor Run-TryBot: Ian Lance Taylor Reviewed-by: Dmitri Shuralyov --- src/cmd/internal/obj/x86/asm6.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/cmd/internal/obj/x86/asm6.go b/src/cmd/internal/obj/x86/asm6.go index b625845c094..9faaba3759d 100644 --- a/src/cmd/internal/obj/x86/asm6.go +++ b/src/cmd/internal/obj/x86/asm6.go @@ -3951,10 +3951,7 @@ func isax(a *obj.Addr) bool { return true } - if a.Index == REG_AX { - return true - } - return false + return a.Index == REG_AX } func subreg(p *obj.Prog, from int, to int) {