Repository navigation
Shaders: the RDNA decoder accepts the inline 0 in an unread VOP3 source - #25
Merged
ThatRecompDev merged 1 commit intoNov 25, 2026
Merged
Conversation
llvm-mc 23 writes source code 0x80 (inline constant 0) into the VOP3 sources an instruction does not read, where older releases wrote 0: a compare such as v_cmp_gt_u32_e64 s40, 4, v0 assembles to d4c40028 02020084. llvm-objdump lists it as the same compare, but the decoder made it .long, so any new test case with a VOP3 compare failed to translate. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01SKtJsfjasPuTLtS3mEXFru
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.
llvm-mc 23 writes source code 0x80 (the inline constant 0) into the VOP3 sources an instruction does not read, where the release that assembled the committed test binaries wrote 0.
v_cmp_gt_u32_e64 s40, 4, v0now assembles tod4c40028 02020084instead ofd4c40028 00020084. llvm-objdump lists both as the same compare, butVop3Decoderrequired unread sources to be 0 and made the dword.long, so a new compute case with a VOP3 compare, assembled with a current LLVM, fails to translate (UnsupportedProgramException: .long).The decoder now accepts 0 or the inline 0 there; any other value is still
.long.RdnaDecoderTests.An_unread_vop3_source_may_be_the_inline_zerodecodes the llvm-mc 23 words.Found while adding a test case for another change (the AMDGPU-enabled llvm-mc I used is MSYS2's ucrt64 build, since the official Windows release only has the x86 target).
🤖 Generated with Claude Code
https://claude.ai/code/session_01SKtJsfjasPuTLtS3mEXFru