pixel_aot: lower the plain VOP1/VOP2 forms of bfrev, ffbh, ffbl and xnor #729

Closed
opened 2026-11-22 23:58:11 +00:00 by JB2WIN · 3 comments
JB2WIN commented 2026-11-22 23:58:11 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-22T23:58:11Z.


pixel_aot already lowers the DPP spellings of v_bfrev_b32, v_ffbh_u32, v_ffbh_i32, v_ffbl_b32 and v_xnor_b32 (DPP_INT32). The plain VOP1/VOP2 forms and their _e64 spellings are still rejected. A form-coverage run on 434fabe lists v_bfrev_b32, v_ffbh_u32, v_ffbh_i32 and v_ffbl_b32 (VOP1) and v_xnor_b32 (VOP2) as uncovered.

I'd like to take these. Proposed scope:

  • Add the five ops to the plain INTEGER table. They reuse the exact expressions and helpers of the merged DPP path: reversebits, firstbitlow, dpp_ffbh_u32/dpp_ffbh_i32 and ~(a ^ b). No new semantics.
  • clamp, modifiers and DPP/SDWA stay on their existing paths.
  • An integer-export draw with edge words: 0, all ones, sign bit only, single bits at both ends, alternating patterns. Mutations: ffbh_i32 vs ffbh_u32, ffbl vs ffbh, a dropped ~ in xnor, and reversebits removed. Plus form coverage, scanner checks and the LLVM 15 binary round trip.

A search found no open PR for these forms. AI-assisted (Claude Code).

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6549485576 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/735). Originally posted by [JB2WIN](https://github.com/JB2WIN) on 2026-11-22T23:58:11Z. --- `pixel_aot` already lowers the DPP spellings of `v_bfrev_b32`, `v_ffbh_u32`, `v_ffbh_i32`, `v_ffbl_b32` and `v_xnor_b32` (`DPP_INT32`). The plain VOP1/VOP2 forms and their `_e64` spellings are still rejected. A form-coverage run on `434fabe` lists `v_bfrev_b32`, `v_ffbh_u32`, `v_ffbh_i32` and `v_ffbl_b32` (VOP1) and `v_xnor_b32` (VOP2) as uncovered. I'd like to take these. Proposed scope: - Add the five ops to the plain `INTEGER` table. They reuse the exact expressions and helpers of the merged DPP path: `reversebits`, `firstbitlow`, `dpp_ffbh_u32`/`dpp_ffbh_i32` and `~(a ^ b)`. No new semantics. - `clamp`, modifiers and DPP/SDWA stay on their existing paths. - An integer-export draw with edge words: 0, all ones, sign bit only, single bits at both ends, alternating patterns. Mutations: `ffbh_i32` vs `ffbh_u32`, `ffbl` vs `ffbh`, a dropped `~` in xnor, and `reversebits` removed. Plus form coverage, scanner checks and the LLVM 15 binary round trip. A search found no open PR for these forms. AI-assisted (Claude Code).
R0Y00 commented 2026-11-24 06:48:53 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T00:26:37Z.


v_xnor_b32 is already merged in #728 with e32/e64 assembly and UINT readback. Please scope the follow-up to v_bfrev_b32, v_ffbh_u32, v_ffbh_i32 and v_ffbl_b32. Reuse the existing DPP arithmetic only where the plain form has the same semantics, and keep the zero/all-ones sentinels and the signed-versus-unsigned control. The LLVM 15 round trip and independent full-width readback are the right checks.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7088352876 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/735#issuecomment-7088352876). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T00:26:37Z. --- `v_xnor_b32` is already merged in #728 with e32/e64 assembly and UINT readback. Please scope the follow-up to `v_bfrev_b32`, `v_ffbh_u32`, `v_ffbh_i32` and `v_ffbl_b32`. Reuse the existing DPP arithmetic only where the plain form has the same semantics, and keep the zero/all-ones sentinels and the signed-versus-unsigned control. The LLVM 15 round trip and independent full-width readback are the right checks.
JB2WIN commented 2026-11-24 06:48:54 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by JB2WIN on 2026-11-23T00:58:30Z.


Thanks. #755 is scoped to v_bfrev_b32, v_ffbh_u32, v_ffbh_i32 and v_ffbl_b32; v_xnor_b32 is left to #728. It keeps the zero and all-ones sentinels and the signed-versus-unsigned control, and checks with the LLVM 15 round trip and full-width readback.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7088777658 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/735#issuecomment-7088777658). Originally posted by [JB2WIN](https://github.com/JB2WIN) on 2026-11-23T00:58:30Z. --- Thanks. #755 is scoped to `v_bfrev_b32`, `v_ffbh_u32`, `v_ffbh_i32` and `v_ffbl_b32`; `v_xnor_b32` is left to #728. It keeps the zero and all-ones sentinels and the signed-versus-unsigned control, and checks with the LLVM 15 round trip and full-width readback.
R0Y00 commented 2026-11-24 06:48:58 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-23T02:45:05Z.


The scoped set is complete. #728 covered plain e32/e64 v_xnor_b32. #755 added plain e32/e64 v_bfrev_b32, v_ffbh_u32, v_ffbh_i32 and v_ffbl_b32, with an LLVM 15 round trip and full-width UINT readback. The zero/all-ones and signed-vs-unsigned controls are in main, and the exact #755 head passed both Windows configurations and both Linux checks.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7090182571 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/735#issuecomment-7090182571). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-23T02:45:05Z. --- The scoped set is complete. #728 covered plain e32/e64 `v_xnor_b32`. #755 added plain e32/e64 `v_bfrev_b32`, `v_ffbh_u32`, `v_ffbh_i32` and `v_ffbl_b32`, with an LLVM 15 round trip and full-width UINT readback. The zero/all-ones and signed-vs-unsigned controls are in main, and the exact #755 head passed both Windows configurations and both Linux checks.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
R0Y00/Xbox2Windows#729
No description provided.