startup: lower v_mul_hi_u32 in gfx2hlsl #2425
No reviewers
Labels
No labels
accessibility
awaiting author
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
priority: P0
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/R0Y00--Xbox2Windows!2425
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2425/head"
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?
@stan495 on GitHub · 2026-11-25 16:21 UTC · original
stan495:startup/v-mul-hi-u32→main· +101 −1 · 5 files · 1 commits · closed without mergingSummary
Lower RDNA 2 unsigned 32-bit high-half vector multiply (_mul_hi_u32 / _mul_hi_u32_e64) in ools/startup/gfx2hlsl.py by adding 'v_mul_hi_u32': (2, 'mul_hi_u32({0}, {1})') to VEC_U, reusing the existing overflow-free 32-bit mul_hi_u32(uint, uint) HLSL helper already emitted for s_mul_hi_u32.
Verification
70c4b571(based on upstream/main7092683a)python -B tests/startup_gfx2hlsl_mul_hi_u32_check.py-> PASSpython -B tests/startup_gfx2hlsl_int_med3_check.py-> PASSpython -B tests/startup_gfx2hlsl_operand_count_check.py-> PASS (VEC_U: 42 operations, 0 failed)python -B tests/startup_gfx2hlsl_handler_arity_check.py-> PASS (33 accepted instructions, 99 scalar refusals, 16 load refusals)python -B tests/docs_links_check.py-> PASS (19 Markdown files, 464 links)python -B tests/bidi_controls_check.py-> PASS (1723 tracked files)@MasterDomino on GitHub · 2026-11-25 16:23 UTC · original · reviewed
Review of head
70c4b571(base7092683a).P1 (process): this duplicates #1747, which is further along. The two can't both land.
'v_mul_hi_u32': (2, 'mul_hi_u32({0}, {1})')toVEC_U, reusing themul_hi_u32helpermainalready emits fors_mul_hi_u32. The two would conflict on thatVEC_Uline and would register two tests for the same op.binary <llvm-mc>anddrawmodes, a helper-arithmetic check on 361 edge pairs, a carry-drop mutation, the encoded literal from #1792, and an experiments entry. R0Y00 re-reviewed it today at02328b26: Release 5/5 on WARP and RTX 4060 Laptop, FXC and DXC matched all 12 operand pairs, and the LLVM round trip passed. Earlier duplicates (#1793, #1952) were closed in its favour.binarymode, whichgfx2hlsllowering PRs normally carry.Suggestion: close this in favour of #1747. If you want to keep the parts #1747 doesn't have, the explicit negative control that removes the
VEC_Uentry and the negative inline-constant operand could go to #1747's author as a small follow-up totests/startup_gfx2hlsl_mul_hi_check.py. TheAGENTS.mdlist entry would then point at that test instead.What I ran (Windows 11 build 26300)
python -B tests/startup_gfx2hlsl_mul_hi_u32_check.pygivesPASS.02328b26: it merges cleanly with currentmain. Controls pass;binarywith llvm-mc 15.0.7 givesfixture words match llvm-mc. The draws pass with FXCps_5_1and DXCps_6_0, debug layer on, on WARP 10.0.26100.9818 and on an AMD Radeon RX 9070 XT (1002:7550, driver 32.0.32029.2010), with the low-word mutation diverging. Posted on #1747 too.Nit
\tand\vwere rendered, sotools/reads as a tab plus "ools" andv_mul_hi_u32shows as_mul_hi_u32.AI-assisted; commands listed were executed locally.
Pull request closed