Shader tests: pin IR reachability and PHI invariants #1618
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1619"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from Marvisak/VIctory. Originally posted by ArnabSaga on 2026-11-24T19:52:02Z.
Summary
Adds seven synthetic regression and characterization tests to verify
CFG reachability, SSA construction, and PHI invariants in the shader IR.
During an independent investigation of VIC-BT-002, I found that the
reported failure mechanism does not reproduce on the current baseline.
The GFX10 decoder follows control-flow reachability and does not decode
instructions skipped by unconditional branches. Consequently, the
reported unreachable predecessors do not enter SSA construction through
the proposed failure path.
This PR preserves the existing behavior through targeted tests rather
than introducing an unnecessary production correction.
Coverage
The shared invariant helper additionally verifies:
Verification
Tested against baseline
ffe310e:git diff --check: passed.A separate bounded investigation of 937,420 synthetic programs
found no panics, unreachable IR blocks, or surviving NONE values
among successful builds.
Scope
Limitations
Verification used Rust 1.98.1 with GNU/MinGW.
MSVC and full workspace CI parity remain unverified.
AI-assisted investigation and testing using synthetic inputs only.
Refs #1242 (VIC-BT-002).
This PR does not claim to fix VIC-BT-002. It adds characterization
coverage for the existing compiler invariants.
Imported from Marvisak/VIctory. Originally posted by DenRakEiw on 2026-11-24T19:56:44Z.
Review: APPROVED
Verified locally merged onto
origin/main(Windows 11 x64, Rust 1.98.1 MSVC):cargo test -p victory-shader --lib ir::— 13 passed, 0 failed (including all new IR reachability and PHI invariant tests)cargo clippy -p victory-shader --all-targets— 0 warningscargo xtask policy— okClean, thorough regression test suite pinning IR reachability, dead-code pruning, irreducible loop splitting, and PHI predecessor ordering invariants. Looks good.
AI-assisted (Gemini 4 Neon).
Imported from Marvisak/VIctory. Originally posted by catminou4 on 2026-11-24T20:05:28Z.
Review: APPROVED
Test-only PR pinning IR invariants:
assert_well_formedchecks reachability, PHI argument/predecessor order, dead-code skipping before IR construction, irreducible-loop splitting and single-value PHI collapse — seven tests, all running on macOS.cargo test -p victory-shader --locked: 103 passed, 0 failed (+7). These guard the exact invariants the lane-mask and loop PRs rely on.Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T01:32:28Z.
Automated triage for the maintainers.
Needs rebase. This pull request conflicts with
main(conflicting:crates/victory-shader/src/ir.rs). It will be reviewed once it is rebased onto the currentmain.Generated by Claude Code
Imported from Marvisak/VIctory. Originally posted by Headache3318 on 2026-11-25T01:42:47Z.
Tested on Linux (Arch, kernel 7.3.5, 3× RTX 4090 driver 620.73.04), Rust 1.98.1 (pinned). PR head
1f47ee7applied cleanly onto currentmainccfb029.cargo test -p victory-shader --locked: 103 passed, 0 failed, 1 ignored. All tests pass, including the 7 new IR reachability/PHI invariants tests.cargo clippy -p victory-shader --all-targets -- -D warnings: 2 pre-existing unused-import errors in test code (fail identically on mainccfb029). The PR introduces no new clippy warnings.Not tested: Windows MSVC build, the title itself. AI-assisted.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.