]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: transform some Phis into Or8.
authorAlexandru Moșoi <mosoi@google.com>
Tue, 12 Apr 2016 16:24:34 +0000 (18:24 +0200)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Tue, 19 Apr 2016 22:04:30 +0000 (22:04 +0000)
commit8b20fd000d7e894865442134f9d6d197ac5dabed
tree29c90352d4da834de0b9c12bcdb3d5e31fdd8652
parent082f464823cdb47042a142802776fa7874e6c05b
cmd/compile: transform some Phis into Or8.

func f(a, b bool) bool {
          return a || b
}

is now a single instructions (excluding loading and unloading the arguments):
      v10 = ORB <bool> v11 v12 : AX

Change-Id: Iff63399410cb46909f4318ea1c3f45a029f4aa5e
Reviewed-on: https://go-review.googlesource.com/21872
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/ssa/compile.go
src/cmd/compile/internal/ssa/phiopt.go
test/phiopt.go
test/prove.go