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

Closed
nedara312-art wants to merge 1 commit from upstream-pr/27680 into main
nedara312-art commented 2026-11-26 23:42:09 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by nedara312-art on 2026-11-26T23:42:09Z.


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.

  • cmake --build build-relinker --parallel 4: passed.
  • ctest --test-dir build-relinker --output-on-failure -j4: 1165/1165 passed in 296.26 seconds.
  • python tools/debt_fold.py --check: passed.
  • python tools/check_conventions.py: passed.
  • git diff --check upstream/main...HEAD: passed.
  • python tools/pr_overlap.py --branch test/relinker-lanesplit-memory: reported #23747 and #24472 and could not automatically compare #23636. Manual comparison confirmed that #23636 adds lane-split forms and native comparisons, while #23747 and #24472 extend the shared Runner for reciprocal and FMA lowering. None implements this memory-operand coverage, and this PR does not build on them.

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.
<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5518678315 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27680). Originally posted by [nedara312-art](https://github.com/nedara312-art) on 2026-11-26T23:42:09Z. --- ### 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 <!-- OS, title or homebrew, what was checked. "Not tested" is a valid answer. A performance change: the summary lines of main and of this PR from the same machine and scene, with the traces attached, captured as the Performance report issue form describes. --> Windows 11, WinLibs GCC 16.2.0, relinker-only Release on current `main`. No title or homebrew tested. - `cmake --build build-relinker --parallel 4`: passed. - `ctest --test-dir build-relinker --output-on-failure -j4`: 1165/1165 passed in 296.26 seconds. - `python tools/debt_fold.py --check`: passed. - `python tools/check_conventions.py`: passed. - `git diff --check upstream/main...HEAD`: passed. - `python tools/pr_overlap.py --branch test/relinker-lanesplit-memory`: reported #23747 and #24472 and could not automatically compare #23636. Manual comparison confirmed that #23636 adds lane-split forms and native comparisons, while #23747 and #24472 extend the shared Runner for reciprocal and FMA lowering. None implements this memory-operand coverage, and this PR does not build on them. ### Checklist <!-- Rules behind each item: https://github.com/boykopovar/AnyPS5/blob/main/CONTRIBUTING.md --> - [x] Based on current `main`; no other open PR implements the same functions - [x] One topic per PR; follow-ups go in a new PR - [x] No comments in code except [technical debt](https://github.com/boykopovar/AnyPS5/blob/main/docs/dev/CONVENTIONS.md) and the licence notice of code adapted from upstream (see AGENTS.md) - [x] Unimplemented paths throw (`NotImplemented_nid_no_patch`); silent stubs are listed under Silent stubs in their library's [technical debt](https://github.com/boykopovar/AnyPS5/tree/main/docs/dev/debt) file - [x] No notes, investigation `.md` files or images added to the repository (attach them to this PR) - [x] New third-party code is a submodule built from source - [x] Generic behaviour, not specific to one title - [x] Depends on: none - [x] Fixes: none - [x] Unblocks: none - [x] GPUs tested: n/a - [x] AI-assisted: yes <!-- This is an auto-generated comment: release notes by coderabbit.ai --> <!-- coderabbit-ai-generated:v1 --> ## 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. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
MarcZX10 commented 2026-11-26 23:53:03 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by MarcZX10 on 2026-11-26T23:53:03Z.

Review: APPROVED


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.

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6081715105 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27680#pullrequestreview-6081715105). Originally posted by [MarcZX10](https://github.com/MarcZX10) on 2026-11-26T23:53:03Z. **Review:** APPROVED --- # 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 commented 2026-11-27 03:55:44 +00:00 (Migrated from github.com)

Imported from boykopovar/AnyPS5. Originally posted by Plyxen on 2026-11-27T03:55:44Z.

Review: APPROVED


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)

<!-- greyfinch-sync:boykopovar/AnyPS5:review:6083271014 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/pull/27680#pullrequestreview-6083271014). Originally posted by [Plyxen](https://github.com/Plyxen) on 2026-11-27T03:55:44Z. **Review:** APPROVED --- 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)

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5!27680
No description provided.