]> Cypherpunks repositories - gostls13.git/commit
cmd/compile: reset branch prediction when deleting a branch
authorKeith Randall <khr@google.com>
Mon, 22 Jan 2018 17:43:27 +0000 (09:43 -0800)
committerKeith Randall <khr@golang.org>
Tue, 20 Feb 2018 00:56:13 +0000 (00:56 +0000)
commit4313d7767d830e863e8f8b53a2b48ca8d0bf0a79
tree3ae0c9a4810318fe07e0bfa7e56efceb1afc3b90
parent252ee90971d87f099a2e67c3536a0481a535157f
cmd/compile: reset branch prediction when deleting a branch

When we go from a branch block to a plain block, reset the
branch prediction bit. Downstream passes asssume that if the
branch prediction is set, then the block has 2 successors.

Fixes #23504

Change-Id: I2898ec002228b2e34fe80ce420c6939201c0a5aa
Reviewed-on: https://go-review.googlesource.com/88955
Reviewed-by: Josh Bleecher Snyder <josharian@gmail.com>
src/cmd/compile/internal/ssa/check.go
src/cmd/compile/internal/ssa/fuse.go
test/fixedbugs/issue23504.go [new file with mode: 0644]