Commit ed2f84a9 authored by Iskander Sharipov's avatar Iskander Sharipov Committed by Brad Fitzpatrick

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: default avatarBrad Fitzpatrick <bradfitz@golang.org>
parent 9d1540b7
......@@ -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)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment