Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: reset branch prediction when deleting a branch #24938

Conversation

cwedgwood
Copy link
Contributor

@cwedgwood cwedgwood commented Apr 18, 2018

(backport / cherry-pick)

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 [email protected]

This PR will be imported into Gerrit with the title and first
comment (this text) used to generate the subject and body of
the Gerrit change.

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 golang#23504

Change-Id: I2898ec002228b2e34fe80ce420c6939201c0a5aa
Reviewed-on: https://go-review.googlesource.com/88955
Reviewed-by: Josh Bleecher Snyder <[email protected]>
@googlebot googlebot added the cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change. label Apr 18, 2018
@cwedgwood
Copy link
Contributor Author

Apologies if this isn't the 'right' way to request an existing fix is cherry-picked and brought back to 1.9.x.

I hit this bug in March and have been running this since then primary on 1.9.4.

@ALTree
Copy link
Member

ALTree commented Apr 23, 2018

Apologies if this isn't the 'right' way to request an existing fix is cherry-picked and brought back to 1.9.x.

Indeed, it's not. Can you open an issue on the tracker? Reference the original issue and the fact that you would like the fix to be considered for 1.9 and 1.10 backports.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes Used by googlebot to label PRs as having a valid CLA. The text of this label should not change.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants