Skip to content

JIT: add _RROT_3 uop to reduce stack moves #149204

Closed

Description

@NekoAsakura

Feature or enhancement

Proposal:

According to @markshannon's note #148816 (comment)

Note:
It might be worth adding ROT_3 and a RROT_3 uops to use in the optimizer and the peepholer.
A SWAP_2; SWAP_3 takes 6 moves, but ROT_3 only takes 4.

Two narrowings:

  • No _ROT_3 as _SWAP 2; _SWAP 3 adjacent doesn't exist.
  • No separate peephole pass as it would never fire.

Has this already been discussed elsewhere?

This is a minor feature, which does not need previous discussion elsewhere

Links to previous discussion of this feature:

No response

Linked PRs

Activity

  1. added a commit that references this issue on May 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    type-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions