From: Philip Hofer Date: Wed, 21 Feb 2018 21:35:08 +0000 (-0800) Subject: cmd/compile/internal/ssa: clear branch likeliness in clobberBlock X-Git-Tag: go1.11beta1~1433 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=81786649c54c5e45765de12cbdf11c9081614506;p=gostls13.git cmd/compile/internal/ssa: clear branch likeliness in clobberBlock The branchelim pass makes some blocks unreachable, but does not remove them from Func.Values. Consequently, ssacheck complains when it finds a block with a non-zero likeliness value but no successors. Fixes #24014 Change-Id: I2dcf1d8f4e769a2f363508dab3b11198ead336b6 Reviewed-on: https://go-review.googlesource.com/96075 Reviewed-by: Josh Bleecher Snyder Run-TryBot: Philip Hofer TryBot-Result: Gobot Gobot --- diff --git a/src/cmd/compile/internal/ssa/branchelim.go b/src/cmd/compile/internal/ssa/branchelim.go index a37b8f06e1..54508985b3 100644 --- a/src/cmd/compile/internal/ssa/branchelim.go +++ b/src/cmd/compile/internal/ssa/branchelim.go @@ -139,6 +139,7 @@ func clobberBlock(b *Block) { b.Succs = nil b.Aux = nil b.SetControl(nil) + b.Likely = BranchUnknown b.Kind = BlockInvalid }