cpp-migration: lower v_ldexp_f32 in the direct compute path #3013

Closed
opened 2026-11-27 05:07:23 +00:00 by legacy-code-archaeologist · 0 comments
legacy-code-archaeologist commented 2026-11-27 05:07:23 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-27T05:07:23Z.


Part of the instruction-coverage item of #2935, found with the same per-opcode VOP3 probe as #2985.

The direct C++ compute path refuses v_ldexp_f32 with direct DXIL lowering for v_ldexp_f32. pixel_aot already lowers it exactly (ldexp32 in tools/pixel_aot.py, checked in tests/pixel_aot_check.py). Its rules:

  • zero, Inf and NaN pass unchanged;
  • a denormal input is normalized;
  • a denormal result rounds to nearest even;
  • S1 is a signed integer clamped to [-512, 512];
  • clamp saturates.

Proposed:

  • The same semantics with integer bit operations only, so nothing is flushed.
  • Abs/neg on S0 as bit operations.
  • Refuse abs/neg on S1, omod, op_sel, SDWA and DPP.
  • A controls/hardware fixture with round-to-even ties, a denormal input, NaN, overflow and saturate cases, plus mutant references.

I am taking it. AI-assisted.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6640371287 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/3013). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-27T05:07:23Z. --- Part of the instruction-coverage item of #2935, found with the same per-opcode VOP3 probe as #2985. The direct C++ compute path refuses `v_ldexp_f32` with `direct DXIL lowering for v_ldexp_f32`. `pixel_aot` already lowers it exactly (`ldexp32` in `tools/pixel_aot.py`, checked in `tests/pixel_aot_check.py`). Its rules: - zero, Inf and NaN pass unchanged; - a denormal input is normalized; - a denormal result rounds to nearest even; - S1 is a signed integer clamped to [-512, 512]; - clamp saturates. Proposed: - The same semantics with integer bit operations only, so nothing is flushed. - Abs/neg on S0 as bit operations. - Refuse abs/neg on S1, omod, op_sel, SDWA and DPP. - A controls/hardware fixture with round-to-even ties, a denormal input, NaN, overflow and saturate cases, plus mutant references. I am taking it. AI-assisted.
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#3013
No description provided.