Skip to content

Commit 8178664

Browse files
philhoferjosharian
authored andcommitted
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 <[email protected]> Run-TryBot: Philip Hofer <[email protected]> TryBot-Result: Gobot Gobot <[email protected]>
1 parent c5d6c42 commit 8178664

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/cmd/compile/internal/ssa/branchelim.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ func clobberBlock(b *Block) {
139139
b.Succs = nil
140140
b.Aux = nil
141141
b.SetControl(nil)
142+
b.Likely = BranchUnknown
142143
b.Kind = BlockInvalid
143144
}
144145

0 commit comments

Comments
 (0)