]> Cypherpunks.ru repositories - gostls13.git/commit
cmd/compile: derive unsigned limits from signed limits in prove
authorAustin Clements <austin@google.com>
Thu, 11 Jan 2018 19:23:01 +0000 (14:23 -0500)
committerAustin Clements <austin@google.com>
Thu, 8 Mar 2018 22:25:27 +0000 (22:25 +0000)
commit941fc129e2f059a5fb9f5ab77f5cb12aedecd145
treec2664f371770c4508d0e98a27271f27f15a9cce9
parent669db2cef55321b0fe354b8bf9212245dc9c6aed
cmd/compile: derive unsigned limits from signed limits in prove

This adds a few simple deductions to the prove pass' fact table to
derive unsigned concrete limits from signed concrete limits where
possible.

This tweak lets the pass prove 70 additional branch conditions in std
and cmd.

This is based on a comment from the recently-deleted factsTable.get:
"// TODO: also use signed data if lim.min >= 0".

Change-Id: Ib4340249e7733070f004a0aa31254adf5df8a392
Reviewed-on: https://go-review.googlesource.com/87479
Reviewed-by: Alexandru Moșoi <alexandru@mosoi.ro>
Reviewed-by: Keith Randall <khr@golang.org>
src/cmd/compile/internal/ssa/prove.go
test/prove.go