]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: optimize BSRQ with nonzero input
authorKeith Randall <khr@golang.org>
Sat, 26 Mar 2022 17:03:06 +0000 (10:03 -0700)
committerKeith Randall <khr@golang.org>
Sun, 27 Mar 2022 17:02:31 +0000 (17:02 +0000)
commit7d3b64a2e372b0e7c550bf9152fe215605e448e4
tree1e7840607e771813b1d424f07da3fb9caada2e5f
parent56400fc70675cc2f404f33e3ed13386967cfe4da
cmd/compile: optimize BSRQ with nonzero input

Same as BSFQ, if the input is known to be nonzero we don't need a CMOV
to correct for the weird all-zero behavior of the BSRQ instruction.

Fixes #51964

Change-Id: Ic1d14fdf3e7e698ff2f47efecfd761d8a036012a
Reviewed-on: https://go-review.googlesource.com/c/go/+/396034
Trust: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: David Chase <drchase@google.com>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go