From ed2f84a94e1d0903bc16974dca308a9382b596b6 Mon Sep 17 00:00:00 2001 From: Iskander Sharipov Date: Wed, 11 Jul 2018 23:39:49 +0300 Subject: [PATCH] cmd/internal/obj/arm64: simplify some bool expressions Replace `!(o1 != 0)` with `o1 == 0` (for readability). Found using https://go-critic.github.io/overview.html#boolExprSimplify-ref Change-Id: I4fc035458f530973f9be15b38441ec7b5fb591ec Reviewed-on: https://go-review.googlesource.com/123377 Run-TryBot: Iskander Sharipov TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- src/cmd/internal/obj/arm64/asm7.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cmd/internal/obj/arm64/asm7.go b/src/cmd/internal/obj/arm64/asm7.go index 4840a969fd6..1acf9799c62 100644 --- a/src/cmd/internal/obj/arm64/asm7.go +++ b/src/cmd/internal/obj/arm64/asm7.go @@ -2752,7 +2752,7 @@ func (c *ctxt7) asmout(p *obj.Prog, o *Optab, out []uint32) { case 13: /* addop $vcon, [R], R (64 bit literal); cmp $lcon,R -> addop $lcon,R, ZR */ o1 = c.omovlit(AMOVD, p, &p.From, REGTMP) - if !(o1 != 0) { + if o1 == 0 { break } rt := int(p.To.Reg) @@ -3013,7 +3013,7 @@ func (c *ctxt7) asmout(p *obj.Prog, o *Optab, out []uint32) { case 28: /* logop $vcon, [R], R (64 bit literal) */ o1 = c.omovlit(AMOVD, p, &p.From, REGTMP) - if !(o1 != 0) { + if o1 == 0 { break } rt := int(p.To.Reg) @@ -3158,7 +3158,7 @@ func (c *ctxt7) asmout(p *obj.Prog, o *Optab, out []uint32) { case 34: /* mov $lacon,R */ o1 = c.omovlit(AMOVD, p, &p.From, REGTMP) - if !(o1 != 0) { + if o1 == 0 { break } o2 = c.opxrrr(p, AADD, false)