Repository navigation
feat(shader): implement s_bfe_i64 - #838
Closed
ebosido444-ai wants to merge 1 commit into
Closed
ebosido444-ai wants to merge 1 commit into
ebosido444-ai wants to merge 1 commit into
Conversation
9 tasks done
|
Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.
|
Contributor
Author
|
Closing in favour of #234, which implements the same function and predates this by five days (both converged on the same sBfeU64(inst, bool sign) widening and shift-align sign extension). #234 is complete with full-suite evidence. One process note for the record: my duplicate check missed #234 because a capped PR listing never reached it — the pr-overlap report above caught it. No functional difference worth merging here. |
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.
What
s_bfe_i64(SOP2 0x2a) is the last SOP2 hole — shaders using a signed 64-bit bitfield extract die at translation withunsupported SOP2 opcode. Implemented as the sign twin of the existings_bfe_u64, exactly the pairing ofs_bfe_u32/s_bfe_i32:sBfeU64widens tosBfeU64(inst, bool sign)over a sharedextractBits64(the clamp-and-mask the unsigned path already had, plus the sign-extension idiom the 32-bit pair uses), so the unsigned path is byte-equivalent for its callers and the two 32/64 families now read symmetrically. Shader progress: 1125 to 1126 out of 1166 on top of currentmain(1127 combined with #821).Encoding sourced from LLVM's AMDGPU backend table
SOP2_Real_gfx6_gfx7_gfx10_gfx13<0x02a>— the PS5 generation (gfx11/gfx12 renumber this family, so the row is generation-specific). Field descriptor layout (offsetin bits 5:0,sizein bits 22:16) is the one the existings_bfe_u64already decodes; sizes are clamped to the bits remaining above the offset as before, and the extracted field sign-extends from its top bit.Tested
Windows 11:
core/libs/tests/ScalarBfe64.cpp(registered asscalar_bfe64) decodes both 0x2a and 0x29 throughDecodeRdnaSop2, asserts family and the two-dword destination bookkeeping (IsScalarAluOpcodeaccepted), translates both, and distinguishes them in the IR:ShiftRightArithmetic64is present exactly for the signed form and the sharedBitwiseAnd64clamp present for both. Standalone run passes. Scoped CMake/CTest suite (winlibs GCC 15.2.0 per BUILD.md):scalar_bfe64,scalar_bitcount64,scalar_saveexec,guest_rtc— 4/4 passed.tools/progress.py: shaders 1125 -> 1126 out of 1166 on this branch.Checklist
main; no other open PR implements the same functions (checked open-PR titles and diffs for BFE/bitfield — none)NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository