Skip to content

ZJIT: Make sure output operands are not VRegs #14188

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

Merged
merged 1 commit into from
Aug 18, 2025

Conversation

tekknolagi
Copy link
Contributor

Make LIR SSA.

Copy link

launchable-app bot commented Aug 12, 2025

Tests Failed

✖️no tests failed ✔️62274 tests passed(2 flakes)

@tekknolagi tekknolagi marked this pull request as ready for review August 13, 2025 15:12
@matzbot matzbot requested a review from a team August 13, 2025 15:12
Copy link
Member

@k0kubun k0kubun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Make LIR SSA.

I mean this PR doesn't because there's still load_into that allows writes to VReg, but we do write to VReg using load_into for , so I agree we should merge this first and then work on load_into separately if we want to.

Huh. We return Opnd::Reg from param_opnd and we load_into that register, and VReg is only used by its wrapper gen_param. So I guess we can ban VReg from load_into now?

@k0kubun
Copy link
Member

k0kubun commented Aug 13, 2025

I just updated the comment ^. I think we can do:

     pub fn load_into(&mut self, dest: Opnd, opnd: Opnd) {
-        assert!(matches!(dest, Opnd::Reg(_) | Opnd::VReg{..}), "Destination of load_into must be a register");
+        assert!(matches!(dest, Opnd::Reg(_)), "Destination of load_into must be a register, got: {dest:?}"); 

as well.

@tekknolagi tekknolagi enabled auto-merge (squash) August 13, 2025 20:08
@tekknolagi tekknolagi merged commit d330bcf into ruby:master Aug 18, 2025
93 of 95 checks passed
@tekknolagi tekknolagi deleted the mb-lir-ssa branch August 18, 2025 16:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants