Commit Graph

6 Commits

Author SHA1 Message Date
c420ad28d6 Merge pull request #3629 from Kam471 2026-11-22 17:03:05 -05:00
e37e6e136f cf_diff/f32_fuzz: print usage and exit 2 with no arguments 2026-11-22 21:06:33 +00:00
02b331e254 Merge pull request #3055 from Marco Luzzaro 2026-11-22 15:14:24 -05:00
649e90481f cf_diff: reject an empty program batch 2026-11-22 20:14:15 +01:00
b624eff02c tools: add saveexec logic variants to cf_diff 2026-11-22 22:09:04 +03:00
71a16c11cf FUZZ-8: control-flow/EXEC differential fuzzer; wave32 SCC of mask ops is wave-wide
tools/cf_diff.py generates seeded wave32/wave64 pixel shaders from the
control-flow shapes compilers emit (saveexec if/else, v_cmpx, VCC- and
SCC-voted branches, uniform and per-lane loops, two-entry cycles) and
compares every lane's export between:
  * tools/cf_ref.py: cpu_ref's Machine plus branches, compares, v_cmpx,
    saveexec and 64-bit masks (the ISA model, one wave)
  * rdna2spirv + tests/semantic/spirv_wave_interp.py: every invocation of
    one subgroup in lockstep, split at selections and rejoined at merges,
    with the subgroup operations the translator emits
in both the structured and the dispatch-loop form; --spirv-val also
validates each module, --minimize reduces a mismatch.

Finding (fixed here): in a wave32 program s_and/or/xor/andn2/orn2/nand/
nor/xnor_b32 on lane masks set SCC from the lane's own bit instead of the
whole mask, so `s_and_b32 s0, vcc_lo, exec_lo; s_cbranch_scc0` and loops
closed by `s_andn2_b32 exec_lo, ...; s_cbranch_scc1` split the wave. SCC
is now the same subgroup vote as for the _b64 forms. GPU test
ps_scc_mask32 (not run on a GPU yet).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-22 00:02:16 +00:00