]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: convert some Phis into And8.
authorAlexandru Moșoi <mosoi@google.com>
Fri, 22 Apr 2016 10:44:31 +0000 (12:44 +0200)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Fri, 22 Apr 2016 17:22:03 +0000 (17:22 +0000)
commitcaef4496fcdaca8dc5b86f60b07760e5434ca1f3
tree40885a6f7278304ca01aa64ef3b6e221073477fa
parent3c1a4c1902711c16489ed0c3506df97439ffbd85
cmd/compile: convert some Phis into And8.

See discussion at [1]. True value must have a fixed non-zero
representation meaning that a && b can be implemented as a & b.

[1] https://groups.google.com/forum/#!topic/golang-dev/xV0vPuFP9Vg

This change helps with m := a && b, but it's more common to see
if a && b { do something } which is not handled.

Change-Id: Ib6f9ff898a0a8c05d12466e2464e4fe781035394
Reviewed-on: https://go-review.googlesource.com/22313
Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/phiopt.go
test/phiopt.go