]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: improve bit test code
authorKeith Randall <khr@golang.org>
Fri, 12 Feb 2021 23:55:25 +0000 (15:55 -0800)
committerKeith Randall <khr@golang.org>
Tue, 23 Feb 2021 18:02:48 +0000 (18:02 +0000)
commit42cd40ee74050391e4714eefa8aeb0242b93b0f5
treeb9e1f10f66999a3e4ab9289dd07f7c7da295c2d8
parentf1562c761014111ce359b14016718ddabd24c2f2
cmd/compile: improve bit test code

Some bit test instruction generation stopped triggering after
the change to addressing modes. I suspect this was just because
ANDQload was being generated before the rewrite rules could discover
the BTQ. Fix that by decomposing the ANDQload when it is surrounded
by a TESTQ (thus re-enabling the BTQ rules).

Fixes #44228

Change-Id: I489b4a5a7eb01c65fc8db0753f8cec54097cadb2
Reviewed-on: https://go-review.googlesource.com/c/go/+/291749
Trust: Keith Randall <khr@golang.org>
Trust: Josh Bleecher Snyder <josharian@gmail.com>
Run-TryBot: Keith Randall <khr@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/ssa/gen/AMD64.rules
src/cmd/compile/internal/ssa/rewriteAMD64.go
test/codegen/bits.go