Repository navigation
Conversation
MasterDomino
left a comment
Collaborator
There was a problem hiding this comment.
Review of head 70c4b571 (base 7092683a).
P1 (process): this duplicates #1747, which is further along. The two can't both land.
- Same change: the translator edit is identical to #1747's. Both add
'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. - #1747 has more coverage:
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. - #2425's own test is translator-level only: no GPU draw and no
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_U entry and the negative inline-constant operand could go to #1747's author as a small follow-up to tests/startup_gfx2hlsl_mul_hi_check.py. The AGENTS.md list entry would then point at that test instead.
What I ran (Windows 11 build 26300)
- This PR:
python -B tests/startup_gfx2hlsl_mul_hi_u32_check.pygivesPASS. - For comparison, #1747 at
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
- PR body escapes: the body has stray escape characters.
\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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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/main 7092683)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)