]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] cmd/compile: don't addLocalInductiveFacts if there is no...
authorKeith Randall <khr@golang.org>
Thu, 30 Jul 2020 17:37:36 +0000 (10:37 -0700)
committerCarlos Amedee <carlos@golang.org>
Mon, 3 Aug 2020 15:12:45 +0000 (15:12 +0000)
commit739b9d5afe04b16a3726475c2ae2a136d3920477
treefd0cc391b3808cf986ef2fce95a1ea695bccbce7
parentedfd6f28486017dcb136cd3f3ec252706d4b326e
[release-branch.go1.14] cmd/compile: don't addLocalInductiveFacts if there is no direct edge from if block to phi block

Currently in addLocalInductiveFacts, we only check whether
direct edge from if block to phi block exists. If not, the
following logic will treat the phi block as the first successor,
which is wrong.

This patch makes prove pass more conservative, so we disable
some cases in test/prove.go. We will do some optimization in
the following CL and enable these cases then.

Fixes #40501.

Change-Id: I27cf0248f3a82312a6f7dabe11c79a1a34cf5412
Reviewed-on: https://go-review.googlesource.com/c/go/+/244579
Reviewed-by: Zach Jones <zachj1@gmail.com>
Reviewed-by: Keith Randall <khr@golang.org>
Run-TryBot: Keith Randall <khr@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-on: https://go-review.googlesource.com/c/go/+/245958
Reviewed-by: David Chase <drchase@google.com>
Reviewed-by: Carlos Amedee <carlos@golang.org>
src/cmd/compile/internal/ssa/prove.go
test/fixedbugs/issue40367.go [new file with mode: 0644]
test/prove.go