startup: keep a descriptor loaded in an execz arm for reads before the exec restore in gfx2hlsl #2705
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2713"
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 R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:13:18Z.
Part of #1723
What this unblocks: a pixel shader whose
s_cbranch_execzskips ans_loadof a descriptor and reads that descriptor at the join, before the exec restore, now translates instead of being refused as "joined at a branch target".What changed
tools/startup/gfx2hlsl.py: at a join that onlys_cbranch_execzedges skip to (plus the fall-through arm), a descriptor word written by the fall-through arm is kept (exec_keep, rule R1) until exec is written again, a branch or another join is reached, or a scalar instruction reads it.exec_zero_keepabledecides it: the register holds a descriptor symbol on the fall-through path, no other edge into the target writes it, and no instruction between the first skipping branch and the target writes exec.Why it is correct
On every taken
s_cbranch_execzedge exec is 0 (RDNA 2 ISA, EXECZ condition). The lanes that skipped the arm therefore do nothing until exec is written again, and the lanes that ran the arm hold the arm's descriptor. A vector memory read at the join that runs before the exec restore only has the arm's lanes active, so reading the arm's descriptor is exact for them.What stays refused
A read after the exec restore (a lane that skipped the arm is active again and would read a descriptor it never loaded):
EXEC_DESC_AFTERis still refused withholds ('joined at a branch target',). Any join with another writer of the register, a path where exec is written between the branch and the join, and every non-descriptor value keep the existing behaviour.Tests
tests/startup_gfx2hlsl_join_symbols_check.py: two source-built wave64 fixtures,EXEC_DESC_MASKED(the image load at the join runs before the restore: translates, the load reads the arm's descriptor) andEXEC_DESC_AFTER(the load runs after the restore: refused).binarymode assembles both withllvm-mc(-mattr=+wavefrontsize64) to the recorded words. Onorigin/mainthe check fails onEXEC_DESC_MASKED(descriptor operand s[16:23] holds ('joined at a branch target',)); with the change it passes.Verification
python3 tests/startup_gfx2hlsl_join_symbols_check.py: PASS (fails onorigin/main)python3 tests/startup_gfx2hlsl_join_symbols_check.py binary llvm-mc-19: PASStests/startup_*check.pyrun with no arguments on this branch and onorigin/main(aa16aae1a): the same result for every script (all exit 0).9533a351fb2b40451cb4ec5492774d0fac3e710f, copy-paste commands: Result: dev 5/5 passed, release 5/5 passed.maingives the same exit code asmainfor all 241tests/startup_*check.pyrun with no arguments (64 of them exit nonzero on both because they need arguments or a renderer).startup_gfx2hlsl_join_symbols_check.py binary llvm-mc-19passes. Twelve variants of the two fixtures (assembled withllvm-mc, wave64) were translated: masked reads before the restore translate; a read after the restore, before and after the restore, two joins before the read, a scalar overwrite of a descriptor word, a scalar read of the descriptor at the join are refused. Three mutations (rule off, window never closed, exec write not closing it) each failEXEC_DESC_MASKEDorEXEC_DESC_AFTER.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T03:41:25Z.
Review: COMMENTED
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit:
9533a351fbℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:00:35Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:00:39Z.
Review: COMMENTED
No description provided.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T03:28:06Z.
@MasterDomino this is ready for review at head
9533a351.Independent gate review plus Windows run, one round, no change requested. What was checked:
startup_gfx2hlsl_join_symbols_check.pyand itsbinarymode pass; the merge with currentmaingives the same exit code asmainfor all 241startup_*check.pyscripts;EXEC_DESC_MASKEDorEXEC_DESC_AFTER;ctest -R startup_gfx2hlsl_join_symbols5/5 ondevand 5/5 onrelease, commands and results are in the PR body.One gap worth knowing: this PR's own test is translation-only, so no check in the repo draws the masked-read program on a GPU. A readback outside the repo (16 x 16 pixels on WARP, the descriptor read before the restore and the skipped-arm case) matched the CPU reference, and its two wrong-value controls failed as they should, so the rule itself holds; a follow-up could move that draw into
startup_gfx2hlsl_join_symbols_check.py dispatch.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T03:28:05Z.
Codex Review Summary: ✅ Completed
This comment shows the latest Codex review activity on this pull request.
9533a35ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:04:27Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
6b8961fb74755aa1edd5486536c75a10d8625c65:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2):2.28s(configure2.98s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2):2.40s(configure3.38s)tests/mesh_heap_sampler_check.pyok (1.1s),tests/startup_buffer_address_check.pyok (0.8s),tests/startup_buffer_format_word3_table_check.pyok (0.1s),tests/startup_compute_request_offline_check.pyok (0.8s),tests/startup_compute_store_format_xyzw_check.pyok (0.3s),tests/startup_compute_translate_check.pyok (0.3s),tests/startup_flat_param_check.pyok (0.2s),tests/startup_gfx2hlsl_add_sub_co_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_ci_check.pyok (0.2s),tests/startup_gfx2hlsl_bit_alu_check.pyok (1.2s),tests/startup_gfx2hlsl_capture_check.pyok (1.4s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.6s),tests/startup_gfx2hlsl_cmp_class_f16_sdwa_check.pyok (49.5s),tests/startup_gfx2hlsl_compare_dst_check.pyok (0.2s),tests/startup_gfx2hlsl_compute_check.pyok (0.6s),tests/startup_gfx2hlsl_cselect_mask_check.pyok (0.2s),tests/startup_gfx2hlsl_cvt_alu_check.pyok (0.3s),tests/startup_gfx2hlsl_cvt_off_f32_i4_check.pyok (0.4s),tests/startup_gfx2hlsl_cvt_pk_int16_check.pyok (0.6s),tests/startup_gfx2hlsl_f32_lg_check.pyok (2.2s),tests/startup_gfx2hlsl_f32_nan_check.pyok (9.4s),tests/startup_gfx2hlsl_fma_mix_check.pyok (0.2s),tests/startup_gfx2hlsl_getpc_refusal_check.pyok (0.2s),tests/startup_gfx2hlsl_handler_arity_check.pyok (0.2s),tests/startup_gfx2hlsl_heap_record_check.pyok (0.4s),tests/startup_gfx2hlsl_image_arity_check.pyok (0.2s),tests/startup_gfx2hlsl_image_get_lod_check.pyok (0.3s),tests/startup_gfx2hlsl_int_med3_check.pyok (0.2s),tests/startup_gfx2hlsl_interp_p2_hi_check.pyok (0.4s),tests/startup_gfx2hlsl_join_symbols_check.pyok (0.4s),tests/startup_gfx2hlsl_loop_constants_check.pyok (0.2s),tests/startup_gfx2hlsl_mask_data_check.pyok (0.1s),tests/startup_gfx2hlsl_mask_overwrite_check.pyok (0.2s),tests/startup_gfx2hlsl_operand_count_check.pyok (0.6s),tests/startup_gfx2hlsl_pack_absdiff_check.pyok (5.0s),tests/startup_gfx2hlsl_pack_b32_f16_check.pyok (0.3s),tests/startup_gfx2hlsl_readfirstlane_recompute_check.pyok (0.2s),tests/startup_gfx2hlsl_readfirstlane_uniform_check.pyok (0.2s),tests/startup_gfx2hlsl_refusals_check.pyok (1.0s),tests/startup_gfx2hlsl_root_check.pyok (1.1s),tests/startup_gfx2hlsl_s_abs_check.pyok (0.2s),tests/startup_gfx2hlsl_s_bitset_check.pyok (0.2s),tests/startup_gfx2hlsl_s_ff0_check.pyok (0.2s),tests/startup_gfx2hlsl_s_ff1_check.pyok (0.2s),tests/startup_gfx2hlsl_s_flbit_check.pyok (0.2s),tests/startup_gfx2hlsl_s_quadmask_check.pyok (0.2s),tests/startup_gfx2hlsl_sad_check.pyok (0.5s),tests/startup_gfx2hlsl_saveexec_same_reg_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_arity_check.pyok (0.3s),tests/startup_gfx2hlsl_scalar_brev_fold_check.pyok (0.3s),tests/startup_gfx2hlsl_scalar_m0_check.pyok (0.3s),tests/startup_gfx2hlsl_scalar_null_check.pyok (0.3s),tests/startup_gfx2hlsl_scalar_table_arity_check.pyok (0.5s),tests/startup_gfx2hlsl_sdwa_cndmask_check.pyok (0.3s),tests/startup_gfx2hlsl_sdwa_cvt_check.pyok (0.5s),tests/startup_gfx2hlsl_sgpr_spill_check.pyok (0.3s),tests/startup_gfx2hlsl_shift64_check.pyok (0.3s),tests/startup_gfx2hlsl_sload_const_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_smem_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (9.5s),tests/startup_gfx2hlsl_sopk_accum_check.pyok (1.8s),tests/startup_gfx2hlsl_sopk_signext_check.pyok (0.2s),tests/startup_gfx2hlsl_spill_branches_check.pyok (1.4s),tests/startup_gfx2hlsl_swap_check.pyok (0.5s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (7.4s),tests/startup_gfx2hlsl_waitcnt_depctr_check.pyok (0.1s),tests/startup_gfx2hlsl_watch_check.pyok (2.9s),tests/startup_image_2d_array_check.pyok (0.2s),tests/startup_image_3d_check.pyok (0.2s),tests/startup_image_gather_lz_check.pyok (0.8s),tests/startup_image_load_d16_check.pyok (1.3s),tests/startup_image_sample_a16_check.pyok (0.2s),tests/startup_image_sample_b_check.pyok (0.3s),tests/startup_image_sample_c_check.pyok (0.3s),tests/startup_image_sample_l_check.pyok (0.2s),tests/startup_image_sample_lod_check.pyok (1.0s),tests/startup_inline_sampler_check.pyok (0.3s),tests/startup_mesh57_depth_only_check.pyok (0.4s),tests/startup_mesh57_lane_spill_check.pyok (0.4s),tests/startup_mesh57_loop_check.pyok (0.3s),tests/startup_mesh57_loop_refusal_check.pyok (0.3s),tests/startup_mesh57_skeleton_check.pyok (1.8s),tests/startup_run_ps1_check.pyok (20.4s),tests/startup_run_sh_check.pyskipped (0.1s),tests/startup_sampler_heap_check.pyok (0.3s),tests/startup_shader_cache_rekey_check.pyok (3.4s),tests/startup_smem_address_check.pyok (0.2s),tests/startup_stream_fetch_check.pyok (0.4s),tests/startup_stream_interface_check.pyok (0.4s),tests/startup_translator_check.pyok (0.7s)sccache: 93/311 hits; wall171.8sAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T03:41:25Z.
Code review location:
tools/startup/gfx2hlsl.py; line 3020When the execz target itself is
s_buffer_load_dword s30, s[16:19], 0x0, this check runs before the join populatesexec_keep, so the target instruction bypasses the scalar-read guard. A pure-Python variant ofEXEC_DESC_MASKEDwith that load at the join, followed by the EXEC restore and a read of s30, is accepted and emits an unconditionalr0.Load. Scalar instructions execute even with EXEC zero, so the translation binds the arm's resource on an edge that never loaded its descriptor instead of refusing the unsupported read. The parent refuses this variant, and inserting ones_nopbefore the scalar load also makes this commit refuse it. Validate scalar reads in the join instruction after installing the kept symbols.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by chatgpt-codex-connector[bot] on 2026-11-26T03:41:25Z.
Code review location:
tools/startup/gfx2hlsl.py; line 4096If code unconditionally reloads the same descriptor between the join and the EXEC restore, the load recreates exactly the tuples stored in
exec_keep, but its writes never retire those markers. This equality check therefore poisons the fresh, all-path definitions after EXEC changes, causing a subsequentimage_loadto be refused asjoined at a branch target. DuplicatingEXEC_DESC_MASKED's descriptor load and wait at the join and moving the image read after the restore reproduces the regression: the parent translates it, while this commit refuses it. Retire a register's keep marker on an unconditional redefinition, even when the replacement symbol compares equal.Useful? React with 👍 / 👎.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:00:35Z.
Code review location:
tools/startup/gfx2hlsl.py; line 3020Fixed in
62484f4b0(now on head6b8961fb7, merged with current main). The join instruction itself now runs the scalar-read check after the keep markers are installed (end_exec_keep_scalar_read), sos_mov_b32 s30, s17at the join refuses withnumeric use of s17 holding joined at a branch target. New fixtureEXEC_DESC_SCALAR_JOINintests/startup_gfx2hlsl_join_symbols_check.py: the parent commit accepts it, this commit refuses it.Commands run:
python3 tests/startup_gfx2hlsl_join_symbols_check.py-> passpython3 tests/startup_gfx2hlsl_join_symbols_check.py binary llvm-mc-19-> fixture words matchAI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T04:00:39Z.
Code review location:
tools/startup/gfx2hlsl.py; line 4096Fixed in
62484f4b0(now on head6b8961fb7, merged with current main). A descriptor load (s_load*/s_buffer_load*) that redefines a kept register now retires its keep marker without poisoning it, so the fresh definition stays readable after the EXEC restore. New fixtureEXEC_DESC_RELOAD(reload at the join, restore, thenimage_load): the parent commit refuses it withholds ('joined at a branch target',), this commit translates it tor0.Load.Commands run:
python3 tests/startup_gfx2hlsl_join_symbols_check.py-> passpython3 tests/startup_gfx2hlsl_join_symbols_check.py binary llvm-mc-19-> fixture words matchtests/startup_gfx2hlsl_*check.pyscripts: 110 exit 0; the 2 that exit 1 need arguments or a renderer (same as on main)AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T06:25:09Z.
Review: CHANGES_REQUESTED
Reviewed
6b8961fb. The R1 rule and both Codex fixes read correctly, and the masked, after, scalar-join and reload fixtures hold.One hole remains: when the join instruction is itself a branch, the kept arm symbol goes into the
incomingsnapshot (gfx2hlsl.py:3114-3122) beforeend_exec_keepcan close the window, because that only runs at the top of the next instruction. The next target then receives the arm's descriptor, and a read after the exec restore translates.Each of these is refused on
mainand emitst = r0.Load(...)here. The common prefix is wave64, assembled with llvm-mc 15:s_and_saveexec_b64 s[6:7], vcc; s_cbranch_execz T; s_load_dwordx8 s[16:23], s[8:9], 0x0; s_waitcnt lgkmcnt(0); T:.s_branch T2; T2: s_or_b64 exec, exec, s[6:7]; image_load v[4:7], v[0:1], s[16:23] ...s_branch T2; s_endpgm; T2: <restore>; <image_load>s_cbranch_scc1 T2; s_endpgm; T2: <restore>; <image_load>That's the case the PR says stays refused: a lane that skipped the arm reads a descriptor it never loaded.
Requested:
s_setpc_b64).s_nop; s_branch T2; s_endpgm; T2: restore; image_load). Removing the branch condition fromend_exec_keepcurrently still passes the check.Cache revision: no bump needed. All 673 translations made by the gfx2hlsl, image and compute checks on
mainare identical on this branch merged withmain; onlyEXEC_DESC_MASKEDis new.Runs: Windows 11 build 26300; AMD Radeon RX 9070 XT (driver 32.0.32029.2010); WARP 10.0.26100.9818.
ctest --preset dev -R startup_gfx2hlsl_join_symbols: 5/5.startup_gfx2hlsl_join_symbols_check.py binarywith llvm-mc 15: words match.ctest --preset dev -R startup_gfx2hlsl -j 6: 250/251. The failure,fma_mix_dispatch_hardware, also fails onmainon this GPU (#2746).Mutants:
AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by MasterDomino on 2026-11-26T06:51:27Z.
Review: APPROVED
Approving
68dd9612. My change request is resolved.dd182fddretires every kept execz descriptor at the join instruction when that instruction is a branch (s_cbranch*,s_branchors_setpc_b64), before the branch records its incoming edge.EXEC_DESC_JOIN_BRANCHandEXEC_DESC_JOIN_SCCcover a branch at the join, andEXEC_DESC_BRANCH_INcovers a branch inside the window.Checked at this head (Windows 11 build 26300):
python -B tests/startup_gfx2hlsl_join_symbols_check.pyends with "18 refusal controls and the old behaviour hold".retire_exec_keepcall replaced bypass, the same check fails:EXEC_DESC_JOIN_BRANCH accepted, expected a refusal naming "holds ('joined at a branch target',)". Restored, it passes.6b8961fb. This change only adds refusals.AI-assisted; commands listed were executed locally.
Imported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T07:12:26Z.
Verified on Windows Server 2025 (Build 26100, MSVC 14.44.35207 + D3D12 WARP) at commit
68dd9612cdcb3b9d937c27469b41dde2f7edb8e5:--preset dev):cmake --build --preset dev --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2):1.12s(configure1.82s)ctest --preset dev -R 'startup_gfx2hlsl_join_symbols' --parallel 6 --no-tests=error --output-on-failure): 5/5 passed (0.51s:startup_gfx2hlsl_join_symbols_folded_hardware0.29s,startup_gfx2hlsl_join_symbols_folded_warp0.30s,startup_gfx2hlsl_join_symbols_controls0.31s,startup_gfx2hlsl_join_symbols_hardware0.38s,startup_gfx2hlsl_join_symbols_warp0.39s)/O2(--preset release):cmake --build --preset release --target d3d12_xs_device_obj d3d12_xs_shim startup_buffer_format_word3_check -- -j 2):1.49s(configure1.85s)ctest --preset release -R 'startup_gfx2hlsl_join_symbols' --parallel 6 --no-tests=error --output-on-failure): 5/5 passed (0.42s:startup_gfx2hlsl_join_symbols_folded_warp0.24s,startup_gfx2hlsl_join_symbols_controls0.26s,startup_gfx2hlsl_join_symbols_folded_hardware0.26s,startup_gfx2hlsl_join_symbols_hardware0.30s,startup_gfx2hlsl_join_symbols_warp0.31s)tests/mesh_heap_sampler_check.pyok (0.5s),tests/startup_buffer_address_check.pyok (0.4s),tests/startup_buffer_format_word3_table_check.pyok (0.1s),tests/startup_compute_global_load_check.pyok (0.2s),tests/startup_compute_request_offline_check.pyok (0.5s),tests/startup_compute_store_format_xyzw_check.pyok (0.2s),tests/startup_compute_translate_check.pyok (0.2s),tests/startup_flat_param_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_check.pyok (0.1s),tests/startup_gfx2hlsl_add_sub_co_ci_check.pyok (0.1s),tests/startup_gfx2hlsl_bfm_b64_check.pyok (1.0s),tests/startup_gfx2hlsl_bit_alu_check.pyok (0.6s),tests/startup_gfx2hlsl_capture_check.pyok (1.0s),tests/startup_gfx2hlsl_cmp16_check.pyok (0.2s),tests/startup_gfx2hlsl_cmp_class_f16_sdwa_check.pyok (26.6s),tests/startup_gfx2hlsl_compare_dst_check.pyok (0.1s),tests/startup_gfx2hlsl_compute_check.pyok (0.4s),tests/startup_gfx2hlsl_const_copy_join_check.pyok (0.1s),tests/startup_gfx2hlsl_cselect_mask_check.pyok (0.1s),tests/startup_gfx2hlsl_cvt_alu_check.pyok (0.2s),tests/startup_gfx2hlsl_cvt_off_f32_i4_check.pyok (0.2s),tests/startup_gfx2hlsl_cvt_pk_int16_check.pyok (0.2s),tests/startup_gfx2hlsl_f32_lg_check.pyok (1.0s),tests/startup_gfx2hlsl_f32_nan_check.pyok (4.0s),tests/startup_gfx2hlsl_fma_mix_check.pyok (0.1s),tests/startup_gfx2hlsl_getpc_refusal_check.pyok (0.1s),tests/startup_gfx2hlsl_handler_arity_check.pyok (0.1s),tests/startup_gfx2hlsl_heap_record_check.pyok (0.2s),tests/startup_gfx2hlsl_heap_word_check.pyok (0.2s),tests/startup_gfx2hlsl_image_arity_check.pyok (0.1s),tests/startup_gfx2hlsl_image_get_lod_check.pyok (0.1s),tests/startup_gfx2hlsl_int_med3_check.pyok (0.1s),tests/startup_gfx2hlsl_interp_p2_hi_check.pyok (0.2s),tests/startup_gfx2hlsl_join_symbols_check.pyok (0.2s),tests/startup_gfx2hlsl_loop_constants_check.pyok (0.1s),tests/startup_gfx2hlsl_mask_data_check.pyok (0.1s),tests/startup_gfx2hlsl_mask_overwrite_check.pyok (0.1s),tests/startup_gfx2hlsl_operand_count_check.pyok (0.3s),tests/startup_gfx2hlsl_pack_absdiff_check.pyok (2.0s),tests/startup_gfx2hlsl_pack_b32_f16_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_load_recompute_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_recompute_check.pyok (0.1s),tests/startup_gfx2hlsl_readfirstlane_uniform_check.pyok (0.1s),tests/startup_gfx2hlsl_refusals_check.pyok (0.5s),tests/startup_gfx2hlsl_root_check.pyok (0.7s),tests/startup_gfx2hlsl_s_abs_check.pyok (0.1s),tests/startup_gfx2hlsl_s_bitset_check.pyok (0.1s),tests/startup_gfx2hlsl_s_ff0_check.pyok (0.1s),tests/startup_gfx2hlsl_s_ff1_check.pyok (0.1s),tests/startup_gfx2hlsl_s_flbit_check.pyok (0.1s),tests/startup_gfx2hlsl_s_quadmask_b64_check.pyok (0.1s),tests/startup_gfx2hlsl_s_quadmask_check.pyok (0.1s),tests/startup_gfx2hlsl_sad_check.pyok (0.3s),tests/startup_gfx2hlsl_sad_hi_msad_check.pyok (0.3s),tests/startup_gfx2hlsl_saveexec_same_reg_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_arity_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_brev_fold_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_m0_check.pyok (0.1s),tests/startup_gfx2hlsl_scalar_null_check.pyok (0.2s),tests/startup_gfx2hlsl_scalar_table_arity_check.pyok (0.3s),tests/startup_gfx2hlsl_sdwa_cndmask_check.pyok (0.2s),tests/startup_gfx2hlsl_sdwa_cvt_check.pyok (0.2s),tests/startup_gfx2hlsl_sgpr_spill_check.pyok (0.1s),tests/startup_gfx2hlsl_shift64_check.pyok (0.2s),tests/startup_gfx2hlsl_sload_const_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_smem_offset_check.pyok (0.1s),tests/startup_gfx2hlsl_sop2_complement_check.pyok (4.6s),tests/startup_gfx2hlsl_sopk_accum_check.pyok (0.9s),tests/startup_gfx2hlsl_sopk_signext_check.pyok (0.1s),tests/startup_gfx2hlsl_spill_branches_check.pyok (0.8s),tests/startup_gfx2hlsl_swap_check.pyok (0.3s),tests/startup_gfx2hlsl_vopc_sdwa_check.pyok (3.6s),tests/startup_gfx2hlsl_waitcnt_depctr_check.pyok (0.1s),tests/startup_gfx2hlsl_watch_check.pyok (2.4s),tests/startup_image_2d_array_check.pyok (0.1s),tests/startup_image_3d_check.pyok (0.1s),tests/startup_image_gather_lz_check.pyok (0.5s),tests/startup_image_load_d16_check.pyok (0.8s),tests/startup_image_sample_a16_check.pyok (0.2s),tests/startup_image_sample_b_check.pyok (0.2s),tests/startup_image_sample_c_check.pyok (0.2s),tests/startup_image_sample_l_check.pyok (0.2s),tests/startup_image_sample_lod_check.pyok (0.5s),tests/startup_inline_sampler_check.pyok (0.1s),tests/startup_mesh57_depth_only_check.pyok (0.2s),tests/startup_mesh57_lane_spill_check.pyok (0.2s),tests/startup_mesh57_loop_check.pyok (0.2s),tests/startup_mesh57_loop_refusal_check.pyok (0.1s),tests/startup_mesh57_skeleton_check.pyok (0.9s),tests/startup_run_ps1_check.pyok (8.6s),tests/startup_run_sh_check.pyskipped (0.1s),tests/startup_sampler_heap_check.pyok (0.1s),tests/startup_shader_cache_rekey_check.pyok (2.1s),tests/startup_smem_address_check.pyok (0.1s),tests/startup_stream_fetch_check.pyok (0.2s),tests/startup_stream_interface_check.pyok (0.2s),tests/startup_translator_check.pyok (0.4s)sccache: 6/8 hits; wall88.4sImported from R0Y00/Xbox2Windows. Originally posted by tedin7 on 2026-11-26T07:12:28Z.
@MasterDomino all three requests are done at head
68dd9612c(merged with currentmain).s_branch,s_cbranch*, or a provens_setpc_b64), every kept register is retired before the branch records its incoming edge (gfx2hlsl.py, next to the join-time scalar-read check). The next target no longer receives the arm's descriptor, so a read after the restore is refused.tests/startup_gfx2hlsl_join_symbols_check.py, wave64, words checked withbinary llvm-mc-19:EXEC_DESC_JOIN_BRANCH: joins_branch T2, restore,image_load(your first program);EXEC_DESC_JOIN_SCC: joins_cbranch_scc1 T2; s_endpgm; T2: restore; image_load(your third).Both were accepted before the fix and are refused now with
holds ('joined at a branch target',).EXEC_DESC_BRANCH_IN:s_nop; s_branch T2; s_endpgm; T2: restore; image_load, refused. I removed the branch condition fromend_exec_keeplocally: the check now fails on this fixture, so that mutant is caught.Commands run:
python3 tests/startup_gfx2hlsl_join_symbols_check.py-> pass (fails on the three new fixtures without the fix)python3 tests/startup_gfx2hlsl_join_symbols_check.py binary llvm-mc-19-> fixture words matchtests/startup_gfx2hlsl_*check.pyon Linux: only the two draw checks that needdraw <dxc> ...arguments exit non-zero68dd9612c: receipt in the comment below (startup_gfx2hlsl_join_symbolsctest 5/5, py checks ok)Cache revision: no bump, as you measured.
AI-assisted; commands listed were executed locally.