Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
x/tools/go/ssa: wrong ssa referrers with ifstmt #25946
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
The jumpThreading optimization simplifies degenerate if statements, effectively entirely eliminating the one below:
leaving only the evaluation of the condition, but not its referrers.
This would be a sound code transformation in a compiler, but because go/ssa strives to stay close to the source code, perhaps it must forego this optimization.