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

YJIT: Avoid register allocation conflict with a higher stack_idx #9143

Merged
merged 1 commit into from Dec 6, 2023

Conversation

k0kubun
Copy link
Member

@k0kubun k0kubun commented Dec 6, 2023

RegTemps::conflicts_with currently checks if it conflicts with indexes lower than the argument stack_idx. Therefore it does not detect a conflict with indexes higher than the argument stack_idx. While it works fine in most cases, it leads to a wrong allocation in the scenario demonstrated in this test_yjit script.

This PR fixes it to check both lower indexes and higher indexes than the argument stack_idx.

@matzbot matzbot requested a review from a team December 6, 2023 19:29
@maximecb maximecb merged commit a439fc2 into ruby:master Dec 6, 2023
99 checks passed
@k0kubun k0kubun deleted the yjit-reg-fix branch December 6, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants