tools/spirv_opt.py: both pinned_ids (main) and the SROA parameters (PR); main's id_type Result Type check kept after the PR's const_type check on null-zero loads; main's OpUndef/OpSpecConstant* const_type kept. tests/test_spirv_opt.py: both sets of new tests.
Co-authored-by: JARVIX <273200855+jarvixaiassistant-glitch@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Split non-escaped, statically indexed Function-scope arrays (such as
%vgpr[256] and %sgpr[128] when no dynamic v_movrel*/s_movrel* indexing
exists) into per-slot scalar OpVariables for only the live slots
referenced after dominator-tree forwarding and DCE, eliminating the
monolithic array allocas and their static OpAccessChains.
Preserves arrays with dynamic indices, whole-array loads/stores,
escapes, decorations, non-null initializers, or negative/out-of-bounds
static indices; canonicalizes signed/unsigned constant indices with
equal value and rewrites multi-index OpAccessChains cleanly.
Merges that each passed alone but clash together:
- v_cmp_class_f64: the earlier cmp_class_f64 (685d16ed9) (operand-form checks, test_cmp_class_f64) and the later f64 branch
in cmp_class both handled the opcode; f64 goes to cmp_class_f64 again, f16 stays in cmp_class.
- rdna2spirv CLI tests: spirv-as/spirv-val now run in the output folder with the staging file's bare name, so
the test doubles resolve it against cwd; assemble_spirv decodes the output only when it is bytes. (The doubles
had been writing .spirv-*.tmp files into the repository root.)
- ps_w64 fixtures (TEST-722): an 18th fixture (ps_w64_a_discard) landed; its killed lanes export nothing and
keep the clear value.
- first_light: a run without an OBJ removes mesh.bin, and harness_env reads manifest["files"]; batch_glb's stats
name failures and dropped textures; run_gpu_tests reports a frame never written as a missing readback
(TEST-837).
- make_game TRANSLATION_SOURCES and runtime.yml's paths include spirv_opt.py and report_paths.py (and
wave64_emulate_opt.py), which the translator imports.
Repo rules: stdout guard on six tools; encoding on two opens (gen_gdk_runtime_classes' helper is read_utf8);
newline on one write; anim_skeleton_match's joaat encodes like hashdict.joaat; test_feature_scan's new test is
listed with the others its globals() runner reaches.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Addresses standalone memory-aliasing review findings on PR #2298 (@duudiis):
- Signed/unsigned integer index canonicalization (%uint 0 vs %int 0) is already handled
by keying static OpAccessChain slots on const_int_val[i][1]; now also require every
static slot index to be in const_int_val (treating unparsed constants as dynamic).
- Mark any Function-scope variable touched by a Volatile OpLoad or OpStore as escaped
so volatile accesses never observe stale forwarded values or killed prior stores.
- Mark any Function-scope variable accessed at mixed aggregate/subobject slot depths
(e.g. both whole-array and element pointers) as escaped to prevent partial-overlap
aliasing.
- Add regression tests for all four cases in tests/test_spirv_opt.py.