]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: get more bounds info from logic operators in prove pass
authorruinan <ruinan.sun@arm.com>
Tue, 12 Jul 2022 04:05:41 +0000 (04:05 +0000)
committerEric Fang <eric.fang@arm.com>
Fri, 7 Apr 2023 10:09:11 +0000 (10:09 +0000)
commit9be533a8ee7673cbf16699d05517d9c6aebed297
tree862b8dd1c1bbed40d89c5681586434f627023926
parent4f4a9c7fff0b96d596c65f7997ab646b3ac42517
cmd/compile: get more bounds info from logic operators in prove pass

Currently, the prove pass can get knowledge from some specific logic
operators only before the CFG is explored, which means that the bounds
information of the branch will be ignored.

This CL updates the facts table by the logic operators in every
branch. Combined with the branch information, this will be helpful for
BCE in some circumstances.

Fixes #57243

Change-Id: I0bd164f1b47804ccfc37879abe9788740b016fd5
Reviewed-on: https://go-review.googlesource.com/c/go/+/419555
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Eric Fang <eric.fang@arm.com>
Reviewed-by: Keith Randall <khr@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Heschi Kreinick <heschi@google.com>
src/cmd/compile/internal/ssa/prove.go
test/codegen/comparisons.go
test/prove.go