pixel_aot: accept v_clrexcp and v_pipeflush (and their e64 spellings) as no-ops #1784

Closed
opened 2026-11-24 18:43:32 +00:00 by legacy-code-archaeologist · 1 comment
legacy-code-archaeologist commented 2026-11-24 18:43:32 +00:00 (Migrated from github.com)
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by legacy-code-archaeologist on 2026-11-24T18:43:32Z.


v_clrexcp and v_pipeflush are the two operand-free VOP1 forms that pixel_aot still refuses. Their VOP3 encodings, v_clrexcp_e64 and v_pipeflush_e64, are refused too. All four are in both the gfx1013 and gfx1030 reference lists, and form_coverage --gaps gfx1030 lists them as unobserved. LLVM 15 decodes them identically for both targets:

7e008200  v_clrexcp      d5c10000 00000000  v_clrexcp (VOP3)
7e003600  v_pipeflush    d59b0000 00000000  v_pipeflush (VOP3)

The VOP3 form prints without the suffix, as v_nop_e64 does.

Proposed slice: accept the four spellings as no-ops in the entry mask, exactly like v_nop/v_nop_e64 (commit 2dc5e13e).

  • v_pipeflush flushes a VALU destination cache, so it has no architectural effect.
  • v_clrexcp clears the wave's exception state. That state is only observable through s_getreg_b32 of the trap status, which pixel_aot does not lower. So no translated shader can see the difference.
  • Still refused: any other mask and any operand.

Fixture plan:

  • The standard sampled program with all four spellings inserted where registers are live.
  • A static check that the generated HLSL is byte-identical to the program without them.
  • draw-vop1-nops on WARP and hardware against the existing texture reference.
  • A control that replaces one no-op with a clobber of a live register and must report a pixel mismatch.
  • The program joins the check_binary round trip.

I'll take this as a small separate slice next to #1739/#1785.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:issue:6588922636 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1791). Originally posted by [legacy-code-archaeologist](https://github.com/legacy-code-archaeologist) on 2026-11-24T18:43:32Z. --- `v_clrexcp` and `v_pipeflush` are the two operand-free VOP1 forms that `pixel_aot` still refuses. Their VOP3 encodings, `v_clrexcp_e64` and `v_pipeflush_e64`, are refused too. All four are in both the gfx1013 and gfx1030 reference lists, and `form_coverage --gaps gfx1030` lists them as unobserved. LLVM 15 decodes them identically for both targets: ``` 7e008200 v_clrexcp d5c10000 00000000 v_clrexcp (VOP3) 7e003600 v_pipeflush d59b0000 00000000 v_pipeflush (VOP3) ``` The VOP3 form prints without the suffix, as `v_nop_e64` does. **Proposed slice:** accept the four spellings as no-ops in the entry mask, exactly like `v_nop`/`v_nop_e64` (commit 2dc5e13e). - `v_pipeflush` flushes a VALU destination cache, so it has no architectural effect. - `v_clrexcp` clears the wave's exception state. That state is only observable through `s_getreg_b32` of the trap status, which `pixel_aot` does not lower. So no translated shader can see the difference. - **Still refused:** any other mask and any operand. **Fixture plan:** - The standard sampled program with all four spellings inserted where registers are live. - A static check that the generated HLSL is byte-identical to the program without them. - `draw-vop1-nops` on WARP and hardware against the existing texture reference. - A control that replaces one no-op with a clobber of a live register and must report a pixel mismatch. - The program joins the `check_binary` round trip. I'll take this as a small separate slice next to #1739/#1785.
R0Y00 commented 2026-11-24 20:01:20 +00:00 (Migrated from github.com)
Author
Contributor

Imported from R0Y00/Xbox2Windows. Originally posted by R0Y00 on 2026-11-24T19:43:03Z.


Completed in #1807. The entry-mask support covers both encodings, retains operand and mask refusals, and has binary and draw controls, including the live-register clobber case.

<!-- greyfinch-sync:R0Y00/Xbox2Windows:comment:7142489440 --> Imported from [R0Y00/Xbox2Windows](https://github.com/R0Y00/Xbox2Windows/issues/1791#issuecomment-7142489440). Originally posted by [R0Y00](https://github.com/R0Y00) on 2026-11-24T19:43:03Z. --- Completed in #1807. The entry-mask support covers both encodings, retains operand and mask refusals, and has binary and draw controls, including the live-register clobber case.
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#1784
No description provided.