]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: handle non-negatives in prove
authorAlexandru Moșoi <brtzsnr@gmail.com>
Sat, 2 Apr 2016 08:29:11 +0000 (10:29 +0200)
committerAlexandru Moșoi <alexandru@mosoi.ro>
Sat, 2 Apr 2016 20:34:38 +0000 (20:34 +0000)
commit27ebc84716f19e1c5b21e3a14de3204d19f28499
tree3664f42a60cd93d949325e22c67660323685589b
parent72c1180852d5b059cd1e51d1db1956ea208b7f2f
cmd/compile: handle non-negatives in prove

Handle this case:
if 0 <= i && i < len(a) {
        use a[i]
}

Shaves about 5k from pkg/tools/linux_amd64/*.

Change-Id: I6675ff49aa306b0d241b074c5738e448204cd981
Reviewed-on: https://go-review.googlesource.com/21431
Run-TryBot: Alexandru Moșoi <alexandru@mosoi.ro>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
src/cmd/compile/internal/ssa/prove.go
test/prove.go