The compiler appears to have a latent bug:
fusePlain calls invalidateCFG when it changes block structure,
but fuseIf does not.
Fix this by hoisting the call to invalidateCFG to the top level.
Change-Id: Ic960fb3ac963b15b4a225aad84863d58efa954e6
Reviewed-on: https://go-review.googlesource.com/c/go/+/177198
Run-TryBot: Josh Bleecher Snyder <josharian@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
changed = fuseBlockPlain(b) || changed
}
}
+ if changed {
+ f.invalidateCFG()
+ }
}
}
if f.Entry == b {
f.Entry = c
}
- f.invalidateCFG()
// trash b, just in case
b.Kind = BlockInvalid