dependency
XORL accomplishes the same thing while being shorter to encode.
Change-Id: I4397999ff617edb61a7fb7d1eca757a202ab8134
Reviewed-on: https://go-review.googlesource.com/c/go/+/354832
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
if v.Args[0].Reg() != v.Reg() {
// POPCNT on Intel has a false dependency on the destination register.
// Xor register with itself to break the dependency.
- p := s.Prog(x86.AXORQ)
+ p := s.Prog(x86.AXORL)
p.From.Type = obj.TYPE_REG
p.From.Reg = v.Reg()
p.To.Type = obj.TYPE_REG