shader: a spilled descriptor's phi agrees when its spills have one origin (#400) #422
No reviewers
Labels
No labels
accessibility
bug
claimed
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
tester report
urgent
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/LakshanSivakumar--Native-Victory-macOS!422
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-418"
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?
@lautarocherro on GitHub · 2026-11-27 17:31 UTC · original
lautarocherro:fix/spilled-descriptor-phis→main· +92 −19 · 2 files · 1 commits · merged 2026-11-28 00:28 UTCWhat this changes
Refs #404.
A descriptor spilled to VGPR lanes is followed back through
v_writelane_b32writes, and through phis of the VGPR when every edge spills the same value. The title's compiler restores a spilled descriptor inside a loop and spills it again, so the loop's edge spills the restored copy: another value with the same dwords.Tracer::spilledsaw two values and refused the descriptor as "a descriptor neither loaded nor built".The edges now agree when the values they spill have one origin in the copy propagation. That is the rule
propagate_copiesalready applies to SGPR phis: a copy keeps every bit, so the values hold the same descriptor.restorednow returns the origin itself, and "no origin yet" leaves the value for the next sweep, as before.How it was tested
cargo test -p victory-shader: passes. The new testresource::tests::a_descriptor_spilled_again_in_a_loop_is_still_the_loadfails without the change with "a descriptor neither loaded nor built".cargo test -p victory-gpu -p xtask(arm64, with the Metal Shader Converter), Windows clippy on the workspace with-D warnings, andcargo xtask policy: all pass (victory-gpu 412 tests).examples/sweepon 21,556 shaders from one run, mainb998bb65against this branch,tools/corpus/compare.sh:Checklist
VICTORY_*variable and documented (none)@Olima34 on GitHub · 2026-11-28 02:00 UTC · original
Thanks for this PR, now merged! For the record, an offline check on main
86cefd22(world corpus, 21,600 shaders):So the passes those shaders cost are now held by the next refusal classes, which helps rank what comes next.