aboutsummaryrefslogtreecommitdiff
path: root/test/codegen
diff options
context:
space:
mode:
authorruinan <ruinan.sun@arm.com>2022-07-12 04:05:41 +0000
committerEric Fang <eric.fang@arm.com>2023-04-07 10:09:11 +0000
commit9be533a8ee7673cbf16699d05517d9c6aebed297 (patch)
tree862b8dd1c1bbed40d89c5681586434f627023926 /test/codegen
parent4f4a9c7fff0b96d596c65f7997ab646b3ac42517 (diff)
downloadgo-9be533a8ee7673cbf16699d05517d9c6aebed297.tar.xz
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>
Diffstat (limited to 'test/codegen')
-rw-r--r--test/codegen/comparisons.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/codegen/comparisons.go b/test/codegen/comparisons.go
index 99589c4ce8..6ffc73482a 100644
--- a/test/codegen/comparisons.go
+++ b/test/codegen/comparisons.go
@@ -235,7 +235,7 @@ func CmpToZero(a, b, d int32, e, f int64, deOptC0, deOptC1 bool) int32 {
// arm64:`CMN\sR[0-9]+<<3,\sR[0-9]+`
c8 := e+(f<<3) < 0
// arm64:`TST\sR[0-9],\sR[0-9]+`
- c9 := e&17 < 0
+ c9 := e&(-19) < 0
if c0 {
return 1
} else if c1 {