Skip to content

Test the pipeline end to end from C++ - #8

Closed
ZweZeya wants to merge 2 commits into
feat/select-queue-impl-pinnedfrom
test/end-to-end-from-cpp
Closed

ZweZeya wants to merge 2 commits into
feat/select-queue-impl-pinnedfrom
test/end-to-end-from-cpp

Conversation

@ZweZeya

@ZweZeya ZweZeya commented Oct 18, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #7 (feat/select-queue-impl-pinned). Last of the stack.

What this changes

Every test was hand-written IR, which is how the hidden result argument went unnoticed until it was measured by hand. lit now finds the pinned clang (only that one) and provides %cir_cxx, plus %cir_x86_64_cxx for x86-64 wherever the host's headers allow it (natively on x86-64, by target on macOS), since the return convention depends on the target.

  • queue-two-queues.cpp and -x86-64: the prototype's own example, recovered from git history, known verdicts checked, each against its own queue.
  • mutex.cpp: lifting the mutex path from real output.
  • select-and-lower.cpp: one SPSC and one MPMC queue of one type through the whole pipeline to the LLVM dialect; only the SPSC one is substituted.

README's Status table and docs/audit.md now reflect the stack.

How it was checked

33 of 33 pass, no warnings. Against main, the x86-64 and whole-pipeline tests fail (main segfaults lifting x86-64 output). The host-target queue test and the mutex test pass there: on AArch64 those paths already worked, so they guard rather than prove a fix. In CI, on x86-64, all of them run natively.

Checklist

  • CI is green
  • New behaviour has a test; a fixed bug has a test that failed before
  • No file moves or renames mixed in with substantive changes
  • The pinned LLVM revision is untouched, or this PR does nothing else

🤖 Generated with Claude Code

@ZweZeya
ZweZeya requested a review from apaznikov as a code owner October 18, 2026 05:15
@ZweZeya
ZweZeya force-pushed the feat/select-queue-impl-pinned branch from 74c71e6 to 57ea2a0 Compare October 18, 2026 05:20
@ZweZeya
ZweZeya force-pushed the test/end-to-end-from-cpp branch from 12e41dc to 328521c Compare October 18, 2026 05:20
ZweZeya and others added 2 commits October 18, 2026 13:23
Every test was hand-written IR, so nothing in the suite had seen what the
compiler actually emits, which is how the hidden result argument went
unnoticed until it was measured by hand.

lit now finds the pinned clang (only that one: another would be a
different frontend from the one the passes are built against) and
provides %cir_cxx to emit CIR for a program written against the shim.
%cir_x86_64_cxx emits for x86-64 wherever the host's headers allow it,
natively on an x86-64 host and by target on macOS, because whether a
record comes back through a hidden argument depends on the target.

- queue-two-queues.cpp and its -x86-64 twin: the prototype's own example,
  recovered from git history, with the known verdicts checked, each
  against its own queue.
- mutex.cpp: lifting the mutex path from real output.
- select-and-lower.cpp: one SPSC and one MPMC queue of the same type
  through the whole pipeline to the LLVM dialect; only the SPSC one is
  substituted and the anchor is gone.

Verified: 32 of 32 pass. Against dev, the x86-64 and whole-pipeline tests
fail (dev segfaults lifting x86-64 output); the host-target queue test and
the mutex test pass there, since on AArch64 those paths already worked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CI on Linux failed select-and-lower.cpp: the substitution happened (its
remark matched), but the check expected "cir.global external @single",
and on Linux the global is "cir.global external dso_local @single". The
checks now match only the name and the type.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ZweZeya
ZweZeya force-pushed the test/end-to-end-from-cpp branch from 328521c to 053bdb3 Compare October 18, 2026 05:24
@apaznikov

Copy link
Copy Markdown
Collaborator

Closing as superseded by #10, whose suite already compiles C++ through the whole pipeline (%wtc_cc), runs the results, and covers the two-queue example, the mutex path and a negative control. The x86-64 variants matter on an AArch64 host and add nothing on the Linux x86-64 runners the suite uses, so they were not ported; if development moves back to a Mac, the %cir_x86_64_cxx substitution from this PR is the right thing to bring back.

@apaznikov apaznikov closed this Oct 19, 2026
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.

2 participants