Skip to content

test(relinker): execute lane-split memory operands - #27680

Closed
nedara312-art wants to merge 1 commit into
boykopovar:mainfrom
nedara312-art:test/relinker-lanesplit-memory
Closed

nedara312-art wants to merge 1 commit into
boykopovar:mainfrom
nedara312-art:test/relinker-lanesplit-memory

Conversation

@nedara312-art

@nedara312-art nedara312-art commented Nov 26, 2026 •

Copy link
Copy Markdown

What

Extend the lane-split execution tests to run memory sources through [rdi+512] for every supported form except the register-only shift-immediate forms. Check the split results, source-memory preservation, other registers, and the red zone.

Run VPMOVMSKB with every destination register from 0 through 15, including RDI. Update the shared vector execution harness to preserve and reload its RDI pointer without shifting RSP before snapshots, while retaining the existing destination-RSP capture path.

Tested

Windows 11, WinLibs GCC 16.2.0, relinker-only Release on current main. No title or homebrew tested.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt and the licence notice of code adapted from upstream (see AGENTS.md)
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • Fixes: none
  • Unblocks: none
  • GPUs tested: n/a
  • AI-assisted: yes

Summary by CodeRabbit

  • Tests
    • Expanded execution checks for lane-split instruction handling with memory inputs, including verification that results are correct and surrounding data remains intact.
  • Documentation
    • Clarified the instruction coverage and limitations of lane-split lowering, along with the checks used to validate its behavior.

@coderabbitai

coderabbitai Bot commented Nov 26, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Changes: Lane-split memory execution tests

Layer / File(s) Summary
Execution harness register handling
core/relinker/codegen/tests/VectorExecution.hpp
The generated prologue saves RDI. The generated code reloads the saved frame pointer into RDI after execution and restores RDI in the epilogue.
Memory-source execution checks
core/relinker/codegen/tests/LaneSplitLoweringTests.cpp, docs/dev/debt/changes/test-relinker-lanesplit-memory.md
The tests construct and execute memory-source instructions for supported forms, excluding ShiftImmediate. They check the destination, other YMM registers, source memory, and red zone. The byte-mask test includes destination register 4. The debt note records coverage and exclusions.

Suggested labels: relinker

Suggested reviewers: ycbuzi, joeglantern

Change: Other

Merge Risk: Minimal · up to 80f10

This PR adds execution coverage for lane-split memory-source instructions and makes the test harness save and restore RDI. Production behavior is unchanged. Inspection found no stack-balance or register-state problems, so the merge risk is minimal.

Security architecture risk: Minimal · up to 80f10

The changes extend test coverage and preserve a test pointer while generated instructions run. No material change to production security or failure containment was identified.

Finishing Touches

Generate unit tests (beta)

  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 2087e967-fb6f-4004-8933-ce62af7f477b
Commits

Reviewing files that changed from the base of the PR and between 9c86ad6 and 80f1021.

Files selected for processing: 3

  • core/relinker/codegen/tests/LaneSplitLoweringTests.cpp
  • core/relinker/codegen/tests/VectorExecution.hpp
  • docs/dev/debt/changes/test-relinker-lanesplit-memory.md

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.

@MarcZX10 MarcZX10 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed — looks good

Nothing blocks this change; the review found no verified defects in the changed code.

What I ran

Reviewed head 80f1021bff73ad815a0d73d64d301a6100808e89. No commands or tests were run in this review; the build and test results below were reported by the author.

Results

Check Result Note
Code review passed All three changed files read
Build and tests not run Author reports build and 1165 tests passed
Other reported checks not run Debt, conventions, and diff checks reported passed

Findings

Blocking

None.

Non-blocking

None.

Not verified

The reported build, tests, and repository checks were not independently run. No title or homebrew was tested, per the PR description. All changed files listed in the manifest were read; no files were excluded.

To get this to a good state

Nothing is required.

@Plyxen Plyxen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Checked head 80f1021bff. I applied it to main ad7582bad4 together with #27668, #27649 and #27560, which touch different files. On Windows 11 with WinLibs GCC 15.2 (Release), tools/check_conventions.py --head on each head and tools/debt_fold.py --check passed, the build succeeded, and all 4,930 CPU tests passed (I left out the GPU tests). The ten relinker and codegen tests I ran for these four (amd64_only_converter, amd64_only_windows, red_zone_framer, red_zone_framer_execution, lane_split_lowering, relinker_conversion and four more) passed.

lane_split_lowering now runs the memory-source forms through [rdi+512], and VPMOVMSKB into every destination register from 0 to 15, RDI included. For that, the shared harness saves RDI on the stack and reloads it from there (push rdi, mov rdi, [rsp], and pop rdi before the return). This is test-only, so there is no main-source control to run.

AI-assisted: yes (Claude Code)

@github-actions github-actions Bot added the open PR limit Closed over the open PR limit: 1 without merged PRs, 20 with at least 1, none from 20 label Nov 27, 2026
@github-actions

Copy link
Copy Markdown

Thank you for your contribution! Authors with no pull requests merged into main can have 1 open pull request at a time, authors with at least 1 merged can have 20, and from 20 merged there is no limit. This PR has been automatically closed and labeled "open PR limit" because that limit was reached. This is not a judgment of the quality of your changes: reopen it once one of your open pull requests is merged or closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs open PR limit Closed over the open PR limit: 1 without merged PRs, 20 with at least 1, none from 20 relinker

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants