1
0
mirror of https://github.com/golang/go synced 2024-11-23 04:10:04 -07:00

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 <iskander.sharipov@intel.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
Iskander Sharipov 2018-07-11 23:39:49 +03:00 committed by Brad Fitzpatrick
parent 9d1540b77c
commit ed2f84a94e

View File

@ -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)