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: x64: Remove register shuffle with opt_and and friends #10498

Merged
merged 1 commit into from Apr 11, 2024

Conversation

XrXr
Copy link
Member

@XrXr XrXr commented Apr 10, 2024

This is best understood by looking at the change to the output:

  # Insn: 0002 opt_and (stack_size: 2)
  - mov rax, rsi
  - and rax, rdi
  - mov rsi, rax
  + and rsi, rdi

It's a bit awkward to match against due to how stack operands are
lowered, but hey, it's nice to save the 2 unnecessary MOVs.

This is best understood by looking at the change to the output:

```diff
  # Insn: 0002 opt_and (stack_size: 2)
  - mov rax, rsi
  - and rax, rdi
  - mov rsi, rax
  + and rsi, rdi
```

It's a bit awkward to match against due to how stack operands are
lowered, but hey, it's nice to save the 2 unnecessary MOVs.
@matzbot matzbot requested a review from a team April 10, 2024 23:36
Copy link
Contributor

@maximecb maximecb left a comment

Choose a reason for hiding this comment

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

Nice! :)

@maximecb maximecb merged commit c2622b5 into ruby:master Apr 11, 2024
100 checks passed
@XrXr XrXr deleted the yjit-and-or-foxtrot branch April 11, 2024 18:34
artur-intech pushed a commit to artur-intech/ruby that referenced this pull request Apr 26, 2024
…0498)

This is best understood by looking at the change to the output:

```diff
  # Insn: 0002 opt_and (stack_size: 2)
  - mov rax, rsi
  - and rax, rdi
  - mov rsi, rax
  + and rsi, rdi
```

It's a bit awkward to match against due to how stack operands are
lowered, but hey, it's nice to save the 2 unnecessary MOVs.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants