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

Closed
opened 2026-11-26 22:15:07 +00:00 by github-bot · 3 comments
Owner

@⁠JB2WIN on GitHub · 2026-11-22 23:58 UTC · original

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).

**@⁠JB2WIN** on GitHub · 2026-11-22 23:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/735) `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).
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 22:15:07 +00:00
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-23 00:26 UTC · original

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.

**@⁠R0Y00** on GitHub · 2026-11-23 00:26 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/735#issuecomment-7088352876) `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.
Author
Owner

@⁠JB2WIN on GitHub · 2026-11-23 00:58 UTC · original

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.

**@⁠JB2WIN** on GitHub · 2026-11-23 00:58 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/735#issuecomment-7088777658) 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.
Author
Owner

@⁠R0Y00 on GitHub · 2026-11-23 02:45 UTC · original

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.

**@⁠R0Y00** on GitHub · 2026-11-23 02:45 UTC · [original](https://github.com/R0Y00/Xbox2Windows/issues/735#issuecomment-7090182571) 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.
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/R0Y00--Xbox2Windows#735
No description provided.