shader: an execz skip's edge needs nothing from a join relayed by a jump to an AND with EXEC #373
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/373"
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 LakshanSivakumar/Native-Victory-macOS. Originally posted by alexballvideos-netizen on 2026-11-27T14:31:09Z.
Refs #258
Makes
compute d3ff71633430b06dtranslate. It was refused as "a lane-mask join of an untracked mask: a value the translation could not make"; the maintainer listed it as open next to the tile classifier on #258.Cause. #304 (
78cd3fed,4cdcbad7) taughtLower::unneeded_edgesthat an execz-taken edge brings an empty EXEC. So a join read only by AND, NAND or ORN2 with EXEC needs nothing from that edge.In d3ff the join isn't read in its own block:
Val::Missing).Change (lower.rs,
unneeded_edges). A use at the relayed phi is satisfied when all of these hold:Jumpto the phi's block.The execz pattern and the keeps-EXEC classification are now shared closures, with unchanged semantics. It is sound for the same reason as #304: AND, NAND or ORN2 with an empty EXEC doesn't depend on the other operand. It is one hop only.
Tests (synthetic words only):
gfx_refusal_tests:a_join_relayed_by_a_jump_and_read_only_with_exec_needs_nothing_from_an_exec_skip: refused without the fix ("GFX10 code at 0x44: … data whose high dword is not known"); translates with it.a_relay_block_that_rewrites_exec_still_needs_the_dataanda_wave64_relay_skip_on_exec_lo_alone_does_not_make_an_edge_unneeded.split_wave_tests::a_mask_relayed_by_a_jump_and_read_only_with_exec_is_its_lanes_in_lockstep: values on Metal for flag 40, 4 and 0.run()returns data and doesn't take the empty early return.Corpus by output (my own dump, 21,579 shaders,
tools/corpus/compare.sh, origin/main728845d1vs this branch):d3ff71633430b06d)0b1eea61bf55c5da,1c98cf7eea2518d1,8476c76e7329d51e,995d5275c8bbdf04).s_and_b64 s, s, execbehind an execz.Checks.
cargo test -p victory-shader: 375 passed.-p victory-hle -p victory -p victory-gpu -p xtaskall passed, exceptnative_probe, which needs the Windows cross tools I don't have installed (same on main).cargo xtask policy: ok.Game run. M3 Max, 36 GB, macOS 27.2.1, Series X, headless, 240 s.
Docs: one sentence added to the
78cd3fedparagraph in docs/native-host.md.Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by LakshanSivakumar on 2026-11-27T16:05:19Z.
Merged in
be7dc1b5with the other shader PRs from tonight. Ran the tests (native arm64), Windows clippy, the policy check and a release build on the merged tree, and swept my full corpus of 21,600 shaders before and after: 0 lost, 352 newly translated, every changed output accounted for. I have not run the game on it yet. It was still a draft; I merged it because the change is complete and the corpus shows no losses. Thanks.